For some reason, a query in GraphiQL that returns a block of JSON data simply returns a 9-digit number.
const query = graphql`
query allPrismicCaseStudy {
edges {
node {
uid
}
}
}
`;
returns 348885080
const query = graphql`
query{
site{
port
}
}
`;
returns 3416814672
I am using the hello world starter. Whitespace seems to impact the number's output
Can you paste entire file snippet? Do you by any chance try to use query variable directly? This won't contain data, but hash of the query content (used internally by gatsby)
That appears to be the issue.
I'm experiencing same issue. Pretty much same query returns 9-digit number. Is there any update on this?
Same issue here!
@PieterT2000 , @onderbakirtas , just faced with the same issue.
But fixed this, it was mistake in my code!
From docs: https://www.gatsbyjs.com/docs/page-query/
Below the HomePage component declaration, export a new constant called query. The name of the constant isn鈥檛 important, as Gatsby looks for an exported graphql string from the file rather than a specific variable. Note that you can only have one page query per file.
Hope, this will be useful.
@PieterT2000 , @onderbakirtas , just faced with the same issue.
But fixed this, it was mistake in my code!
From docs: https://www.gatsbyjs.com/docs/page-query/Below the HomePage component declaration, export a new constant called query. The name of the constant isn鈥檛 important, as Gatsby looks for an exported graphql string from the file rather than a specific variable. Note that you can only have one page query per file.
Hope, this will be useful.
Thanks for taking time to answer it. I have solved it just like you. Mistakes here to be made.