addAuthToOperation() must be provided to add the custom authState
to an Operation's context, so that it may be picked up by the fetchExchange
.
didAuthError() may be provided to tweak the detection of an authentication error that this exchange should handle.
willAuthError() may be provided to detect a potential operation that'll receive authentication error so that getAuth() can be run proactively.
getAuth() handles how the application refreshes or reauthenticates given a stale authState
and should return a new authState
or null
.
The mutate() method may be used to send one-off mutations to the GraphQL API for the purpose of authentication.
Generated using TypeDoc
Extends the urql built in AuthConfig type with some helpers for writing/reading