Graph API Keys

Authenticate systems and tools to a single graph in GraphOS


A graph API key provides access to interacting with a single graph in GraphOS.

Create a unique graph API key for each non-development system that communicates with GraphOS. Doing so lets you revoke access to one system without affecting the others.

Create a graph API key

  1. Go to studio.apollographql.com and select the graph you want to obtain an API key for.

  2. If a Publish your Schema dialog appears, copy the protected value that appears after APOLLO_KEY= in the example code block (it begins with service:).

    Otherwise, go to the next step.

  3. Open your graph's Settings page and select the API Keys tab. Click Create New Key. Give your key a name, such as Production, so you can track what uses each key.

    note
    If you don't see the API Keys tab, you don't have sufficient permissions for your graph. Only organization members with the Org Admin or Graph Admin role can manage graph API keys. Learn more about member roles.
  4. Copy the key's value. For security, you can't view an API key's value in Studio after you create it.

Set graph API key permissions

Unless you have an Enterprise plan, every graph API key provides full access to its associated graph.

If you have an Enterprise plan, assign a role to each graph API key you create. The key's permissions are then limited to that role's permissions.

You can't change a graph API key's role after you create it. Create a new key with the desired role instead.

For an overview of all key types, see API Keys.

Feedback

Ask Community