Taking Control of your Data with GraphQL

Post on 16-Apr-2017

438 views 1 download

Transcript of Taking Control of your Data with GraphQL

Taking Control of your Data with GraphQL

Vinci Rufus

@areai51

Shafeeq Ur Rahman

@shafeeqonline

XT - SapientRazorfish

Relational Databases

Multiple Databases & Services

Web Services – SOAP / REST

Problems with Web Services

The Power of Positive Thinking

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur porttitor, purus quis ultricies rutrum, erat nisl facilisis erat, in maximus massa libero nec ipsum. Cras eget leo sed est scelerisque sodales vel eget justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean feugiat ante id bibendum imperdiet. Nunc gravida mollis est, nec tincidunt diam sodales ultricies. Etiam consequat lobortis tellus, eu pretium dui lacinia ac. Phasellus faucibus eros in luctus tempor. Vestibulum vel ultrices orci. Nullam in augue libero. Nam dapibus velit nec pellentesque porttitor.

Author - John Doe

5 Comments - View All

???

Summarizing our Pain

• Over fetching or Under fetching data.

• API Rigidity leading to bloat.

• Inconsistent feature set between desktop and mobile.

• Multiple Requests to generate a single view.

• Writing and updating the Documentation.

• API Versioning

• http://example.com/api/v2.2/customers/1234

• http://example.com/api/v2.0/customers/1234

• http://example.com/api/v2/customers/1234

• http://example.com/api/v1.1/customers/1234

• http://example.com/api/v1/customers/1234

Demand Driven Architecture

-David Nolen

GraphQL to the Rescue

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a

type system you define for your data.

GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.

2012Internal

Development at Facebook

2015Open sourced

Sep 2016Deemed

Production Ready

Evolution

Popular Brands using GraphQL

GraphQL Specifications

Implementations

No Language Server Libraries1 JavaScript GraphQL.js, express-graphql, Apollo Server

2 Ruby Graphql-ruby

3 Python Graphene

4 Scala Sangria

5 Java Graphql-java

6 Clojure Graphql-clj

7 Go Lang Graphql-gp , graphql-relay-go

8 PHP Graphql-php , graphql-relay-php

9 C# / .Net Graphql-dotnet, graphql-net

10 Elixir Absinthe, graphql-elixir

GraphQL Clients

Relaylokka

GaphQL topology

GraphQL

PIM OMS Inventory RDBMS

Microservices

graphQL Query

• No more crazy parsing logic for JSON data

• No specific endpoints for each client

• No Need for Versioning

GraphiQL

GraphQL Schema

Demo

Schemas & TypesType SystemScalar TypesObject Types and FieldsThe Query and Mutation TypesEnumeration TypesLists and Non-Null

Using GraphQL using react

RELAY

`

What’s coming Next?

Two areas of Focus

• Prioritize what data needs to come first

• Real-time data

GraphQL Batch

@defer

Live Updates

Thank You

Vinci Rufus

@areai51

Shafeeq Ur Rahman

@shafeeqonline

www.github.com/pagesource/twitter-graphql