hasura / hasura/graphql-engine
Pre parse query modification
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.