zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

How to migrate from 5.0.1 to 5.1.0? #1128

Closed Wizzel1 closed 2 years ago

Wizzel1 commented 2 years ago

I am testing my code with these stubs:

      when(
        () => graphQLHelper.query<dynamic>(
          query: GetNotesByAssessmentIdQuery.getNotesByAssessmentId,
          variables: <String, dynamic>{
            'id': assessmentId,
            'exerciseId': exerciseId,
            'userId': userId
          },
        ),
      ).thenAnswer(
        (_) => Future.value(
          QueryResult<dynamic>(
            data: jsonResponse,
            source: QueryResultSource.network,
            parserFn: (data) {},
          ),
        ),
      );

but I am getting an error when updating to 5.1.0.

The named parameter options is required.

I have tried to use a QueryOptions object but that requires a document.

So what kind of "options" do I have to provide in this case?