Replies: 1 comment
-
delegateToSchema is a low level function used with schema wrapping and stitching. In those contexts, either everything is being delegated to a single schema (wrapping) or the gateway schema smartly delegates to the correct schema (stitching). The function filters out extraneous fields at the lower level, because no “mistaken” delegations are truly possible. or to put it another way, part of the use case of the function is to allow the wrapping or gateway schema to contain extra fields that the subschema does not know about, and the function must filter these out, or the burden of doing so would just shift to the caller. what is your broader use case that you want this filtering to be skipped? certainly it is possible for a more efficient architecture to skip the filtering step if the request is prefiltered by the caller. A pr with that behavior would be welcome |
Beta Was this translation helpful? Give feedback.
-
If i use
delegateToSchema
with a query that contains fields that do not exist in the subschema being used what is the expected behavior? Are the fields just ignored? Can i configure options that will throw errors?At the moment
delegateToSchema
returns the fields the subschema knows about and i'm a bit surprised that it works. I was expecting an error.Beta Was this translation helpful? Give feedback.
All reactions