gql
Simple GraphQL query builder.
gql(chunks, ...variables) ⇒ string
Simple GraphQL query builder.
Returns: string
The built query
Todo
- Improve type safety
- Make this work better
| Param | Type | Description |
|---|---|---|
| chunks | TemplateStringsArray | The template string chunks |
| ...variables | Array.<any> | The variables to be interpolated into the query |
.gql(query, variables) ⇒ Promise.<PlexusApiRes.<unknown>>
Send a graphql request
Returns: Promise.<PlexusApiRes.<unknown>>
The response from the server
| Param | Type | Description |
|---|---|---|
| query | string | The gql query to send |
| variables | Record.<string, any> | Variables |