GraphQL schema not updating

We use the Prismic Development Environment feature to develop against our new content models. When the content models are ready, we copy over the JSON of the content model into the production repo and save. I push my code and our CI/CD pipeline is kicked off. At this point, we require a Gatsby build against the production repo.

Expected behavior:
The new code should be able to do a Gatsby build since the Prismic production content model has been updated to match dev. The production Prismic GraphQL schema should update to include the changes to the content model.

Actual behavior:
In order to force the update to the production GraphQL schema, we have to create a content entry of that particular type, publish it.

This is a problem because in our case the content entry is not ready to go production yet. We need a way to update the schema without having to publish content.

1 Like

Hi @dturkington, thanks for pointing this out to us. As you’ve discovered, at the moment you’ll need to publish a document of the new/updated type for the changes to reflect in the GraphQL schema.

I agree that it would be better if you didn’t need to publish something, though. So I will let the @features-team know about this and we will add this to our feature request tracker as a possible improvement for the future. We don’t have any plans to work on this right now, but we will let you know here if that changes at any point.

1 Like