Access GraphQL
The GraphQL API can reached by appending/graphql to your Kibo Storefront home URL.
Authorization(required): Kibo API application auth token
query(required): GraphQL query as a stringoperationName(optional): Only required if multiple operations are present in queryvariables(optional): Data to be passed to query
GraphQL Playground
The interactive GraphQL console, called the Playground, can be accessed from your site’s front-end by appending/graphql to your storefront’s homepage URL to access this tool in the browser.
You must first include your credentials (generated by the cookie from the front end site) by opening the gear icon in the top right corner and setting "request.credentials": "include" as shown below:
Then you will be able to build queries. GraphQL’s syntax is displayed in the left pane of the Playground, while the JSON results will be displayed in the right pane once the call is made.
Code Samples
Get Product
Get Categories
Product Search
Get Current Cart
- Requires a shopper access token to be sent as Bearer auth.
Get Cart By ID
Add To Current Cart
- Requires a shopper access token to be sent in the header as Bearer auth.
Error Responses
GraphQL error messages include the following data.message: A detailed description of the error and root cause. This is always provided in the error response.path: A list of the query fields leading up to the error. This is only included when the error can be traced back to a particular field.extensions: Any additional information that may be included if applicable.code: An HTTP error code used by the Kibo APIs as documented here.
GraphQL Client
There is a JavaScript Kibo GraphQL client available to handle API authentication and assist with registered and anonymous shopper authentication.Prerequisites
If this client library is used in a browser environment, ensure your application is configured with storefront-only permissions as the API Key and secret will be visible.Installation
To install the GraphQL client, run the following command:Configuration
To create an instance of the GraphQL client, the following configuration is required:apiHost: Link to your GraphQL API instance.accessTokenUrl: Link to the Authentication Server, used to request an access token from Kibo’s OAuth 2.0 service.clientId: Unique Application (Client) ID of your application.sharedSecret: Secret API key used to authenticate your application.
Authentication Hooks
Hooks can be provided to theCreateApolloClient method when creating a client that will execute on AuthTicket change, read, and remove events.
Proxy Requests in Development
If you would like to see the requests to the GraphQL server, you need to set theHTTPS_PROXY environment variable to the proxy application you are using.

