-
Notifications
You must be signed in to change notification settings - Fork 10.3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contentful Plugin: Should output complete schema regardless of whether content is available #28892
Comments
The code that needs to be updated should begin here: The types are being generated but the fields are not explicitly defined. The following breakdown of field types in Contentful can be used to determine the appropriate GraphQL type. https://www.contentful.com/developers/docs/concepts/data-model/ Reference field types should be either This would allow the underlying data to be queried using inline fragments. |
Sounds like it's the same as #12816 ? |
@LekoArts thanks for finding this, I was searching for open issues but couldn't find any. Happy to see some progress has been made on this but it is very disheartening to see that PR has been open for over 6 months. 😫 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Definitely not stale, or shouldn't be... |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Nope, not stale. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description
When content types are created but are not yet populated they do not include any of their fields in the GraphQL schema, this means that we cannot write queries against those fields which will work when the data is available.
This issue would arise if the content was available but subsequently unpublished or deleted.
The content model can be represented in the schema by using the schema customisation API rather than using inference.
Partially discussed here: #1517
Note: I appreciate this is mentioned in the plugin's readme but this is a serious drawback of the plugin.
A similar fix was put in place on the Kentico Kontent source plugin last year:
https://github.com/Kentico/kontent-gatsby-packages/blob/master/packages/gatsby-source-kontent/src/createSchemaCustomization.items.ts
Steps to reproduce
Expected result
The schema should include the full model rather than a "skeleton" structure with only the default fields.
Actual result
The type exists but does not include the full model, only the base Contentful fields.
Environment
The text was updated successfully, but these errors were encountered: