net.query syntax
Write your graphql query in playground, copy it and insert into SDK's net.query function. Define variables and execute it.
Last updated
Was this helpful?
Write your graphql query in playground, copy it and insert into SDK's net.query function. Define variables and execute it.
Last updated
Was this helpful?
net.query
functionWhenever you need to poll realtime data from GraphQL API with SDK - use function.
Write your graphql query in playground, copy it and insert into SDK's net.query function. Define variables and execute it.
See All the functions available in API here
variables
objectYou can pass variables via a separate parameter (graphql-style). You just copy the query from playground and replace the param values with $param_name and then pass parameters via additional object like this:
If you use variables object, you need to wrap your query in query MyQuery(params){$param1: Param1Type}.
If the parameter is mandatory you must specify its type with exclamation mark on the end like this: query MyQuery(params){$param1: Param1Type!}
See this sample to understand how to pass variables to the queries