Get your ticket or log in to build your agenda.

PRO WORKSHOP (API): Have Your Cake and Eat It Too: GraphQL? REST API? Maybe You Can Have Both!


Roy Mor
Sisense, Technical Lead

Roy Mor is a Technical Lead at Sisense by day and a musician by night (or vice versa). He has worked as a senior software engineer for early startups, multinational corps, medium size companies and as an independent consultant, and has been developing software for over 15 years. Has worked on data engineering, cloud services, APIs, test automation, front end UI and embedded firmware, writing some beautiful bugs.


[TL;DR: How you can expose your existing GraphQL API as a customized REST API - without writing a single line of code]

So you’ve decided to write a public API. Great!

Should it be RESTful? Or perhaps a GraphQL API, the new cool kid on the API block? What if you already have an internal GraphQL implementation, but need to expose it publicly as REST?

In this talk, we’ll very briefly review the main differences, benefits and tradeoffs between REST and GraphQL for *public* API implementation, and go over how we at Sisense wrote a Node.js library to automatically generate a RESTful API from our existing GraphQL schema.

GraphQL2REST, which we released as an open-source npm package, allowed us to offer both API interfaces - GraphQL *and* REST - while maintaining only one code path! I'll talk about this case study and end with a live demo showing how your GraphQL API can be exposed as a customized REST API without writing a single line of code.

It might be also relevant to you, if you already have a GraphQL API, but your users want REST; or, if you want to develop a new GraphQL API and get REST on top of it, for free; or, if you wish to benefit from GraphQL internally while exposing a quite different truly RESTful API externally.