-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Must provide query string.
should not be an error
#3284
Comments
We already have tests for our APQ plugin, and those tests don't have any |
I don't explicitly use Yoga, I use Mesh, which contains Yoga (if I were to believe the Mesh's error messages), so I believe I don't have access to the APQ plugin of Yoga in Mesh, although that would have been very awesome. Maybe I'm missing something and I can actually enable Yoga plugins in Mesh. I will create a minimal reproducing example and link a repo to it here. |
You don't need anything specific to do to use Yoga plugins in Mesh. All Yoga plugins can be used in Mesh either in declarative or programmatic ways;
plugins:
- apq: {} So all Envelop plugins are Yoga plugins while all Yoga plugins are Mesh plugins. They are extended versions of each. |
Thank you, I didn't know I could use the APQ plugin in Mesh directly. I tried it, and it works, the request passes through when I have Here is the reproduction repository: https://github.com/SivkovSavely/api-gate-mvp-repro |
Let's close this one then create an issue on Mesh because this looks like an issue with it :) Could you do that so we can track from there? |
Sure thing! Here it is. ardatan/graphql-mesh#6998 I'll close this one then |
Hi, I need GraphQL Mesh to support automatic persisted queries (APQs). For this I created a plugin that caches incoming queries by the supplied hash and executes these queries if the query parameter hasn't been passed in the body.
The problem I'm having is in Yoga, the query parameter is mandatory. If you don't pass
query
in the request body, it outputs an errorMust provide query string.
without letting any plugin to work. So I cannot even make a workaround in my own plugin, it starts parsing the request before any of the Envelop plugin methods are executed.Can you please either add some callbacks in Envelop (if so, I'll probably need to add a feature request in its repo?) or allow the missing query parameter somehow. Maybe allow missing
query
param if APQ's fields are present, likeextensions.persistedQuery.sha256Hash
or something.I've added a plugin source code if you need it for context (keep in mind it's a little messy because it's a prototype): https://gist.github.com/SivkovSavely/596cc1c40a53ab0b90bf9811f6333e31
Maybe the APQ support in Mesh can be a feature request on its own...
The text was updated successfully, but these errors were encountered: