Hi,
So this is my query :
{
allProducts {
edges {
node {
body {
... on ProductBodyProduct_description {
variation {
... on ProductBodyProduct_descriptionDefaultSlice {
primary {
title
price
}
items {
image
}
}
}
}
}
}
}
}
}
I grab all documents of type Product then I want to access the fields inside their "product_description" slice.
It works fine on GraphiQL where I get my data:
But in my program I get { data: null, loading: false, networkStatus: 7, stale: true }
. So not a 400 error but no data.
This is my program:
After some tests I figured that I get the data as long as I dont use union types. For example if I fetch all documents or just do:
{
allProducts {
edges {
node {
test
}
}
}
}
Then in my program I properly get:
{
data: {
allProducts: { edges: [Array], __typename: 'ProductConnectionConnection' }
},
loading: false,
networkStatus: 7,
stale: false
}
Any idea why it's not working as soon as I try to access my slice ?