- GraficoQL
A minimal graphql client.
A minimal graphql client.
- GraficoQL
- .create(url, options) ⇒
GraphQLClient
- .request(url, query, variables) ⇒
Promise
- .rawRequest(url, query, variables) ⇒
Promise
- .create(url, options) ⇒
GraficoQL.create(url, options) ⇒ GraphQLClient
Creates an object to request a graphql endpoint.
Kind: static method of GraficoQL
Throws:
ReferenceError
Param | Type |
---|---|
url | String |
options | Object |
Requests a graphql endpoint.
Kind: static method of GraficoQL
Throws:
ReferenceError
Param | Type |
---|---|
url | String |
query | String |
variables | Object |
Requests a graphql endpoint. The complete response will be transmit to the resolved promise.
Kind: static method of GraficoQL
Throws:
ReferenceError
Param | Type |
---|---|
url | String |
query | String |
variables | Object |
Kind: global class
Access: private
- GraphQLClient ℗
- new GraphQLClient(url, options)
- .setHeader(key, value) ⇒
this
- .request(query, variables) ⇒
Promise
- .rawRequest(query, variables) ⇒
Promise
Param | Type | Description |
---|---|---|
url | String |
The url of the graphql endpoint |
options | Object |
Set a header-key.
Kind: instance method of GraphQLClient
Param | Type |
---|---|
key | String |
value | String |
Requests the stored graphql endpoint.
Kind: instance method of GraphQLClient
Param | Type |
---|---|
query | String |
variables | Object |
Requests the stored graphql endpoint. The complete response will be transmit to the resolved promise.
Kind: instance method of GraphQLClient
Param | Type |
---|---|
query | String |
variables | Object |