Skip to content

add map to gatsby config#1

Open
apaniel wants to merge 5 commits intomasterfrom
feature/add-map-to-gatsby-config
Open

add map to gatsby config#1
apaniel wants to merge 5 commits intomasterfrom
feature/add-map-to-gatsby-config

Conversation

@apaniel
Copy link
Owner

@apaniel apaniel commented Oct 31, 2020

Description

Adding more parameters to the page context will allow having more flexibility when creating page graphql queries. Right now the parameters allowed are either the ones that Gatsby adds to the context by default (like path), or the ones added statically through the globalContext.

Adding a callback to be able to map entry properties to Gatsby's page context object, allows for more flexibility when creating graphql queries, being able to query specific data based on the entry properties.

using this map:
image

we are now able to use the locale parameter in the page graphql query.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants