-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Can't use graphql
in onCreateNode
#3121
Comments
It's because at this stage of build process graphql schema is not yet created. Use |
Alright will do it this way then, thanks. |
This was referenced Jun 24, 2021
This was referenced Dec 7, 2021
This was referenced May 13, 2022
This was referenced Jun 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm trying to make a graphql query in
onCreateNode
ingatsby-node.js
, butgraphql
is undefined.It seems like it's not passed to this function.
It works on
exports.createPages
, so I expected it to also work here. (The documentation also doesn't give much info on what arguments are available for thegatsby-node
functions.)Is there a reason why I cannot use
graphql
in this function?The text was updated successfully, but these errors were encountered: