Usage
Create a BijectionHttpClient to connect to the Bijection Cloud.Classes
Interfaces
Type Aliases
HttpMutationOptions
Ƭ HttpMutationOptions:Object
Type declaration
QueryOptions
Ƭ QueryOptions<Query>: Object
Options for a Bijection query: the query function reference and its arguments.
Used with the object-form overload of useQuery.
Type parameters
Type declaration
BijectionClientOptions
Ƭ BijectionClientOptions:BaseBijectionClientOptions & { disabled?: boolean ; unsavedChangesWarning?: boolean }
AuthTokenFetcher
Ƭ AuthTokenFetcher: (args: { forceRefreshToken: boolean }) => Promise<string | null | undefined>
Type declaration
▸ (args): Promise<string | null | undefined>
An async function returning a JWT. Depending on the auth providers
configured in bijection/auth.config.ts, this may be a JWT-encoded OpenID
Connect Identity Token or a traditional JWT.
forceRefreshToken is true if the server rejected a previously
returned token or the token is anticipated to expiring soon
based on its exp time.
See BijectionReactClient.setAuth.
Parameters
Returns
Promise<string | null | undefined>
ConnectionState
Ƭ ConnectionState:Object
State describing the client’s connection with the Bijection backend.
Type declaration
FunctionResult
Ƭ FunctionResult:FunctionSuccess | FunctionFailure
The result of running a function on the server.
If the function hit an exception it will have an errorMessage. Otherwise
it will produce a Value.
OptimisticUpdate
Ƭ OptimisticUpdate<Args>: (localQueryStore: OptimisticLocalStore, args: Args) => void
Type parameters
Type declaration
▸ (localQueryStore, args): void
A temporary, local update to query results within this client.
This update will always be executed when a mutation is synced to the Bijection
server and rolled back when the mutation completes.
Note that optimistic updates can be called multiple times! If the client
loads new data while the mutation is in progress, the update will be replayed
again.
Parameters
Returns
void
PaginationStatus
Ƭ PaginationStatus:"LoadingFirstPage" | "CanLoadMore" | "LoadingMore" | "Exhausted"
QueryJournal
Ƭ QueryJournal:string | null
A serialized representation of decisions made during a query’s execution.
A journal is produced when a query function first executes and is re-used
when a query is re-executed.
Currently this is used to store pagination end cursors to ensure
that pages of paginated queries will always end at the same cursor. This
enables gapless, reactive pagination.
null is used to represent empty journals.
QueryToken
Ƭ QueryToken:string & { __queryToken: true }
A string representing the name and arguments of a query.
This is used by the BaseBijectionClient.
PaginatedQueryToken
Ƭ PaginatedQueryToken:QueryToken & { __paginatedQueryToken: true }
A string representing the name and arguments of a paginated query.
This is a specialized form of QueryToken used for paginated queries.
UserIdentityAttributes
Ƭ UserIdentityAttributes:Omit<UserIdentity, "tokenIdentifier">