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

Fix: Allow add external resolver #1131

Merged
merged 1 commit into from Feb 23, 2021

Conversation

sebsasto
Copy link
Contributor

Currently you cannot use an external resolver in DjangoListField. If you pass a resolver as a parameter in the Field definition it is ignored completely. This PR allows to pass the the resolver as an argument in the Field definition.

Example:

def external_resolver(parent, info, **args):
    return ...

class Query(graphene.ObjectType):
    all_xxx = DjangoListField(XXXType, resolver=external_resolver)

@sebsasto
Copy link
Contributor Author

@zbyte64 I added the test cases. Please let me know if it is ok

@zbyte64 zbyte64 closed this Feb 23, 2021
@zbyte64 zbyte64 reopened this Feb 23, 2021
Copy link
Collaborator

@zbyte64 zbyte64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the resolver argument work with DjangoListField 👍

@zbyte64 zbyte64 merged commit ea593b6 into graphql-python:main Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants