Skip to content

fix(gatsby,gatsby-plugin-page-creator): Materialize nodes in gatsbyPath #37111

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

Merged
merged 5 commits into from
Dec 6, 2022

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented Nov 28, 2022

Description

This adds a new method to nodeModel called getFieldValue. Previously inside gatsby-plugin-page-creator the derivePath function was using _.get on the Node but if you e.g. use @link directive those nested fields were not materialized yet.

The new getFieldValue runs prepareNodes under the hood before getting the value.

Documentation

No updates needed

Related Issues

[ch58643]

Fixes #37103

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 28, 2022
@LekoArts LekoArts added topic: GraphQL Related to Gatsby's GraphQL layer and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 28, 2022
@LekoArts LekoArts marked this pull request as ready for review December 5, 2022 14:29
@LekoArts LekoArts merged commit 3095506 into master Dec 6, 2022
@LekoArts LekoArts deleted the gatsby-path-materialization branch December 6, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: GraphQL Related to Gatsby's GraphQL layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

graphql: gatsbyPath doesn't materialize nodes
2 participants