Version: 1.1.0
GraphQL Client
GraphQL Client provides minimal support to communicate (query and mutate) with the GraphQL server.
In K2, communicating with your GraphQL server is as easy as passing url
of your GraphQL server and graphQLOptions
with the actual query string, and that's it!
Usage
- Import any component from
@k2/d3-viz
or@k2/rv-viz
.
- Pass your query (of type
query
ormutation
) and variables wrapped ingraphQLOptions
Example
Live Editor
Please note that, you can still pass auth tokens or custom headers inside of the
urlOptions
prop.
Custom Types
GraphQLVariable
GraphQLOptions
Limitations
- Currently, K2, only supports GraphQL types of
query
andmutation
. typesubscription
is not supported at the moment.