PoC: Move persisted request processing to injectable class #303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is only an idea that I'd like to develop further but looking for a bit of feedback on approach.
the motivation comes from setting up https://github.com/apollographql/apollo-link-persisted-queries which seems to be a common client library to use for persisted queries. Currently, Controller.php expects any GET request with a persisted query ID to supply that as a query param named
id
. By default apollo-link-persisted-queries has a different structure (a param that looks like&extensions={"persistedQuery":{"version":1,"sha256Hash":"e2d83966...
)so the thought is to move the extraction of the query ID (and probably fetching the query from ID too) into an Injectable class so that different implementations can more easily created/added.
If this looks reasonable I can also move the default query/variable logic into a similar class and add one to support apollo-link-persisted-queries