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
Do RPC ao GraphQL
Search
Alan Michel Willms Quinot
January 14, 2019
Programming
0
44
Do RPC ao GraphQL
Alan Michel Willms Quinot
January 14, 2019
Tweet
Share
More Decks by Alan Michel Willms Quinot
See All by Alan Michel Willms Quinot
JWT
alanwillms
0
59
Webpack ❤ Vue.js
alanwillms
0
29
PHP – principais novidades do 5.3 ao 5.6
alanwillms
0
60
Other Decks in Programming
See All in Programming
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
230
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
830
AIでLINEスタンプを作ってみた
eycjur
1
230
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
140
ソフトウェアテスト徹底指南書の紹介
goyoki
1
150
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
400
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
120
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
250
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
380
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
390
時間軸から考えるTerraformを使う理由と留意点
fufuhu
15
4.6k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
184
22k
Music & Morning Musume
bryan
46
6.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
KATA
mclloyd
32
14k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Being A Developer After 40
akosma
90
590k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Facilitating Awesome Meetings
lara
55
6.5k
Transcript
None
Era uma vez….
XML é supimpa! • RPC: Remote Procedure Call ◦ Via
HTTP • SOAP: Service Oriented Architecture Protocol ◦ Via HTTP, FTP, SMTP e outros
None
None
REST: Representational State Transfer • URL representa um recurso •
Métodos HTTP representam ações
Método URL Descrição GET /pessoas Lista todos GET /pessoas/42 Mostra
um registro POST /pessoas Cria um registro PATCH ou PUT /pessoas/42 Atualiza um registro DELETE /pessoas/42 Exclui um registro
CHEGUEI!
JSON: JavaScript Object Notation • Mais legível • Compacto •
Rápido • Língua dos browsers
Asynchronous JavaScript And XML
Asynchronous JavaScript And XML ???
Asynchronous JavaScript And JSON!!! AJAJ?
REST JSON AJAX WEB 2.0
Eu quero os dados de: • Uma pessoa • +
os comentários dela • + os pedidos mais recentes dela
Eu quero os dados de: • /v1/pessoas/123 • /v1/pessoas/123/comentarios •
/v1/pessoas/123/pedidos/recentes
Eu quero os dados de: • /v1/pessoas/123?extra=comentarios, pedidos-recentes
GraphQL
GraphQL • Consultas (queries) e interações (mutations) • A consulta
descreve o formato da resposta • Não requer uma tecnologia específica • Não requer HTTP • A implementação gera a documentação
Queries
Mutations
Subscriptions
None
None
None
None
None
None
None
None
None
None
None
Tipos do GraphQL • Escalares (Int, Float, String, Boolean, ID)
• Objetos • Listas • Input • Non-null • Avançado: enum, union, interfaces, etc.
None
Versionamento Vocês já viram isso? /v1/listaPedidos /v2/pedidos /v3/orders ...
None
None
None
None
Bibliotecas para C# / .NET • graphql-dotnet • graphql-net •
Hot Chocolate • etc. JÁ ESCOLHEU?
Referências • https://stackoverflow.com/questions/4862310/js on-and-xml-comparison • https://facebook.github.io/graphql/June2018/ • https://graphql.org/