Extending types for rules? #1325
Unanswered
leo-petrucci
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my API rules I sometimes need to make requests using
Prisma
. This works, but the typings aren't great:In this example
prisma
is of typeany
.How would I go about extending
graphql-shield
's types so I can specify what type mycontext
is within my rules?I tried creating a file
/types/graphql-shield.d.ts
:As I've seen this work in other packages, but it didn't work. I'll be honest I'm not too familiar on how this part of typescript works.
Any help?
Beta Was this translation helpful? Give feedback.
All reactions