/plushcap/analysis/hasura/graphql-directives-you-should-know-about

GraphQL directives you should know about

What's this blog post about?

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.

Company
Hasura

Date published
Sept. 28, 2021

Author(s)
Jesse Martin

Word count
1040

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.