Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Query data like a pro - an introduction to GraphQL
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Eric
October 27, 2016
Programming
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
APNsからLive Activityを開始する話
yumnumm
0
170
Domain-Driven Transformation
hschwentner
2
2.3k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
Next.js: The final boss of Web Performance
guaca
0
250
残高管理から台帳サービスへの進化
artoy
1
200
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
360
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Become a Pro
speakerdeck
PRO
31
6.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Chasing Engaging Ingredients in Design
codingconduct
0
360
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
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