Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Query data like a pro - an introduction to GraphQL
Search
Eric
October 27, 2016
Programming
0
63
Query data like a pro - an introduction to GraphQL
An introduction talk about GraphQL given at the React Kiel Meetup Germany.
Eric
October 27, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
310
Devvox Belgium - Agentic AI Patterns
kdubois
1
130
Claude Agent SDK を使ってみよう
hyshu
0
1.3k
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
5.2k
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.3k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.1k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
360
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
230
CSC305 Lecture 04
javiergs
PRO
0
270
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.9k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
The Invisible Side of Design
smashingmag
302
51k
Making Projects Easy
brettharned
120
6.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
How GitHub (no longer) Works
holman
315
140k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Writing Fast Ruby
sferik
629
62k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Done Done
chrislema
185
16k
Building an army of robots
kneath
306
46k
Transcript
QUERY DATA LIKE A PRO! AN INTRODUCTION TO GRAPHQL PRESENTED
BY ERIC STUMPER 1 / 19
DISCLAIMER 2 / 19
ABOUT ME Developing Software at weluse GmbH for amazing 2.5
months Worked as a Frontend Developer and IT/Networking guy before Started out with React, Elixir/Phoenix and GraphQL in my Master's Thesis Besides coding I love travelling, hiking, indoor and beach volleyball Twitter: @ericstumper 3 / 19
CONTENTS REST in peace? GraphQL to the rescue Connecting React
What about the server? The new shit! 4 / 19
REST IN PEACE? http://api.com/user/1 { "user": { "id": "1", "name":
"Eric", "email": "
[email protected]
", "friends": [ "/user/20/", "/user/30/" ] } } 5 / 19
GRAPHQL TO THE RESCUE query { user { id name
email friends { name } } } 6 / 19
QUERY PARAMETERS QUERY VARIABLES query { user(id: 1) { name
} } query User($userId: ID!) { user(id: $userId) { name } } { "userId": 1 } 7 / 19
DIRECTIVES query User($userId: ID!, $friends: Boolean!) { user(userID: $userId) {
name email friends @include(if: $friends) { name } } } 8 / 19
MUTATIONS mutation CreateUser($name: String!) { createUser(name: $name) { id }
} { "name": "Peter" } 9 / 19
FRAGMENTS { leftComparison: user(department: BILLING) { ...comparisonFields } rightComparison: user(department:
IT) { ...comparisonFields } } fragment comparisonFields on Person { name friends { name } } 10 / 19
CONNECTING REACT 11 / 19
WHAT ABOUT THE SERVER? 12 / 19
A SCHEMA AND TYPES IN ABSINTHE (ELIXIR) 13 / 19
THE NEW SHIT! 14 / 19
@DEFER query User($userId: ID!) { user(userID: $userId) { name email
friends @defer { name } } } 15 / 19
@STREAM query Users { users @stream { name email friends
@defer { name } } } 16 / 19
@LIVE query Users { users { name email friends @live
{ name } } } 17 / 19
SUBSCRIPTIONS subscription Users { users { name email } }
18 / 19
LINKS GENERAL SERVER CLIENT http://graphql.org/learn/ https://learngraphql.com/ https://wehavefaces.net/graphql-shorthand-notation-cheatsheet- 17cd715861b6#.c3z77kes8 Node: https://github.com/graphql/express-graphql
Node: http://dev.apollodata.com/tools/ Elixir: http://absinthe-graphql.org http://dev.apollodata.com/react/ https://facebook.github.io/relay/ https://github.com/kadirahq/lokka 19 / 19