Home / Companies / Hasura / Blog / Post Details
Content Deep Dive

GraphQL directives you should know about

Blog post from Hasura

Post Details
Company
Date Published
Author
Jesse Martin
Word Count
1,040
Language
English
Hacker News Points
-
Summary

GraphQL directives are annotations that can alter the behavior of a query or mutation. They are prefixed with "@" and are used in specific locations as defined by their specification. The standardized directives include @deprecated, @skip, @include, and @specifiedBy. These directives allow for communication about deprecated fields, conditional field inclusion/exclusion, and type references. Future specification directives like @defer and @stream are also being developed to improve data retrieval efficiency. Custom directives such as @cached, @rest, @dbquery, @materializer, @external, @requires, @provides, @key, and @_ have been implemented by various API providers for specific use-cases.