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