Currently in Faust, there is a 1-to-1 relationship from WordPress instance to Faust site. Let's build a POC to see if we can modify the Apollo client (either by modifying the implementation or using the plugin system) to support getting data from multiple WordPress backends.
Say for instance we have two WordPress sites:
WordPress Instance A
WordPress instance B
And I wanted all traffic from my app to get data from WordPress instance A, except for paths under /resources, in which I want data from WordPress instance B.
We may be able to modify the Apollo Client via the plugin system to check the incoming URL, and if it matches a certain format, add or modify the HttpLink set in the client:
import { HttpLink } from '@apollo/client';
const link = new HttpLink({
uri: "http://wp-instance-b.com/graphql
});
Acceptance Criteria
[ ] Prove we can do this
[ ] Create an architectural document for team to discuss to reach agreement
I've closed it as it is not something the team is currently working on nor is it anticipated that we will be able t resume the work on this ticket in the future.
Currently in Faust, there is a 1-to-1 relationship from WordPress instance to Faust site. Let's build a POC to see if we can modify the Apollo client (either by modifying the implementation or using the plugin system) to support getting data from multiple WordPress backends.
Say for instance we have two WordPress sites:
And I wanted all traffic from my app to get data from WordPress instance A, except for paths under
/resources
, in which I want data from WordPress instance B.We may be able to modify the Apollo Client via the plugin system to check the incoming URL, and if it matches a certain format, add or modify the
HttpLink
set in the client:Acceptance Criteria