~/talk

GraphQL Migration: A Proper Use Case for Metaprogramming?

Talkat Ruby Hack 2019 · 2019-04-04..04-05· [ruby, graphql]
slides:none on file

Proposes metaprogramming GraphQL Ruby to auto-generate GraphQL types and query boilerplate from existing target wrapper classes, using graphql-ruby gem, annotate_field metadata, unbound methods, dynamic method defs, class_eval and constants. Delivers a working prototype that generates Payment/Merchant/Card types, adapts when a Card target is added, and narrows public route types for permission changes. Tests use RSpec against the GraphQL type generator. Notes performance tradeoffs (schema loads per query; resolvers must be fast) but shows reduced boilerplate and improved developer experience.

AI-written summary · about

  1. 0:00Introduction
  2. 0:25About me
  3. 1:40Square ecosystem
  4. 5:33Roadmap
  5. 6:03Regulators
  6. 7:08Targets
  7. 8:30Merchant ID
  8. 9:04Create GraphQL API
  9. 11:52Benefits of GraphQL Migration
  10. 13:37GraphQL Annotations
  11. 16:29Generate GraphQL
  12. 17:07Ruby Object Model Constants
  13. 19:21GraphQL Type Classes
  14. 21:39Demo
  15. 23:12New Target
  16. 24:27Requirement Change
  17. 26:16Testing
  18. 27:16Recap
  19. 29:08Questions
~/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.