hasura / hasura/graphql-engine

Add more lifecycle hooks

Open
#7,685 0 comments 3 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?
Currently it is hard to hook into hasura's execution pipeline. Only option now is the authentication hook, however it is limited and not always necessary (using JWT).

### Describe the solution you'd like
More possible hooks to be added to hook into the execution of the graphql queries/mutations
A good starting point is to have these kind of hooks: https://github.com/mercurius-js/mercurius/blob/master/docs/hooks.md#preexecution, especially the pre-execute hook seems useful. You can do several things such as query cost calculation, caching, rejecting query, extending the query, validate mutation input etc

### Describe alternatives you've considered
Using a reverse graphql proxy (e.g. fastify mercurius) with own schema stitching

### If the feature is approved, would you be willing to submit a PR?
My understanding of haskell is little to none, perhaps if people could help out?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.