Should we create multiple instances of ApolloClient in our app

We are using ApolloClient in our mobile app.

Is it a good idea to have multiple instances of ApolloClient via:
new ApolloClient, given to different ApolloProvider used within our app. Some screens live in separate codebase.
This is because the apollo client singleton management becomes tricky.

Is there any suggestion here?

Hi :wave:. Unless you have different parameters (Http interceptors, endpoint url, etc…), it is usually recommended to use a single ApolloClient. Using multiple instances will work too but will end up using more ressources.

Thanks for the reply :wave:

1 Like