HOWEVER, Gatsby gives me the ability to run GraphQL also through GraphiQL on http://localhost:8000/___graphiql and this is where my discrepancies begin...
Here is the successful GraphQL query on Gatsby which I run through GraphiQL:
query MyQuery {
allStrapiProduct(filter: {featured: {eq: true}}) {
edges {
node {
name
strapiId
variants {
price
qty
product
}
}
}
}
}
Here I am trying to run the GraphQL query through my Strapi backend server via the standard GraphQL playground on http://localhost:1337/graphql so that I can include it within my NextJS project:
Please help get this GraphiQL query and all the other GraphiQL queries I ran through Gatsby to work via NextJS!
I believe your two GraphQL servers are serving different schemas. That is, while allStrapiProduct
works in GraphiQL, you need to use product
in strapi. Likewise, filter
in GraphiQL but where
in strapi.