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
GraphQLのステキポイントと悩ましいポイント
Search
maru333
October 09, 2019
Programming
0
2.4k
GraphQLのステキポイントと悩ましいポイント
maru333
October 09, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.5k
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
1k
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
280
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
900
PicoRuby on Rails
makicamel
2
140
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
570
型で語るカタ
irof
0
530
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
12k
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
710
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
180
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
11k
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
700
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
We Have a Design System, Now What?
morganepeng
53
7.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Embracing the Ebb and Flow
colly
86
4.7k
Adopting Sorbet at Scale
ufuk
77
9.5k
The Invisible Side of Design
smashingmag
301
51k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Building Adaptive Systems
keathley
43
2.7k
Building Applications with DynamoDB
mza
95
6.5k
Transcript
P R E S E N T A T I
O N B Y @ m a r u 3 3 3 GraphQLͷεςΩϙΠϯτͱ ·͍͠ϙΠϯτ
- ৽ଔͰSIerۀɻΘΓͱࠈΛΈΔɻ - 201812݄ʹΤϜεϦʔϔɻ - αʔόαΠυKotlinɺGraphQLɻ - αΠίʔ͔Αʂ ← ΠϚίί
@maru333 ָ͚͋ͬͨ͠͞Ͳ
GraphQLͷεςΩϙΠϯτ ✨εςΩ✨
εςΩ̍ GUI͕ॆ࣮͍ͯ͠Δ - query Λͦͷ··ଧͯΔ - ͪΖΜิޮ͘ - σʔλΛ֬ೝͰ͖Δ -
ݕূͨ͠ΫΤϦΛ ɹͦͷ··࣮ίʔυʹ
εςΩ̎ ResponseCode͕200 OK ΫϥΠΞϯτ A Server ʢओཁʣ B Server ʢαϒʣ
GraphQL Server ཁٻ ཁٻ OK ཁٻ NG OK Ұ෦ޭͷσʔλΛॲཧͰ͖Δ
GraphQLͷ·͍͠ϙΠϯτ ·͍͠
GraphQL Server ·͍̍͠ ઃܭ͕ΫϥΠΞϯτͱີʹ Ϣʔβใ χϡʔε ͦͷଞ αʔϏε HOMEͷใ͘Ε HOME
query HomeInfo() ͦͷଞ αʔϏε HOMEͷใͩΑ ϙΠϯτใ Ϣʔβใ ;Ή;Ή HOMEͷ ใͩͳ
·͍̎͠ nginxͷϩάूܭ͕Ͱ͖ͳ͍ - ϩά͕શͯ200 OK - ࠓ·Ͱͷϩάूܭ͕͑ͳ͍ Stackdriver Trace Ͱ
ࢄτϨʔγϯά
- extensions ͷத༷ʑ - ͖উखʹ৭ʑೖͬͯ͠·͏ - εΩʔϚͰఆٛͰ͖ͳ͍ - ΧΦε ·͍̏͠
Τϥʔύλʔϯʹղͳ͠ https://www.apollographql.com/docs/apollo-server/data/errors/ - errors object ʹΤϥʔ͕ೖΔ - extensions ʹ͖ʹ͍ΕͯͶʂ
ݕ౼̍ HTTP Error Status ʹدͤΔ graphql-java Ͱ͜ΕΛΖ͏ͱ͢Δͱɺ ͔ͳΓτϦοΩʔͳ࣮ʹͳΔˍকདྷʹͬͯอূͰ͖ͳ͍ ฐࣾCTOஊɿ nginx
ͱ͔Ͱ HTTP Error Ͳ͏ͤ ൃੜ͢Δ͔Βɺ(ΫϥΠΞϯτͰ ίϯτϩʔϧ͢Δඞཁͷͳ͍ͷ) GraphQLͷΤϥʔHTTP Error ʹ دͤΔͱ͍͏ͷͲ͏͔ʁ → ҰಉɿͳΔ΄Ͳɺ͔֬ʹʂʂʂ
ݕ౼̎ ΤϥʔΫϥεͷఆٛ UserError Unauthorized Error Validation Error query { me
{ … on DataResult {} … on UserError { } } } ͨͩ͠ɺerrorsύλʔϯΔˍHTTP Error ൃੜ͢ΔͨΊɺ ΤϥʔϋϯυϦϯάগ͠ෳࡶʹͳΓͦ͏
·ͱΊ εςΩϙΠϯτͱ ·͍͠ϙΠϯτͷ·ͱΊ - GUIͰ؆୯ʹQueryઃܭ - Ұ෦αʔϏε͕མ͍ͪͯΔঢ়ଶͰಈ࡞Ͱ͖Δ εςΩ - ઃܭ͕ΫϥΠΞϯτͱີʹ
- ࠓ·Ͱͷϩάूܭπʔϧ͑ͳ͍͔ - ΤϥʔͷϕετϓϥΫςΟε͕ແͦ͞͏ ·͍͠
৭ʑ͋Γ·͕͢… GraphQL໘ന͍ʂ օ͞ΜͱҰॹʹݟΛͨΊ͍ͨʂ GraphQLΛ͍ͬͯΔਓͨͪͷू·Γ https://graphql-users-jp.slack.com/
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ
Vector Icons by Matthew Skiles Presentation template designed by Slidesmash
Photographs by pexels.com Special thanks to all people who made and share these awesome resources for free: Credits
This presentation uses the following typographies and colors: Colors used
Free Fonts used: https://www.fontsquirrel.com/fonts/League-Gothic https://www.fontsquirrel.com/fonts/open-sans Presentation Design