Like the title, I know the difference is the position of the directives, but my question is exists other difference? or advantage?
Asked
Active
Viewed 236 times
1 Answers
2
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.

Daniel Rearden
- 80,636
- 11
- 185
- 183
-
Oh, I understand, anothe question, ¿how I create a FIELD directive with laravel-lighthouse, all example are FIELD_DEFINITION? u.u – Jose Manuel Casani Guerra Jul 27 '20 at 10:12
-
https://lighthouse-php.com/4.16/custom-directives/getting-started.html#directive-interfaces – Daniel Rearden Jul 27 '20 at 10:27