8base Create Apollo Client
The Apollo Client library contains an extended implementation of ApolloClient that includes several links to work with 8base services.
Table of Contents
Extends Apollo Client by 8base several links.
configObject The Apollo Client config.
config.uristring Endpoint of the GraphQl server.
config.getAuthStateFunction Used to retrieve authentication state.
config.getRefreshTokenParametersFunction Used to retrieve the refresh token parameters.
config.onAuthSuccessFunction Callback that is executed when an attempt to refresh authentication is successful.
config.onAuthErrorFunction? Callback which is executed when an attempt to refresh authentication fails.
config.onIdTokenExpiredFunction? Callback which is executed when id token is expired.
config.onRequestSuccessFunction? Callback which is executed when a request is successful.
config.onRequestErrorFunction? Callback which is executed when a request fails
config.extendLinksFunction? Function that extends standard array of links.
Returns any instance of the Apollo Client