taking control of your data with graphql

30
Taking Control of your Data with GraphQL Vinci Rufus @areai51 Shafeeq Ur Rahman @shafeeqonline XT - SapientRazorfish

Upload: vinci-rufus

Post on 16-Apr-2017

440 views

Category:

Internet


1 download

TRANSCRIPT

Page 1: Taking Control of your Data with GraphQL

Taking Control of your Data with GraphQL

Vinci Rufus

@areai51

Shafeeq Ur Rahman

@shafeeqonline

XT - SapientRazorfish

Page 2: Taking Control of your Data with GraphQL

Relational Databases

Page 3: Taking Control of your Data with GraphQL

Multiple Databases & Services

Page 4: Taking Control of your Data with GraphQL

Web Services – SOAP / REST

Page 5: Taking Control of your Data with GraphQL

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

???

Page 6: Taking Control of your Data with GraphQL

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

Page 7: Taking Control of your Data with GraphQL

Demand Driven Architecture

-David Nolen

Page 8: Taking Control of your Data with GraphQL

GraphQL to the Rescue

Page 9: Taking Control of your Data with GraphQL

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.

Page 10: Taking Control of your Data with GraphQL

2012Internal

Development at Facebook

2015Open sourced

Sep 2016Deemed

Production Ready

Evolution

Page 11: Taking Control of your Data with GraphQL

Popular Brands using GraphQL

Page 12: Taking Control of your Data with GraphQL

GraphQL Specifications

Page 13: Taking Control of your Data with GraphQL

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

Page 14: Taking Control of your Data with GraphQL

GraphQL Clients

Relaylokka

Page 15: Taking Control of your Data with GraphQL

GaphQL topology

GraphQL

PIM OMS Inventory RDBMS

Microservices

Page 16: Taking Control of your Data with GraphQL

graphQL Query

• No more crazy parsing logic for JSON data

• No specific endpoints for each client

• No Need for Versioning

Page 17: Taking Control of your Data with GraphQL

GraphiQL

Page 18: Taking Control of your Data with GraphQL

GraphQL Schema

Page 19: Taking Control of your Data with GraphQL

Demo

Page 20: Taking Control of your Data with GraphQL

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

Page 21: Taking Control of your Data with GraphQL
Page 22: Taking Control of your Data with GraphQL

Using GraphQL using react

Page 23: Taking Control of your Data with GraphQL

RELAY

Page 24: Taking Control of your Data with GraphQL

`

Page 25: Taking Control of your Data with GraphQL

What’s coming Next?

Page 26: Taking Control of your Data with GraphQL

Two areas of Focus

• Prioritize what data needs to come first

• Real-time data

Page 27: Taking Control of your Data with GraphQL

GraphQL Batch

Page 28: Taking Control of your Data with GraphQL

@defer

Page 29: Taking Control of your Data with GraphQL

Live Updates

Page 30: Taking Control of your Data with GraphQL

Thank You

Vinci Rufus

@areai51

Shafeeq Ur Rahman

@shafeeqonline

www.github.com/pagesource/twitter-graphql