onSubscribe abstract method

FutureOr<Object?> onSubscribe(
  1. String id,
  2. String query, {
  3. Map<String, dynamic>? variables,
  4. String? operationName,
  5. Map<String, dynamic>? extensions,
})

Runs the operation id of the subscribe payload: its query, variables, operationName and extensions.

Returns the data of a query or mutation, or a Stream of execution results ({'data': ...}, with 'errors' if any) of a subscription, as GraphQL.parseAndExecute does. A GraphQLException it throws is sent as an error message.

Implementation

FutureOr<Object?> onSubscribe(
  String id,
  String query, {
  Map<String, dynamic>? variables,
  String? operationName,
  Map<String, dynamic>? extensions,
});