GraphQL has many advantages over RESTful APIs. A lot of companies start thinking about migration paths for adopting GraphQL, which not only come with technological but also with organizational challenges!
9. Motivation - Legacy Application Stack
16.10.17 9
- Mostly MVC(Spring/Rails) with REST Endpoints
- Server-Side rendered HTML with Ajax calls
- One React JS Front End Client
10. Motivation - Requirements
16.10.17 10
- Complex UI
- Public API
- Faster Development
- Reduce integration effort
- Reduce project onboarding
- Performance
11. Motivation - Solutions?
16.10.17 11
Complex UI
- Experience with React.JS for over a year
- Future Implementation in most of the clients
- Developer team React knowledge
12. Motivation - Solutions?
16.10.17 12
Public API
- Pure REST standard is hard to implement
- Unique URI´s, request methods has to have a meaning(PUT or POST?)
- Need a Gateway for security and performance
/product or /products
PUT or POST
which Content-Type ?
26. Transition: GraphQL Schema
Prefer building a Graph-QL schema that describes
how clients use the data,
rather than mirroring the legacy database schema.
37. Challenges: Thinking in Graphs
06.07.17 lokalleads 37
In the REST implementation data is modeled in terms of
network services.
/campaigns
/campaigns_and_metrics
/campaigns_and_statistics
38. Challenges: Thinking in Graphs
06.07.17 lokalleads 38
With GraphQL, you model your business domain as a graph.
/campaigns
/campaigns_and_metrics
/campaigns_and_statistics