Fix unpermitted params warnings in non-batched GraphQL queries
requested to merge ld-graphql-check-multiplex-without-triggering-unpermitted-params-warnings into master
What does this MR do and why?
Previously when the client sent through a non-multiplex query, the
#multiplex?
check led to Unpermitted parameters
warnings being
logged in development, as it performed the check through permitted_params
. In the case where the check should return false
,
we'd see the warnings.
This changes #multiplex?
to avoid those errors.
There should be no functional changes.
How to set up and validate locally
Tail your development log:
tail -f log/development.log
On master
branch locally, make a GraphQL query (you can use /-/graphql-explorer
):
{
currentUser {
id
}
}
You should see logged:
Unpermitted parameters: :query, :variables, :graphql
Unpermitted parameters: :query, :variables, :graphql
On this branch, the same query should not produce those errors.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Luke Duncalfe