writeQuery abstract method

void writeQuery(
  1. Request request, {
  2. required Map<String, dynamic> data,
  3. bool? broadcast,
})

Writes a GraphQL query to the root query id, then broadcast changes to watchers unless broadcast: false

normalize the given data into the cache using graphql metadata from request. Conceptually, this can be thought of as providing a manual execution result in the form of data

For complex normalize type policies that involve custom reads, optimistic will be the default.

Will throw a PartialDataException if the data structure doesn't match that of the request operation.document, or a CacheMisconfigurationException if the write fails for some other reason.

Implementation

void writeQuery(
  Request request, {
  required Map<String, dynamic> data,
  bool? broadcast,
});