Skip to content

Add pre- and post-resolve hooks #24

@amaury1093

Description

@amaury1093

Hi!

I'm thinking of using this library, but I was asking myself how I could manage authentication with it (for example with express-jwt or express-session). More specifically, I would pass the token info into the context argument of the resolve function, but with this library I cannot access this resolve function anymore (unless in a custom query, but that's not what I want).

So my idea is to add pre and post hooks on every CRUD action that users can configure themselves. Similar to what is done here: https://github.com/RisingStack/graffiti-mongoose.

Any thoughts about this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions