-
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
[docs] Gatsby Internals docs should be updated (schema customization, Incremental Builds, v3) #14228
Comments
I'm interested in taking this one but was wondering if you could point me at a PR that fixes a similar issue for my reference. Thanks! |
@k-conway This is great - and sorry for the very late reply! Our schema generation code changed quite dramatically in version 2.2, so big chunks of that would have to be rewritten. I cannot point to an example PR, but my understanding is that the "Behind the scenes"/"Gatsby internals" docs should be like a narrated code walk-through. The entry point in the schema build step is here, and a good overview of the steps involved are here and here.
Don't hesitate to ask if anything is unclear! |
Would be great to cover how to create directives for non-fields (createFieldExtension only covers FIELD_DEFINITIONS). |
@tbrannam what's the usecase for custom type extensions? |
I may have the name of what I'm looking for wrong. In this particular use case I am working to add additional metadata which would be processed by an Apollo-Link (by modifying the graphql context for the query) The implementation of the link would modify some headers which are required to modify some HTTP headers for a few specific Graphql queries (Localization related). Originally I thought that I could somehow reach into the the gatsby-source-graphql config and somehow cause the fetch implementation to read some dynamic value - but the async nature of the these made it a synchronization issue. In apollo-client hooks (useQuery) I think that you could add additional properties to the context at the call site - which doesn't appear to be possible with a raw
Generally one could set the custom headers in the source config, but there are a couple of edge cases where the header needs to be modified. |
@stefanprobst is this still an open issue? If so, I came across this issue when reading the documentation on |
Hi @alliestehney, yep it's still open! There is also #18280 which needs some attention. We would welcome any contributions on this! |
For anyone like me who is looking at this now and wants to see the code @stefanprobst's was referencing in his comment, here are links to the schema files as they existed at the time of the comment:
|
My thread add #30070 is a duplicate of this, here's some more: Request for examples of extensionsSome recommended topics to cover from Actions page#
Consider using
|
Refresh documentation of
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
The "Gatsby Internals" ("Behind the scenes") docs for schema generation are out of date as they still refer to the pre-Schema Customization codebase.
The text was updated successfully, but these errors were encountered: