Describe the issue
Can't query when using useGETForQueries: true on HTTPLink. I've tried this with multiple endpoints. These endpoints work fine when I test them out using the JS Apollo Client with the same setting. If you disable the setting, the query executes with no issues.
To Reproduce (MUST BE PROVIDED)
import 'package:flutter/material.dart';
import 'package:graphql_flutter/graphql_flutter.dart';
void main() async {
final HttpLink httpLink = HttpLink(
'https://countries.trevorblades.com', // Public endpoint
useGETForQueries: true
);
final AuthLink authLink = AuthLink(
getToken: () async => null,
);
final Link link = authLink.concat(httpLink);
ValueNotifier<GraphQLClient> client = ValueNotifier(
GraphQLClient(
link: link,
// The default store is the InMemoryStore, which does NOT persist to disk
cache: GraphQLCache(),
),
);
final value = await client.value.query(QueryOptions(
document: gql('''
query{
countries{
code
}
}
''')
));
print(value);
runApp(const MyApp());
}
Expected behavior
Should work.
device / execution context
Pixel 6 Emulator on Android S
Also tried Flutter Web using Chrome, same result.
Looks like a server error? response {errors: [{message: Cannot read properties of undefined (reading 'operation'), extensions: {code: INTERNAL_SERVER_ERROR}}]}))
Describe the issue Can't query when using useGETForQueries: true on HTTPLink. I've tried this with multiple endpoints. These endpoints work fine when I test them out using the JS Apollo Client with the same setting. If you disable the setting, the query executes with no issues.
To Reproduce (MUST BE PROVIDED)
Expected behavior Should work.
device / execution context Pixel 6 Emulator on Android S Also tried Flutter Web using Chrome, same result.
Other useful/optional fields
Here is what the debug console prints out:
QueryResult(source: QueryResultSource.network, data: null, context: Context({}), exception: OperationException(linkException: ServerException(originalException: null, originalStackTrace: null, parsedResponse: Response(data: null, errors: [GraphQLError(message: Cannot read properties of undefined (reading 'operation'), locations: null, path: null, extensions: {code: INTERNAL_SERVER_ERROR})], context: Context({ResponseExtensions: Instance of 'ResponseExtensions'}), response {errors: [{message: Cannot read properties of undefined (reading 'operation'), extensions: {code: INTERNAL_SERVER_ERROR}}]})), graphqlErrors: []), timestamp: 2023-03-09 12:04:03.581)
screenshots
additional context
additional notes