graphql library

Classes

BaseOptions
Base options.
Cache
ConnectionAck
The server will send this acknowledgment message after receiving the init command from the client if the init was successful.
ConnectionError
The server will send this error message after receiving the init command from the client if the init was not successful.
ConnectionKeepAlive
The server will send this message to keep the connection alive
DefaultPolicies
The default Policies to set for each client action
ErrorResponse
FetchMoreOptions
options for fetchmore operations
FetchResult
GraphQLClient
The link is a Link over which GraphQL documents will be resolved into a FetchResult. The cache is the initial Cache to use in the data store.
GraphQLError
A GraphQL error (returned by a GraphQL server).
GraphQLSocketMessage
Base type for representing a server-client subscription message.
InitOperation
After establishing a connection with the server, the client will send this message to tell the server that it is ready to begin sending new subscription queries.
InMemoryCache
JsonSerializable
LazyCacheMap
A LazyDereferencingMap into the cache with added cacheState information
LazyDereferencingMap
A simple map wrapper that lazily dereferences using dereference [...]
Location
A location where a GraphQLError appears.
MessageTypes
These messages represent the structures used for Client-server communication in a GraphQL web-socket subscription. Each message is represented in a JSON format where the data type is denoted by the type field. A list of constants used for identifying message types
MultiSourceResult
MutationCallbacks
MutationOptions
Mutation options
NormalizedInMemoryCache
Operation
OptimisticCache
OptimisticPatch
OptimisticProxy
Policies
QueryManager
QueryOptions
Query options.
QueryResult
SocketClient
Wraps a standard web socket instance to marshal and un-marshal the server / client payloads into dart object representation. [...]
SocketClientConfig
StartOperation
A message to tell the server to create a subscription. The contents of the query will be defined by the payload request. The id provided will be used to tag messages such that they can be identified for this subscription instance. id values should be unique and not be re-used during the lifetime of the server.
StopOperation
Tell the server to stop sending subscription data for a particular subscription instance. See StartOperation.
SubscriptionComplete
Server message to the client to indicate that no more data will be sent for a particular subscription instance.
SubscriptionData
Data sent from the server to the client with subscription data or error payload. The user should check the errors result before processing the data value. These error are from the query resolvers.
SubscriptionError
Errors sent from the server to the client if the subscription operation was not successful, usually due to GraphQL validation errors.
SubscriptionRequest
Represent the payload used during a Start query operation. The operationName should match one of the top level query definitions defined in the query provided. Additional variables can be provided and sent to the server for processing.
UnknownData
Not expected to be created. Indicates there are problems parsing the server response, or that new unsupported types have been added to the subscription implementation.
WatchQueryOptions
A Universal Websocket Link implementation to support the websocket transport. It supports subscriptions, query and mutation operations as well. [...]

Properties

eagerSources → Set<QueryResultSource>
final

Functions

coalesceErrors({List<GraphQLError> graphqlErrors, ClientException clientException, OperationException exception}) OperationException
(graphqlErrors?, exception?) => exception? [...]
execute({Link link, Operation operation}) → Stream<FetchResult>
gql(String query) DocumentNode
Parse GraphQL query strings into the standard GraphQL AST.
shouldRespondEagerlyFromCache(FetchPolicy fetchPolicy) → bool
shouldStopAtCache(FetchPolicy fetchPolicy) → bool
translateFailure(dynamic failure) ClientException
typenameDataIdFromObject(Object object) → String
unwrap(Object possibleLazyMap) → Object
Unwrap a given Object that could possibly be a lazy map
unwrapMap(Map<String, Object> possibleLazyMap) → Map<String, Object>
Unwrap a given mpa that could possibly be a lazy map

Enums

CacheState
ErrorPolicy
ErrorPolicy determines the level of events for errors in the execution result. The options are: [...]
FetchPolicy
FetchPolicy determines where the client may return a result from. The options are: [...]
QueryResultSource
The source of the result data contained [...]
SocketConnectionState

Typedefs

CacheTransform(Cache proxy) Cache
DataIdFromObject(Object node) → String
Dereference(Object node) → Object
ErrorHandler(ErrorResponse) → void
GetToken() → FutureOr<String>
Normalizer(Object node) → List<String>
OnError(OperationException error) → void
OnMutationCompleted(dynamic data) → void
OnMutationUpdate(Cache cache, QueryResult result) → void
RequestHandler(Operation operation, [NextLink forward]) → Stream<FetchResult>
UpdateQuery(dynamic previousResultData, dynamic fetchMoreResultData) → dynamic
merge fetchMore result data with earlier result data

Exceptions / Errors

CacheMissException
A failure to find a key in the cache when cacheOnly=true
ClientCacheException
ClientException
NetworkException
NormalizationException
A failure during the cache's entity normalization processes
OperationException
UnhandledFailureWrapper