Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Creating Service Layer Between GraphQL Client and Existing REST API

Creating Service Layer Between GraphQL Client and Existing REST API

Creating Service Layer Between GraphQL Client and Existing REST API. First-ever ReactNCR meetup in Delhi.

Anil Kumar Gurindapalli

February 17, 2019
Tweet

More Decks by Anil Kumar Gurindapalli

Other Decks in Programming

Transcript

  1. A human-first, last mile collaboration & business orchestration platform that

    seamlessly enables the enterprise digital transformation of Manufacturing, across all aspects of the life cycle! XAMPR E N D - T O - E N D B U S I N E S S P R O C E S S O R C H E S T R A T I O N S E A M L E S S I N T E L L I G E N C E A C R O S S S Y S T E M S C O M P L E T E L Y C O N F I G U R A B L E W O R K F L O W S
  2. GraphQL is a query language for APIs and a runtime

    for fulfilling those queries with your existing data. GraphQL Simply “GraphQL is a Syntax that describes how to ask for the data”.
  3. Three Characteristics • It lets the client specify exactly what

    data it needs. • Aggregate data from multiple resources • Use type system to describe data.
  4. A JavaScript framework for building data-driven React Applications powered by

    GraphQL. -Developed by Facebook Apollo is a complete platform for implementing a graph over your data. -Community driven http://facebook.github.io/relay/en/ https://www.apollographql.com/ Includes two runtime Libraries. 1. Apollo-Client 2. Apollo-Server Relay ApollographQL
  5. Service Layer? In a Layered Architecture, clients do not talk

    directly to servers. Instead, a layered approach is adopted in which some concerns such as caching, API key Management etc., are addressed.
  6. In some cases, this data graph tier will talk to

    the backend services using GraphQL. But, most frequently, the backend services are left untouched and continue to be accessed by their existing APIs, such as REST, SOAP, even SQL, with the mapping from these APIs to data graph objects accomplished by Service Layer.
  7. Benefits of Service Layer What are we doing in XAMPR

    Servicer layer? • Accessing REST API’s • Business Logic • Caching • Web Sockets • Micro Services 1. Redistributing load and payload optimization 2. Reusable abstractions 3. Simplifying development. 4. If Query Fails still return data to the client to render data as much as possible. etc