1

I have the following schema:

class Query(graphene.ObjectType):
    all_questionnaires = DjangoFilterConnectionField(QuestionnaireType)

I got the error when running the tests

TypeError: Query fields cannot be resolved. The type QuestionnaireType doesn't have a connection

What can be?

Rodrigo
  • 135
  • 4
  • 45
  • 107

1 Answers1

2

You probably need to define a Connection, because for graphene>=2 it is not done implicitly.

class QuestionnaireConnection(graphene.relay.Connection):
    class Meta:
        node = QuestionnaireType
jorzel
  • 1,216
  • 1
  • 8
  • 12