8base Create Apollo Client
The Apollo Client library contains extended ApolloClient with several links to work with 8base services.
EightBaseApolloClient
Table of Contents
EightBaseApolloClient
Extends ApolloClient
Extended Apollo Client by 8base several links.
Parameters
config
Object The Apollo Client config.
config.uri
string Endpoint of the GraphQl server.config.getAuthState
Function The function which are using to get auth state.config.getRefreshTokenParameters
Function The function which are using for get refresh token parameters.config.onAuthSuccess
Function The callback which called when attempt to refresh authentication is success.config.onAuthError
Function? The callback which called when attempt to refresh authentication is failed.config.onIdTokenExpired
Function? The callback which called when id token is expired.config.onRequestSuccess
Function? The callback which called when request is success.config.onRequestError
Function? The callback which called when request is fail.config.extendLinks
Function? Function to extend standart array of the links.
Returns any instance of the Apollo Client