Repository navigation
|
On https://www.youtube.com/watch?v=35kCTfYjoAg there is an explanation of how to deal with null results on non-null fields, but the spec proposal doesn't mention anything about that. Suppose you have a schema like type Book {
name: String!
price: Int
stock: Stock
}
type Stock {
new: StockEntry!
used: StockEntry!
}
type StockEntry {
warehouse1: Int!
warehouse2: Int!
}and a query like query {
books {
name
price
stock {
new {
warehouse1
... on StockEntry @defer {
warehouse2
}
}
used {
warehouse1
... on StockEntry @defer {
warehouse2
}
}
}
}
}What should happen if {
"path": ["books", 0, "stock", "used"],
"data": null
}Or should it keep track of the last nullable field in the path and return a reference to that instead, like {
"path": ["books", 0, "stock"],
"data": null
} |
Answered by
benjie
Aug 3, 2023
Replies: 1 comment
|
Hi, I think you're talking about incremental delivery so you should probably raise the question here: https://github.com/robrichard/defer-stream-wg/discussions (You may want to review the existing discussions to see if it has already been answered.) |
0 replies
Answer selected by
fiatjaf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I think you're talking about incremental delivery so you should probably raise the question here:
https://github.com/robrichard/defer-stream-wg/discussions
(You may want to review the existing discussions to see if it has already been answered.)