-
Hi! Given this schema: type Query {
product(id: ID!): Product
}
type Product {
id: ID!
description: String
} This query: query ProductById {
product(id: "0") {
id
... on Product @defer {
description
}
}
} could return: Payload 1{
"data": {
"product": {
"id": "0"
}
},
"hasNext": true
} Payload 2{
"data": {
"label": "Product 0"
},
"path": [ "product" ],
"hasNext": false
} But could the response be of this form: Payload 1same as above Payload 2{
"data": {
"product": {
"label": "Product 0"
}
},
"hasNext": false
} ? In other words, should subsequent payloads always be rooted at the path where the related |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm reasonably sure based on my understanding of the spec that only the first version is correct — but I think the spec should have some more examples/clarity to be explicit that subsequent payloads are always "here's a subtree with the place to splice it in" and not "here's some more tree, rooted at the top, to be merged in". |
Beta Was this translation helpful? Give feedback.
I'm reasonably sure based on my understanding of the spec that only the first version is correct — but I think the spec should have some more examples/clarity to be explicit that subsequent payloads are always "here's a subtree with the place to splice it in" and not "here's some more tree, rooted at the top, to be merged in".