Skip to content

def resolve_xxx() causing missing 2 required positional #282

Closed
@TheBlusky

Description

@TheBlusky

Hello !
I just started to play with graphene-django, so it my be a dummy question.
I'm following the "getting started" guide, and want to filter my model, so I'm using the following code:

class Query(ObjectType):
    user = relay.Node.Field(UserNode)
    all_users = DjangoFilterConnectionField(UserNode)

    def resolve_all_users(self, args, context, info):
        return DashboardUser.objects.get(user=context.user).team

schema = Schema(query=Query)

However, I got the following error : TypeError: resolve_all_users() missing 2 required positional arguments: 'context' and 'info'

According to the documentation, I should use GraphQLView, and that is the case.

Is this a bug, or should I check something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions