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

Move from graphql-middleware to Resolvers Composition #1476

Open
Tracked by #1485
dimatill opened this issue Oct 28, 2022 · 4 comments
Open
Tracked by #1485

Move from graphql-middleware to Resolvers Composition #1476

dimatill opened this issue Oct 28, 2022 · 4 comments
Milestone

Comments

@dimatill
Copy link
Collaborator

Resolvers Composition is a small, well maintained, and well tested package being part of graphql-tools

@dimatill dimatill added this to the v8 milestone Oct 29, 2022
@mattkrick
Copy link

This would be amazing!
I love graphql-shield, but do not use graphql-middleware.
Resolver composition is nice but I do not like it's dot notation for naming. Your nested objects API is much cleaner & easier for typesafety when combined with codegen.

I'd be happy to write a PR for this if you'd like. It's only about 60 LOCs: https://github.com/ParabolInc/parabol/blob/fa767a6f719cec03a966d41cc45d1a077a1857fb/packages/server/graphql/composeResolvers.ts#L27-L91

@dimatill
Copy link
Collaborator Author

dimatill commented Dec 4, 2022

thank you @mattkrick ! I'll check it!

@dimatill
Copy link
Collaborator Author

dimatill commented Dec 7, 2022

Hi @mattkrick ! Looks like I'm doing something similar to what you've mentioned, using Resolvers Composition, preserving Fragments functionality, and solving the problem you've mentioned in your code about Permissions don't get applied to fields that don't have custom resolvers.

Please take a look at the draft PR, maybe you could share some thoughts about it

@mattkrick
Copy link

looks good! i didn't realize the stock composeResolvers handlers a ruleTree using nested object notation instead of dot notation. It'll be great to have 1 less dependency!

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

2 participants