dotansimha / dotansimha/graphql-code-generator
Support passing directive arguments to directiveContextTypes
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Is your feature request related to a problem? Please describe.
Would it be possible to make `directiveContextTypes` even more granular?
### Describe the solution you'd like
I'm thinking something along the line:
```GraphQL
directive @auth(match: JSON) on FIELD_DEFINITION
type Mutation {
doingSomethingWithAuth: String! @auth(match: { role: "admin" })
}
```
```TypeScript
type TokenContents = {
tokenContents: T
}
```
Just an example, buy maybe generics could be a way to provide an even more granular type here? :)
### Describe alternatives you've considered
_No response_
### Is your feature request related to a problem? Please describe.
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.