~/talk

The Benefits of Code First Over Schema First in GraphQL

Talkat GraphQLConf 2023 · on Thursday, 2023-09-21· at 17:00· Grand Peninsula F&G· [graphql, developer-experience]
slides:none on file

Argument: code-first yields faster, safer GraphQL development by keeping schema and resolvers in one place and leveraging language types. Example implementation uses Strawberry (Python), MyPy for end-to-end type checking, generics for reusable pagination, and module imports instead of schema stitching. Built an export flow to run GraphOS/Rover checks and Apollo Studio via GitHub Actions — Rover flags a bad type name in the demo. Federation works by generating directives (and a lighter federation API), but avoid runtime dynamic schema or blind ORM-generated types (SQLAlchemy/Django).

AI-written summary · about

  1. 0:00Introduction to code first
  2. 1:45Schema first vs code first
  3. 3:10Introducing Strawberry library
  4. 5:37Code first with Python types
  5. 7:24Single source of truth benefit
  6. 8:28Type safety with Python typings
  7. 10:13Modularizing the codebase
  8. 11:16Generic types for pagination
  9. 13:23Benefits summary so far
  10. 14:05Enforcing style guide with linters
  11. 15:06Exporting schema for tools
  12. 17:12Apollo Federation support
  13. 18:55Schema directives in code first
  14. 21:21Advice on code first pitfalls
  15. 22:48Design first approach
  16. 23:28SDL to Python converter demo
  17. 24:54Code first libraries in other languages
  18. 25:37Summary and closing remarks
~/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.