Authenticating queries in Django Graphene custom nodes with filters and connections?

55 Views Asked by At

I'm working on a Django project using Graphene for GraphQL API implementation. I have a custom node called PoemNode which extends DjangoObjectType. I want to authenticate queries made to this node and also include filtering and pagination capabilities using filterset_class and connection_class respectively.

I have already set up the authentication backend in Django and have the necessary packages installed. However, I'm unsure how to integrate the authentication logic into my custom node and how to use the filterset_class and connection_class for querying.

class PoemNode(DjangoObjectType):
    class Meta:
        model = Poem
        interfaces = (Node,)
        filterset_class = PoemFilter
        connection_class = CountableConnectionBase

Can anyone guide me on how to authenticate queries for the PoemNode and utilize the filterset_class and connection_class for querying with filtering and pagination capabilities?

Thank you in advance for your help!

0

There are 0 best solutions below