mutate<TParsed> method

Future<QueryResult<TParsed>> mutate<TParsed>(
  1. MutationOptions<TParsed> options
)

This resolves a single mutation according to the MutationOptions specified and returns a Future which resolves with the QueryResult or throws an Exception.

If MutationOptions.refetchQueries is set, each listed QueryOptions is re-fetched on the network once the mutation settles without exceptions; MutationOptions.awaitRefetchQueries (default false) controls whether the returned future waits for those refetches.

Implementation

Future<QueryResult<TParsed>> mutate<TParsed>(
    MutationOptions<TParsed> options) async {
  final policies = defaultPolicies.mutate.withOverrides(options.policies);
  return await queryManager.mutate(options.copyWithPolicies(policies));
}