This PR modifies the meta_query endpoint for the following:
Remove the additional authorization check against an execute role. Not having this permission effectively breaks the frontend for the user lacking it. A regular authorization check is already being done against the standard user roles.
Check whether any resolvers have data before running jq or jsonPath over the result.
Changes
Remove the checkAuthorization check from meta_query route.
Add an additional check to the graphql response to verify that at least some resolver value has data.
Notes
Checking for non-null data within the graphql response before post-processing the data might be an anti-pattern. This check could be programmed within the jq or jsonPath code. Needs revision.
Summary
This PR modifies the
meta_query
endpoint for the following:execute
role. Not having this permission effectively breaks the frontend for the user lacking it. A regular authorization check is already being done against the standard user roles.jq
orjsonPath
over the result.Changes
checkAuthorization
check frommeta_query
route.Notes
Checking for non-null data within the graphql response before post-processing the data might be an anti-pattern. This check could be programmed within the
jq
orjsonPath
code. Needs revision.