Improving API communication using GraphQL
summary
Company replaces many REST endpoints with a single GraphQL endpoint and shows it running in production using overblog/graphql-bundle on Symfony and the reference webonyx/graphql-php library. Mobile payloads shrink to a fraction and a multi-call REST sequence (about ten requests) becomes one GraphQL request. N+1 SQL problems are solved with DataLoader + ReactPHP promises. Monitoring uses Apollo Optics or a custom query-parsing pipeline; one expensive search query once caused a site outage.
AI-written summary · about
chapters (18)
- 0:00Introduction and speaker intro
- 1:28Why improve your API
- 3:17History of SOAP and REST APIs
- 8:49What is GraphQL
- 14:13GraphQL developer tools
- 14:34GitHub’s GraphQL API demo
- 19:14Implementing GraphQL in PHP
- 27:33GraphQL in production
- 27:55First GraphQL project mistakes
- 30:03Relay specification and nodes
- 34:00Connections and pagination
- 36:28Query complexity and nesting
- 37:54Solving the N+1 problem
- 40:28Mutations in GraphQL
- 42:20Deprecating fields and versioning
- 44:29Monitoring API usage
- 46:40Challenges and learning curve
- 48:27Benefits and conclusion
