Spectrum is now read-only. Learn more about the decision in our official announcement.


Free Open Source WordPress plugin that adds an extendable GraphQL Schema and API to your WordPress site


Multiple providers?

February 6, 2019 at 2:55pm

Multiple providers?

February 6, 2019 at 2:55pm
Bit out of scope perhaps, but just asking for your $0.02.
I'm planning a site which will be approximately:
WPGraphQL->Wordpress &
So, Next.js front end, pulling WP stuff via WPGraphQL and pulling Shopify stuff via either their Storefront API or the JS Buy SDK.
Assuming I can end up using the Shopify Storefront (GraphQL) API, would you say that the approach mentioned here (Gateway API: is the best way to structure things to let Apollo pull data from multiple providers?

February 6, 2019 at 9:38pm
I think the approach in that article works well. I've got one App that uses that approach and we haven't run into any major snags.

February 7, 2019 at 10:56am
I found someone else that just wraps another ApolloProvider around the first one: and uses an as prop I can't find much about.
And then there's also react-apollo-multiple-clients: ( which was made as a followup of that original Medium post.
Just to clarify: I don't know what the best way is, just sharing my findings.
that was my first thought, and it looks like the multiple client approach they've taken will indeed allow you to direct the right query to the right client. Thanks for sharing
Will give both of these a shot
If you get the first one to work, let me know! I didn't get far with the as prop.
I'm also wondering how this ties in with the Next.js's with-apollo example I'm using. It seems to extract the cache when using withApolloClient (

April 23, 2019 at 8:30am