~/talk

GraphQL Directives: An Under Utilized Power at your Fingertips

Talkat GraphQL Summit 2023 · 2023-10-09..10-13· [web-platform, api-design]
slides:none on file

A real incident-response story: a GraphQL server in front of a legacy API receives malicious strings in an ID field, so a sanitized directive is added to argument and input definitions to enforce a regex and stop revealing server internals. Implementation uses Apollo Server and graphql-tools mapSchema to transform field resolvers; it replaces resolver logic to validate inputs and succeeded at removing verbose legacy errors. Also demos a toy spiceLevel directive for output transformation and warns that broad directive scope raises complexity.

AI-written summary · about

  1. 0:00Introduction to directives
  2. 0:32Anatomy of a directive
  3. 1:47Schema vs query directives
  4. 4:47Why use directives
  5. 7:50Common built-in directives
  6. 9:43A real-world use case
  7. 13:24Building a custom directive
  8. 17:45Directives in other languages
  9. 19:23Caveats and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.