gql_client library

Classes

AddTypenameVisitor
BaseFragmentOptions
BaseQueryOptions
Cache
CacheProxy
Client
ClientOptions
HiveStore
DocumentNode-based GraphQL execution interface
MemoryStore
Query<T>
QueryRequest<T>
QueryResponse<T>
Encapsulates a GraphQL query/mutation response, with typed input and responses, and errors.
ReadFragmentOptions
ReadFragmentOptionsBuilder
ReadQueryOptions
ReadQueryOptionsBuilder
RequestSerializer
JSON Request serializer.
ResponseParser
JSON Response parser
TypePolicy
WriteFragmentOptions
WriteFragmentOptionsBuilder
WriteQueryOptions
WriteQueryOptionsBuilder

Enums

FetchPolicy

Typedefs

LinkFunction = Stream<Response> Function(Request request, [NextLink forward])
Link as a function [...]
LinkRouter = Link Function(Request request)
A function which returns a Link based on contents Request [...]
Type of the forward function
QueryResponseBuilder<T> = Widget Function(BuildContext context, QueryResponse<T> snapshot)
UpdateCacheHandler<T> = void Function(CacheProxy proxy, QueryResponse<T> response)
Update the cache after receiving a QueryResponse. Useful when merging mutation results that add items to a list, etc. Note: if a callback is provided, updateCache is also run immediately with the optimisticResponse.

Exceptions / Errors

LinkException
A base class for exceptions thrown by links
RequestFormatException
Exception occurring when a terminating link tries to serialize the request
ResponseFormatException
Exception occurring when a terminating link tries to parse the response
ServerException
Exception occurring when network fails or parsed response is missing both data and errors