Apollo
A fully-featured, production ready caching GraphQL client for every server or UI framework.
Usage
Run the following command in the plugin directoy:
Then in your boot function, pass the plugin like this:
Components
None.
Filters
This plugin provides complete flexibility to modify the apollo client. This is done by providing various filter hooks at different stages of store initialization.
plugin.apollo.config
This hook gives the ability to modify the plugin configurations.
Parameters:
Returns:
Example:
This example activates subscriptions in apollo client.
plugin.apollo.networkInterface
This hook gives the ability to hook into Apollo's network interface. A usecase can be to apply middlewares to it.
Parameters:
Returns:
API
ApolloPluginConfigs
This is the default configuration set that is used at boot time.
Properties
subscriptions
boolean [default: false] Activate subscriptionswsUri
string URI of websocket serversubscriptionClient
SubscriptionClientOptions SubscriptionClient params, if subscriptions are activatednetworkInterface
NetworkInterfaceOptions NetworkInterface paramsclient
ApolloClientOptions Apollo client params
ApolloPlugin
Extends Plugin
Main Apollo Plugin class.
Properties
getClient
Returns Apollo client
Returns ApolloClient
getSubscriptionClient
Returns Apollo's Subscription Client
Returns SubscriptionClient
Last updated