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

Add extension hooks to proxy resolvers #34

Open
rafalp opened this issue Jul 20, 2023 · 0 comments
Open

Add extension hooks to proxy resolvers #34

rafalp opened this issue Jul 20, 2023 · 0 comments
Labels
enhancement New feature or request prio: low Low priority

Comments

@rafalp
Copy link
Contributor

rafalp commented Jul 20, 2023

Proxy resolvers resolve values using following operations:

  • __call__
  • proxy_query_with_cache
  • proxy_query
  • get_field_data

This resolver class could support extension hooks using API inspired by GraphQL middlwares:

async def proxy_resolver_middleware(resolve, obj, info, **kwargs):
   ...


resolver = ProxyResolver(middleware=proxy_resolver_middleware)

Those custom middleware would let devs extend existing resolver's logic without a need for extending base class.

@rafalp rafalp added enhancement New feature or request prio: low Low priority labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio: low Low priority
Projects
None yet
Development

No branches or pull requests

1 participant