Skip to content

GraphQL API Deployment #3344

Jun 15, 2022 · 4 comments · 7 replies
Discussion options

You must be logged in to vote

v3.0.0-dev-preview.10 is out and includes the --api flag 👍

You can now set an id on GraphQL APIs in your sanity.cli.ts:

// sanity.cli.ts
import {createCliConfig} from 'sanity/cli'

export default createCliConfig({
  api: {
    projectId: <PROJECT_ID>,
    dataset: <DATASET_NAME>,
  },
  graphql: [
    {
      id: 'production',
      workspace: 'default',
    },
    {
      id: 'staging',
      workspace: 'staging',
    },
  ],
})

The id is used in combination with the --api flag:

sanity graphql deploy --api staging

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@AmeyGohil
Comment options

@p10e
Comment options

@snorrees
Comment options

@AmeyGohil
Comment options

Comment options

You must be logged in to vote
1 reply
@AmeyGohil
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@AmeyGohil
Comment options

@rexxars
Comment options

Answer selected by rexxars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants