Skip to content
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

Allow passing fetcher/link options to delegateToSchema, transformSchema, and mergeSchemas #1165

Closed
yaacovCR opened this issue Jul 3, 2019 · 1 comment

Comments

@yaacovCR
Copy link
Collaborator

yaacovCR commented Jul 3, 2019

This would allow removing makeRemoteExecutableSchema and a layer of delegation. It would also facilitate sharing a link/cache between microservices, although still possible with present architecture.

@yaacovCR
Copy link
Collaborator Author

yaacovCR commented Jul 31, 2019

Live in graphql-tools-fork v6.2.0

https://www.npmjs.com/package/graphql-tools-fork

Implemented in mergeSchemas and transformSchema as specification of option bag including schema and remote options instead of just schema.

Implemented differently within delegateToSchema as addition of executor and subscriber properties that can modify the execution method, and a delegateToRemoteSchema that sets these properties to send the remote graphql request instead of executing against the schema. This more generic solution also allows library users to set these options for local schemas, for example, if aiming to use a custom root value or default field/type resolver when executing locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant