Skip to content

Latest commit

 

History

History
359 lines (324 loc) · 7.85 KB

api.md

File metadata and controls

359 lines (324 loc) · 7.85 KB

Schema Types

Table of Contents

Query

Field Argument Type Description
getAllLights [Light]

get list of lights seen

getLight Light

get info about a single light

id ID!

Objects

ControlProtocol

Field Argument Type Description
name String!
version String!

Light

Field Argument Type Description
id String!
sw_ver String!
hw_ver String!
mic_type String!
model String!
mac String!
dev_name String!
alias String!
relay_state Boolean!
on_time Int!
active_mode String!
feature String!
updating Boolean!
icon_hash String!
rssi Int!
led_off Boolean!
longitude Int!
latitude Int!
hwId String!
fwId String!
deviceId String!
oemId String!

Mutation

Field Argument Type Description
power Light

turn light on or off, optionally use transitionTime (in ms)

id ID!
state Boolean!
transitionTime Int
temp Light

set the color-temp (kelvin: 1700-27000) of the light

id ID!
transitionTime Int
temp Int!
brightness Light

set the brightness (0-100) of the light

id ID!
transitionTime Int
brightness Int!
color Light

set the color of the light

id ID!
transitionTime Int
color String!

Enums

CacheControlScope

Value Description
PUBLIC
PRIVATE

Scalars

Boolean

The Boolean scalar type represents true or false.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.