Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Can't redeploy graphql #21

Open
sjsd opened this issue Feb 9, 2021 · 2 comments
Open

Can't redeploy graphql #21

sjsd opened this issue Feb 9, 2021 · 2 comments

Comments

@sjsd
Copy link

sjsd commented Feb 9, 2021

In the post.js I have added a new field looking like this:

{
  name: 'subtitle',
  type: 'string',
  title: 'Subtitle'
},

To make the new field available in GraphQL I understand I have to run the npm run graphql-deploy. But when I do, it never completes and is left with the following text in the terminal.

> sanity-gridsome@1.0.4 graphql-deploy
> lerna run graphql-deploy

lerna notice cli v3.16.4
lerna info Executing command in 1 package: "npm run graphql-deploy"

What should I do to make the command to work?

@sjsd
Copy link
Author

sjsd commented Feb 9, 2021

I just figured out I can run sanity graphql deploy in the studio-folder to deploy changes in the schema. It does not solve the inital problem but I can continue working with my schemas.

@rylanharper
Copy link

rylanharper commented May 23, 2021

I can confirm the lerna command does not work. sanity graphql deploy needs to be run within the studio folder.. However previously deleted/cleared document ids do not get cleared despite running the command. This isnt really an issue that effects development, but it is annoying to fill up the terminal every time I run development

Terminal example:

sanity-gridsome-web: [sanity] Document with ID "1a558cde-16fb-4362-8082-634468a1cc20" has type "post", which is not declared as a document type in the GraphQL schema. Have you remembered to run `sanity graphql deploy` lately? Skipping document.
sanity-gridsome-web: [sanity] Document with ID "1b1c7451-c976-48fd-b416-73bf5a356f10" has type "author", which is not declared as a document type in the GraphQL schema. Have you remembered to run `sanity graphql deploy` lately? Skipping document.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants