You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Is your question that you're getting an error trying to modify the query in a plugin with pre-parse?
Yes, although the docs say it's not possible. At the end, I've found a way to modify the query to filter data access through roles and session variables.
Still, it'd be great to have such a feature: modify the query through the plugin.
Component
GraphQL Engine
Is your proposal related to a problem?
I'm developing a data API where users could query data from X days.
Free: last day
Paid: las year
Paid pro: full historical
Describe the solution you'd like
Ideally, I'd like to apply the filters based on user role, which could be done through model permissions.
But now that I have tried plugins and see the many and great applications that can be applied by modifying the internal data prior to parse.
Describe alternatives you've considered
I've considered working it out with hasura model permission, but you can't put PostgreSQL literal, like now() - interval '1 year'.
So I went on to try plugins to modify the query on pre parse query,but it's giving errors because 204 doesn't allow modifications.
They also mention it here: https://hasura.io/blog/introducing-plugins-for-hasura-ddn-an-easy-modular-framework-to-customize-your-api
The text was updated successfully, but these errors were encountered: