Rarely do we get to build applications from scratch. Rather, we frequently have to make improvements on existing systems. Coursera has built on their existing REST APIs. Here’s how.
Declarative GraphQL: Adding GraphQL to our REST APIs – Bryan Kane
Your browser does not support iframes.
Coursera has over 500 REST APIs in production. We’re all in on GraphQL, but given this scale, it would be impossible to build a schema and write 500 custom resolvers to handle each of our endpoints. Instead, we used information we already had about our APIs (which actions are available, and request and response formats) to automatically build GraphQL resolvers and add them all to a single, unified schema. We also created a structured way for developers to define relations between models, in both forward and reverse directions, which will enable almost all pages on Coursera to be loaded via a single GraphQL query.