typed_links library Null safety

Classes

Adds __typename to each node of the operation.
BinaryReader
The BinaryReader is used to bring data back from the binary format on the disk.
BinaryWriter
The BinaryWriter is used to encode data to the binary format.
Box<E>
Boxes contain all of your data. In the browser, each box has its own IndexedDB database. On all other platforms, each Box is stored in a separate file in the Hive home directory. [...]
BoxBase<E>
Boxes contain all of your data. In the browser, each box has its own IndexedDB database. On all other platforms, each Box is stored in a seperate file in the Hive home directory. [...]
BoxEvent
A event representing a change in a box.
Cache
CacheProxy
Provides an interface for interacting with the Cache from within UpdateCacheHandlers. [...]
A terminating link that fetches the operation from the Cache, mapping the result to an OperationResponse.
Catches Exceptions in the link chain and converts them into data. [...]
A terminating link that resolves an operation from the link or the cache based on the OperationRequest.fetchPolicy, possibly caching the response
FieldFunctionOptions
FieldPolicy<TExisting, TIncoming, TReadResult>
FragmentRequest<TData, TVars>
A terminating link which defers execution to the provided gql_link, mapping the result to an OperationResponse. [...]
HiveAesCipher
Default encryption algorithm. Uses AES256 CBC with PKCS7 padding.
HiveCipher
Abstract cipher can be implemented to customize encryption.
HiveCollection<E extends HiveObjectMixin>
List containing HiveObjectMixins.
HiveField
Annotate all fields you want to persist with HiveField.
HiveInterface
The main API interface of Hive. Available through the Hive constant.
HiveList<E extends HiveObjectMixin>
Allows defining references to other HiveObjectMixins.
HiveObject
HiveType
Annotate classes with HiveType to generate a TypeAdapter.
LazyBox<E>
LazyBoxes don't keep the values in memory like normal boxes. Each time a value is read, it is loaded from the backend.
DocumentNode-based GraphQL execution interface
MemoryStore
Caches mutations in a hive box when offline and re-runs them when re-connected. [...]
OperationRequest<TData, TVars>
OperationResponse<TData, TVars>
Encapsulates a GraphQL operation's response, with typed input and responses, and errors.
Returns the response stream from the next link in the chain, immediately emitting a response with the optimistic data.
Allows multiple requests to be made by adding requests to the requestController. [...]
RequestSerializer
JSON Request serializer.
ResponseParser
JSON Response parser
Store
TypeAdapter<T>
Type adapters can be implemented to support non primitive values.
A fully typed implementation of gql_link
TypePolicy
TypeRegistry
TypeRegistries contain the TypeAdapters associated with a typeId. [...]
Runs any specified UpdateCacheHandlers with a CacheProxy when [...]

Mixins

HiveObjectMixin
Extend HiveObject to add useful methods to the objects you want to store in Hive

Properties

Hive HiveInterface
Global constant to access Hive.
final

Enums

DataSource
FetchPolicy

Typedefs

CompactionStrategy = bool Function(int entries, int deletedEntries)
A function which decides when to compact a box.
FieldMergeFunction<TExisting, TIncoming> = TExisting Function(TExisting existing, TIncoming incoming, FieldFunctionOptions options)
FieldReadFunction<TExisting, TReadResult> = TReadResult Function(TExisting existing, FieldFunctionOptions options)
KeyComparator = int Function(dynamic key1, dynamic key2)
LinkExceptionHandler<TData, TVars> = void Function(OperationResponse<TData, TVars> response, EventSink<OperationResponse<TData, TVars>> sink)
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
HiveError
An error related to Hive.
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