I've got a pretty simple query setup to run in one of my components that receives the source data from gatsby-node.js:
query ($handle: shopifyProductHandleQueryString_2!){
shopifyProduct(handle: $handle) {
title
descriptionHtml
handle
}
Every time I run it, Gatsby throws this error on every node:
Variable "$handle" got invalid value "xyz"; Expected type shopifyProductHandleQueryString_2 to be an object.
How can shopifyProductHandleQueryString_2! be both a string and an object at the same time? When I explore handle in GraphiQL, it looks to be an object of strings.
I can get the query above to work when I play with the GraphiQL query variables pane and feed it a handle object:
{
"handle": {
"eq": "my-term-here"
}
}
Output looks good when I simulate this object like this code just above, but my gatsby-node.js is sending a string back in my application so it bonks. What am I missing here?
Strange behavior using this plugin.
I've got a pretty simple query setup to run in one of my components that receives the source data from
gatsby-node.js
:Every time I run it, Gatsby throws this error on every node:
How can
shopifyProductHandleQueryString_2!
be both a string and an object at the same time? When I explorehandle
in GraphiQL, it looks to be an object of strings.I can get the query above to work when I play with the GraphiQL
query variables
pane and feed it ahandle
object:Output looks good when I simulate this object like this code just above, but my
gatsby-node.js
is sending a string back in my application so it bonks. What am I missing here?