-
Can multiple directives exist on a field ? type Foo {
bar: String! @directive1 @directive2
} |
Beta Was this translation helpful? Give feedback.
Answered by
zieka
Jun 24, 2022
Replies: 1 comment
-
Yes, multiple schema directives can exist on a field. I believe multiple directives can exist anywhere a valid directives location is. There are also many locations so you can refactor lots of repetitive logic into composable directives to make for clean schemas. More info about directives can be found in the official spec here: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nyex-cell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, multiple schema directives can exist on a field. I believe multiple directives can exist anywhere a valid directives location is. There are also many locations so you can refactor lots of repetitive logic into composable directives to make for clean schemas.
More info about directives can be found in the official spec here:
https://spec.graphql.org/June2018/#sec-Validation.Directives