enisdenjo / graphql-composite

Spec agnostic GraphQL composite schema planner, executor and explainer.
MIT License
7 stars 0 forks source link

Resolve fields not available in parent resolver #17

Closed enisdenjo closed 2 months ago

enisdenjo commented 6 months ago

If resolver A has a child resolver B that needs a field which cannot be resolved by A, create a new mid-resolver C that resolves the necessary field after A but before B.

https://github.com/enisdenjo/graphql-composite/blob/e4178539bc1b620cc47374d1d73b0d378b803cc4/src/gather.ts#L374-L390