Open dotansimha opened 2 years ago
it is totally possible, that an object type has a __User
or __Node
field. Maybe we should use symbols instead?
sdk.query({
search({ term: ".." }) => ({
[sdk.type.User]: { name: true),
[sdk.type.Node]: { id: true }
})
})
Alternative API with spread usage that "resembles" inline fragment spreads within graphql documents.
sdk.query({
search({ term: ".." }) => ({
...sdk.on.User({ name: true }), // this function resturns { [sdk.type.User]: { name: true } }
...sdk.on.Node({ id: true })
})
})
for union/interface:
Goals:
TypedDocumentNode
based on the dynamic selection.