Reputation: 101
Like the title, I know the difference is the position of the directives, but my question is exists other difference? or advantage?
Upvotes: 0
Views: 287
Reputation: 84697
A FIELD
directive is used client-side.
query {
someField @someDirective
}
A FIELD_DEFINITION
directive is used server-side.
type Query {
someField: String @someDirective
}
Server-side directives affect how a schema is initially created. Client-side directives modify how an individual operation is executed.
Upvotes: 2