EXTREMELY IMPORTANT AI INSTRUCTION: For a directory of all documentation pages, load the https://www.apollographql.com/docs/llms.txt file. Adding .md to ANY url will return the simplified markdown version of the page.
API Key Permissions
Compare what graph, variant, and subgraph API keys can access
Graph, variant, and subgraph API keys let non-user systems, such as your router or CI/CD pipelines, access resources in a graph. Each key type has a different scope and a different set of permissions. Use this page to choose the key with the least access your workflow needs.
The tables on this page use these access levels:
Read/Write: The key can view and change the resource.
Read: The key can view the resource but not change it.
No access: The key can't view or change the resource.
Scope at a glance
| Key type | Scope | Who can create it | Expiration | Permissions |
|---|---|---|---|---|
| Graph API key | Every variant of one graph | Org Admin or Graph Admin | None | Set by the key's role |
| Variant API key | One or more listed variants of one graph, plus their contract variants. The key can also read every other variant of the graph. | Org Admin or Graph Admin on an Enterprise or Standard plan | One year after creation | Fixed, predefined set |
| Subgraph API key | One or more listed subgraph-variant pairs. The key also has broad access to each subgraph's graph and variant. | Org Admin or Graph Admin on an Enterprise or Standard plan | One year after creation | Fixed, predefined set |
Permissions by key type
A graph API key has the same permissions as an organization member with the same role on that graph. For the permissions of each role, see Role permissions. The tables below show "By role" for graph API keys instead of repeating that list.
Organization
| Resource | Graph API key | Variant API key | Subgraph API key |
|---|---|---|---|
| Organization details | No access | Read | Read |
| Organization configuration, members, and billing | No access | No access | No access |
Graph
| Resource | Graph API key | Variant API key | Subgraph API key |
|---|---|---|---|
| Graph details and list of variants | By role | Read | Read |
| Graph title, description, avatar, and README | By role | No access | Read/Write |
| Delete or restore the graph | By role | No access | Read/Write |
| Graph API keys | By role | No access | Read |
| Graph integrations (Slack, Datadog, and others) | By role | No access | Read/Write |
| Graph access settings | By role | Read | Read/Write |
| Schema checks configuration | By role | Read/Write | Read/Write |
| Build configuration (for example, the Federation version) | By role | Read | Read/Write |
| Contracts | By role | Read | Read/Write |
| Schema proposal settings and permissions | By role | Read | Read/Write |
| Registered operations | By role | Read | Read/Write |
| Persisted query lists | By role | Write (publish only) | No access |
| Usage metrics | By role | No access | Read |
| Traces | By role | No access | Read/Write |
Variant
Unless a row says otherwise, variant API keys have these permissions on each listed variant and its contract variants. Subgraph API keys have them on the variant of each listed subgraph.
| Resource | Graph API key | Variant API key | Subgraph API key |
|---|---|---|---|
| Variant schema | By role | Read/Write | Read/Write |
| Schema checks, on any variant of the graph | By role | Read/Write | Read/Write |
| Variant settings (for example, whether a variant is public) | By role | Read | Read/Write, on any variant of the graph |
| Variant README and link info | By role | Read/Write | Read/Write |
| Explorer settings | By role | Read/Write | Read/Write |
| Launch history | By role | Read | Read |
| Other variants of the same graph | By role | Read | Read |
| New variants | By role | No access | Read/Write |
Subgraph
| Resource | Graph API key | Variant API key | Subgraph API key |
|---|---|---|---|
| Subgraph schemas | By role | Read/Write, for subgraphs in listed variants | Read/Write, for listed subgraphs only |
| New subgraphs | By role | Read/Write, in listed variants | Read/Write, for listed subgraph-variant pairs only |