Go Beyond the Spec With Custom Directives
summary
GraphQL allows custom directives beyond the spec and they work as either type-system vs executable directives; built-ins include @skip @include @deprecated @specifiedBy. Concrete examples: StepZen’s address directive pulls REST responses into fields, @auth and a reusable @sort handle authentication, pagination and ordering without changing resolvers. Common implementation uses an executable schema with transformer functions (graphql-tools style). Names must be unique and order-sensitive, so teams often prefix custom names to avoid collisions; a public directory of directives would reduce duplication.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:09Understanding directives
- 5:09Type system vs executable
- 8:53Directives in practice
- 12:08Implementing custom logic
- 16:24Use cases for directives
- 22:17Ecosystem and best practices
- 24:44Recap and Q&A
related talks
24mGraphQL Directives: An Under Utilized Power at your Fingertips
33mEvolving GraphQL Schemas
16mKeynote: GraphQL’s Next Chapter: Progress, Proposals, and Participation
23mAn Introduction to GraphQL
44mNamespacing Is the Next Frontier of GraphQL Federation
18mWelcome to GraphQL
23mGradually Adopt GraphQL Without Writing any Backend Code
25mGraphQL, the Domain Way
