This, in combination with https://github.com/apollographql/apollo-client/pull/11615 would make it possible to inject functionality into the @apollo/client hooks, so it wouldn't matter if users used the @apollo/client hooks, or the hooks from this package.
That has one clear downside, though:
This is a side effect that pulls all the hooks into the bundle - tree shaking of the hooks would become impossible.
It might very well be worth it, though 🤔
As an alternative, we could export set up functions for all the hooks and introduce people to execute those set up functions, which would circumvent that, but creates more friction.
This, in combination with https://github.com/apollographql/apollo-client/pull/11615 would make it possible to inject functionality into the
@apollo/client
hooks, so it wouldn't matter if users used the@apollo/client
hooks, or the hooks from this package.That has one clear downside, though: This is a side effect that pulls all the hooks into the bundle - tree shaking of the hooks would become impossible.
It might very well be worth it, though 🤔
As an alternative, we could export
set up
functions for all the hooks and introduce people to execute those set up functions, which would circumvent that, but creates more friction.