Open Sherlouk opened 2 years ago
I'll look into this and see what I can do on both Pioneer and Graphiti level
This could also feed into cost analysis by attributing a directive to a type or field it would indicate elegantly how much each type costs.
Type() {
} .description("") .directive(AuthDirective(...)) .directive(CostDirective(...))
This is probably one of those features which needs adopting at both the Graphiti level and in Pioneer but it would be awesome if we could create our own directives.
The most obvious and helpful one would be some form of Auth directive documented here. This could feed into Vapor's authentication solution to allow us to only return certain types or fields if the user is authenticated to view them.
This is kind of possible loosely with the validation rules released in #72, however that has a couple flaws: