GraphQL
Learn useful terminology and concepts for using the GraphQL API
Explorer
The GraphQL Explorer is a great way to learn about the Codex GraphQL API. It’s a tool that allows you to explore the API, run queries, and subscriptions, complete with with tabs, persistence, and history.
URLs
Codex provides a url for both queries & subscriptions (websockets) at the same resource.
Queries:
Websockets:
Introspection
Codex does not support introspection queries against the API.
We do provide the introspection query response, as well as the most recent schema.
Communication
All queries and mutations are sent over HTTPS, using the POST
method.
All websocket messages are sent over the wss
protocol.
All messages are serialized as JSON.
Codegen
We recommend using GraphQL Code Generator to generate types and queries for your codebase, using the introspection schema provided here .
Below is an example of how you could integrate the code generator into your project.