Custom Directives Support #761
pavelnikolov
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've been working on custom directives in this library for a while. I got
@auth(role: String!)working just fine. I also got query complexity directive e.g.@cost(wieght: 1, multiplier: "pageSize)working - but I'm polishing the API and docs before merging this code. Here is my progress so far - tests passing (see executable examples for tl;dr) #760 - this handles pre-execution directives on FIELD_DEFINITION.I'd appreciate a review if you have the time. I still haven't thought much about reusable custom field validation directives e.g.
@email,@zipCode,@gt(n: Int!),@regexp(match: String!), etc. Also, at this point, no support for changing the output or skipping exec e.g.@cache(key: "ID", ttl: "1h").I need feedback on the API, not on the implementation.
All reactions