-
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
GraphQL query with variable #2922
Comments
Could you try upgrading to the latest version of |
Nice, that should help in future. This is what I get.
|
oh right, with an all* entry object, you need to add "filter" first. Your query will work if you change BTW, highly recommend getting very familiar with Graphiql if you're not already — you can copy queries into it and play around with its autocomplete to understand what you're supposed to do. |
Yeah, I do need to get more familiar with GraphQL, this is the first time I've used it.
|
Oh. Appears I spoke to soon. The above query was only returning data as it was cached. If update the query and manually include my slug, the query works and cache is populated again.
|
Hmmm, it just started working this morning. Not sure what has changed. Gatsby development server has been stopped and started (in fact my machine has too as this issue spanned a couple of days). I did delete my cache, trying to debug another issue. I seem to run into this type of issue a lot. Probably just me not understanding something, but will keep an eye on it. |
I've switched to gatsby from next.js and start to regret it a bit. It's like 6 hours now I'm fighting exactly this issue. I'm having query like
and if I change even name of the query, my server crashes. |
This code works for me. |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
I've been stuck on this for a while and cannot see what is wrong, any pointers most welcome.
In short I am trying to create some pages from some data returned from prismic.
Following the guidelines in part four of the tutorial I have this in
gatsby-node.js
.And this
This works as expected. Now in my template I have this.
This also works (as in, data is defined) BUT this was just to prove the query works. Since here I have queried by type and will of course return all articles, and not just the one that matches the slug.
But now, if I update the query to filter by the slug....
Then I get a build time GraphQL compilation error.
I cannot see what is wrong. I've tried several formats for the query and none compile.
Also, the query is exactly the same as in the tutorial, which does work on my machine.
Any suggestions where to start looking?
Oh and is this the best place to ask this kind of question?
The text was updated successfully, but these errors were encountered: