AishwaryaEA
2 months agoHelper
Error while fetching products data using graphql query
I am trying to fetch products related data but getting below mentioned error.
Graphql:
query MyQuery {
products {
edges {
node {
name
description
id
}
}
}
}
Error:
{
"errors": [
{
"message": "The field at path '/products' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'ProductConnection' within parent type 'Query'",
"path": [
"products"
],
"extensions": {
"classification": "NullValueInNonNullableField"
}
}
],
"data": null
}
Can someone please help me out here ?
Thanks