-
-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance(stitch): introduce SubschemaSetConfig #1994
Conversation
to improve ergonomics of sharing endpoint details between subschemas
The latest changes of this PR are available as alpha in npm: Quickly update your package.json by running:
|
I see. So this structure is what computed field isolations would/should produce? Looks good, I like that there’s still just a single subschema. |
Yes, but now we don't even need a new type you can just return an array of SubschemaConfig objects. |
To share an endpoint and pool batching, just use identical object with endpoint details in the endpoint property of the members of the array instead of putting the endpoint details within the parent SubschemaConfig object. May make sense in v7 to make the endpoint details always be required to be within the endpoint property instead of parent object just for consistency, but I think small potatoes. |
I’m not familiar with how endpoint works yet... is it a new expectation that executor goes into endpoint to facilitate batching, and one needs to update their subschema config with this property to enable batching? |
Batching will work if executor in SubschemaConfig, but to enable batching across SubschemaConfigs, it must be a property of an endpoint object with the same object then used in multiple SubschemaConfig objects. See graphql-tools/packages/delegate/tests/batchExecution.test.ts Lines 107 to 135 in 6a2e5ab
|
Got it. Thanks!
…On Sat, Sep 5, 2020 at 8:05 PM Yaacov Rydzinski ***@***.***> wrote:
Batching will work if executor in SubschemaConfig, but to enable batching
across SubschemaConfigs, it must be a property of an endpoint object with
the same object then used in multiple SubschemaConfig objects. See
https://github.com/ardatan/graphql-tools/blob/6a2e5ab8a1efd4b7524437ee0be5a03d7f312b1e/packages/delegate/tests/batchExecution.test.ts#L107-L135
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1994 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFRROCWTNPSKBQB7ME44SLSELG4DANCNFSM4QW7ZDTA>
.
|
to improve ergonomics of sharing endpoint details between subschemas