ferry library

Classes

Cache
Client
FetchPolicy
FieldFunctionOptions
FieldPolicy<TExisting, TIncoming, TReadResult>
FragmentRequest<TData, TVars>
JsonOperationRequest
A OperationRequest that parses the response into a Map<String, dynamic> this is useful for when you don't have a generated class for the operation or as an escape hatch for when you want to parse the response yourself.
DocumentNode-based GraphQL execution interface
MemoryStore
OperationRequest<TData, TVars>
OperationResponse<TData, TVars>
Encapsulates a GraphQL operation's response, with typed input and responses, and errors.
RequestSerializer
JSON Request serializer.
ResponseParser
JSON Response parser
Store
A fully typed implementation of gql_link
TypedLinkWithCacheAndRequestController
TypePolicy

Enums

DataSource
OperationType
Enumeration of all known GraphQL operation types.

Functions

jsonMapEquals(Object? a, Object? b) bool
compare two json-like objects for equality parameters must be either null, num, bool, String or a List or Map of these types this is an alternative too DeepCollectionEquality().equals, which is very slow and has O(n^2) complexity

Typedefs

FieldMergeFunction<TExisting, TIncoming> = TExisting Function(TExisting existing, TIncoming incoming, FieldFunctionOptions options)
FieldReadFunction<TExisting, TReadResult> = TReadResult Function(TExisting existing, FieldFunctionOptions options)
JsonEquals = bool Function(Object? a, Object? b)
a function that compares two json-like maps for deep equality more performant alternative to DeepCollectionEquality which has O(n^2) time complexity (where n is the level of nesting) but also very slow on flat maps
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
Type of the forward function
TypedLinkFunction = Stream<OperationResponse<TData, TVars>> Function<TData, TVars>(OperationRequest<TData, TVars> request, [NextTypedLink<TData, TVars>? forward])
TypedLink as a function
TypedLinkRouter<TData, TVars> = TypedLink Function(OperationRequest<TData, TVars> request)
A function which returns a TypedLink based on contents of request
UpdateCacheHandler<TData, TVars> = void Function(CacheProxy proxy, OperationResponse<TData, TVars> response)
Updates the cache after receiving an OperationResponse.

Exceptions / Errors

ContextReadException
Exception occurring when reading from the context
ContextWriteException
Exception occurring when writing to the context
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
TypedLinkException
A base class for exceptions thrown by TypedLinks