How to create a Directive for data fetching? #1434
Unanswered
rafaell-lycan
asked this question in
Q&A
Replies: 1 comment 7 replies
-
You can start here: https://the-guild.dev/graphql/tools/docs/schema-directives And integrate with TypeGraphQL following the example: https://github.com/carlocorradini/graphql-auth-directive/blob/main/examples/typegraphql/index.ts |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi y'all,
I want to ask for some guidance regarding adding new Directives to methods mainly to fetch data from other internal APIs.
The idea behind this is to use directives that match the HTTP verbs.
Note: It could be just
@rest
with themethod
as an optional parameter.Ideally it would use a pattern like so:
Any ideas on similar solutions or how to develop it?
Beta Was this translation helpful? Give feedback.
All reactions