Queries for Devices
device
Returns a single device.
device(id) {
/* Device fields */
}
Arguments
id
Int! -- required
id
Int! -- requiredThe ID of the Device to return.
Response
Device.*
Device
Device.*
DeviceAny requested field from the Device object.
Example
Request
query {
device(id: 4) {
id
name
}
}
Response
{
"data": {
"device": {
"id": 4,
"name": "Mobile"
}
}
}
devices
Returns all available devices.
devices {
/* Device fields */
}
Arguments
None
Response
Device.*
[Device!]
Device.*
[Device!]A list of Device objects returning any requested fields from the Device object.
Example
Request
query {
devices {
id
name
}
}
Response
{
"data": {
"devices": [
{
"id": 1,
"name": "Web"
},
{
"id": 2,
"name": "iOS"
},
{
"id": 3,
"name": "Android"
},
{
"id": 4,
"name": "Mobile"
},
{
"id": 5,
"name": "VR"
},
{
"id": 6,
"name": "AR"
},
{
"id": 7,
"name": "XR"
},
{
"id": 8,
"name": "Mac"
},
{
"id": 9,
"name": "Windows"
},
{
"id": 10,
"name": "Linux"
}
]
}
}