client
library
Classes
AuthLink
Simple header-based authentication link that adds headerKey : getToken()
to every request.
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
Context
A Context to be passed along with a Request .
ContextEntry
Entry in the Context .
DedupeLink
A Link to deduplicate Request s
DefaultPolicies
The default Policies to set for each client action.
ErrorLink
ErrorLink allows interception of GraphQL errors (using onGraphQLError )
and LinkException s (using onException ).
ErrorLocation
Location of a GraphQL error in the request document
FetchMoreOptions
options for fetchMore operations
Fragment
A fragment in a document , optionally defined by fragmentName
FragmentRequest
Cache access request of fragment with variables .
GraphQLCache
Optimistic GraphQL Entity cache with normalize
TypePolicy
support
and configurable store .
GraphQLClient
Universal GraphQL Client with configurable caching and link system.
modelled after the apollo-client
.
GraphQLDataProxy
A proxy to the normalized data living in our store.
GraphQLError
GraphQL Error returned if execution fails
GraphQLProtocol
ALL protocol supported by the library
GraphQLSocketMessage
Base type for representing a server-client subscription message.
GraphQLWebSocketChannel
HiveStore
HttpLink
A simple HttpLink implementation.
HTTP link headers
HttpLinkResponseContext
HTTP link Response Context
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.
InMemoryStore
Simplest possible Map -backed store
JsonSerializable
Link
DocumentNode
-based GraphQL execution interface
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 <TParsed >
MutationCallbackHandler <TParsed >
Handles execution of mutation update
, onCompleted
, and onError
callbacks
MutationOptions <TParsed extends Object ? >
ObservableQuery <TParsed >
An Observable/Stream-based API for both queries and mutations.
Operation
An operation in a document , optionally defined by operationName
PassthroughLink
PingMessage
Policies
Container for supplying fetch , error , and cacheReread policies.
PongMessage
QueryCallbackHandler <TParsed >
Handles execution of query callbacks
QueryManager
QueryOptions <TParsed extends Object ? >
Query options.
QueryPayload
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.
QueryResult <TParsed extends Object ? >
A single operation result
Request
Execution request of an operation with variables .
RequestExtensionsThunk
Exposes Request extensions
RequestSerializer
JSON Request serializer.
Response
Execution response
ResponseExtensions
Extensions returned with the response
ResponseParser
JSON Response parser
SocketClient
Wraps a standard web socket instance to marshal and un-marshal the server /
client payloads into dart object representation.
SocketClientConfig
SocketSubProtocol
All the protocol supported by the library
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 .
Store
Raw key-value datastore API leveraged by the Cache
SubscribeOperation
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.
SubscriptionListener
SubscriptionNext
SubscriptionOptions <TParsed extends Object ? >
TerminateOperation
The client sends this message to terminate the connection.
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 <TParsed extends Object ? >
WebSocketLink
A Universal Websocket Link implementation to support the websocket transport.
It supports subscriptions, query and mutation operations as well.
Typedefs
ContextUpdater <T >
= T Function(T entry )
DeepEqualsFn
= bool Function(dynamic a , dynamic b )
ErrorHandler
= Stream <Response > ? Function(Request request , NextLink forward , Response response )
A handler of GraphQL errors.
ExceptionHandler
= Stream <Response > ? Function(Request request , NextLink forward , LinkException exception )
A handler of Link Exceptions.
GetInitPayload
= FutureOr Function()
GetRequestExtensions
= dynamic Function(Request request )
HttpResponseDecoder
= FutureOr <Map <String , dynamic > ? > Function(Response httpResponse )
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
NextLink
= Stream <Response > Function(Request request )
Type of the forward
function
OnData <TParsed >
= FutureOr <void > Function(QueryResult <TParsed > ? result )
Side effect to register for execution when data is received
OnError
= FutureOr <void > Function(OperationException ? error )
OnException
= FutureOr <String > Function(HttpLinkServerException exception )
OnMutationCompleted
= FutureOr <void > Function(Map <String , dynamic > ? data )
OnMutationUpdate <TParsed >
= FutureOr <void > Function(GraphQLDataProxy cache , QueryResult <TParsed > ? result )
OnQueryComplete
= FutureOr <void > Function(Map <String , dynamic > ? data )
OnQueryError
= FutureOr <void > Function(OperationException ? error )
UpdateQuery
= Map <String , dynamic > ? Function(Map <String , dynamic > ? previousResultData , Map <String , dynamic > ? fetchMoreResultData )
merge fetchMore result data with earlier result data
VariableEncoder
= Object Function(Object t )
WebSocketConnect
= FutureOr <WebSocketChannel > Function(Uri uri , Iterable <String > ? protocols )
A definition for functions that returns a connected WebSocketChannel