Get started with the GraphQL API
How to get started with the GraphQL API, which is used in the Optimizely querying service to retrieve content in Optimizely's solutions.
Synchronize content types and content from the site for the GraphQL API to work using the provided access key. See Installation and configuration.
Access the API endpoint
Access the GraphQL API through the URL https://cg.optimizely.com/content/v2?auth={singlekey}. Use the singlekey you received when your account was created.
Access the interactive GraphiQL page
When accessing the GraphQL API through the provided endpoint, you can also try Optimizely Graph through the GraphiQL page https://cg.optimizely.com/app/graphiql?auth={singlekey}, which is a built-in tool for the GraphQL integrated development environment; useful when working with queries.
If you use Optimizely Graph integrated with Optimizely Content Management System (CMS), you can access GraphiQL directly by choosing Optimizely Graph/GraphiQL from the menu.
Note
For the page to work correctly in Firefox, you must toggle off Enhanced Tracking Protection.
Work with the GraphQL schema
See GraphQL schema for how to work with the generated schema.
Updated 3 months ago