Bascially, what I need is , given a content path, e.g let's say a piece of content fragment built by Product Model.

Then I have another content fragement (let's say it is parent content fragement) built by a diff model called 'PageBody' , this parent content fragement includes that product content fragment.

Now I wish to build a graphql query, to retrieve all/any parents content fragement JSON that includes this product

graphql query:
query itemRefByPath($path:String!){
productByPath (_path: $path) {
item{
_path
}
_references {
... on ProductModel {
__typename
_path
}
... on PageRef {
_path
}
... on PageModel {
_path
}
... on PageBodyModel {
_path
}
... on TabModel {
_path
}
}
}
}
But as you can see, the references I got empty... Anyone could advise me what I have done wrong? Guess my graphql syntax got issue right? Please provide me some sample query code to help Thanks
You're trying to query by _path. The _path of child and parent can't be same. I would suggest putting in the schema of both and then asking your question