SlideShare a Scribd company logo
1 of 46
Download to read offline
MANDIC + RIVENDEL.
ESPECIALISTAS EM CLOUDS.
Minha API deve ser Rest?
Desenvolvedor
@ezidio
mandic.com.br
Everton Tavares
#EspecialistaFaz
…
https://graphql.org/
type Query {
products: [Product]
product(id:Int): [Product]
}
type Product {
id: Int
name: String
tags: [String]
price: Double
category: Category
}
type Category {
name: String
}
{
products: {
id
name
price
category: {
name
}
}
}
type Query {
products: [Product]
product(id:Int): [Product]
}
type Product {
id: Int
name: String
tags: [String]
price: Double
category: Category
}
type Category {
name: String
}
{
products: [
{
“id”: 1,
“name”: “Relogio Casio”,
“price”: 270.4,
“category”: {
“name”: “Relogio”
}
},
{ … }
]
}
type Query {
products: [Product]
product(id:Int): [Product]
}
type Product {
id: Int
name: String
tags: [String]
price: Double
category: Category
}
type Category {
name: String
}
{
product(id = 2): {
id
name
}
}
type Query {
products: [Product]
product(id:Int): [Product]
}
type Product {
id: Int
name: String
tags: [String]
price: Double
category: Category
}
type Category {
name: String
}
{
product: {
“id”: 1,
“name”: “Relogio Casio”
}
}
type Mutation {
update(id:Int, name:String): Product
delete(id:Int): Boolean
}
mutation {
update(id: 2, name: “Teste”): {
id
name
}
delete(id: 5)
}
https://netflix.github.io/falcor/
var model = new falcor.Model({
source: new HttpDataSource(baseUrl + '/model.json')
});
var jsonGraph = await model.get(["products", {from: 0, to:10},
["id","name","price"]]);
/GET?paths=[“products[0..10][‘id’,’name’,’price’”]]
{
products: [
{
“id”: 1,
“name”: “Relogio Casio”,
“price”: 270.4
},
{ … }
]
}
{
categoryById: {
"10": {
product: "Relogios",
done: false,
prerequisites: [{ $type: "ref", value: ["todosById", 54] }]
}, {...}
},
categories: [{ $type: "ref", value: ["categoryById", 10] }, { ... }],
products: [
{
id: 1
name: "Relogio Casio",
price: 270.4
category: { $type: "ref", value: ["categoryById", 10] }
},
{...}
]
}
https://jrgql.github.io/
{
“name”: “”
}
[
{
“name”: “Relogio Casio”
},
{
“name”: “Relogio Rolex”
},
{
“name”: “Relogio Pirata”
},
{ … }
]
{
“_id”: “”,
“name”: “”,
“price”: “”
}
[
{
“_id”: 1,
“name”: “Relogio Casio”,
“price”: 270.4
},
{
“_id”: 2,
“name”: “Relogio Rolex”,
“price”: 12000
},
{ … }
]
{
“_id”: “1”,
“name”: “”,
“price”: “”
}
[
{
“_id”: 1,
“name”: “Relogio Casio”,
“price”: 270.4
}
]
{
“_id”: “”,
“name”: “”,
“price<”: 500
“category”: {
“name”: “”
}
}
[
{
“_id”: 1,
“name”: “Relogio Casio”,
“price”: 270.4,
“category”: {
“name”: “Relogio”
}
}
]
https://grpc.io/
service ProductService {
rpc getProduct (ProductRequest) returns (Product) {}
}
message ProductRequest {
int32 id = 1;
}
message ProductReply {
int32 id = 1;
string name = 2;
double price = 3;
}
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?
Minha api deve ser rest?

More Related Content

Similar to Minha api deve ser rest?

Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
Kiev ALT.NET
 

Similar to Minha api deve ser rest? (20)

GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learned
 
APIs for catalogs
APIs for catalogsAPIs for catalogs
APIs for catalogs
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
 
Start an Angular project fast, then go faster using AWS and Back&
Start an Angular project fast, then go faster using AWS and Back&Start an Angular project fast, then go faster using AWS and Back&
Start an Angular project fast, then go faster using AWS and Back&
 
Beyond PrettyFaces - Einführung in Rewrite
Beyond PrettyFaces - Einführung in RewriteBeyond PrettyFaces - Einführung in Rewrite
Beyond PrettyFaces - Einführung in Rewrite
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
GraphQL - APIs The New Way
GraphQL - APIs The New WayGraphQL - APIs The New Way
GraphQL - APIs The New Way
 
CSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+ReflectionCSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+Reflection
 
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
Simpler by Design: Build a Better GraphQL API for Your Next App by Writing Le...
 
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) ...
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API days
 
AppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learntAppSync in real world - pitfalls, unexpected benefits & lessons learnt
AppSync in real world - pitfalls, unexpected benefits & lessons learnt
 
GraphQL: APIs the New Way.
GraphQL: APIs the New Way.GraphQL: APIs the New Way.
GraphQL: APIs the New Way.
 
Object Oriented Programming 2 (C#)
Object Oriented Programming 2 (C#) Object Oriented Programming 2 (C#)
Object Oriented Programming 2 (C#)
 
Next-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and PrismaNext-generation API Development with GraphQL and Prisma
Next-generation API Development with GraphQL and Prisma
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in Swift
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
An introduction to Angular2
An introduction to Angular2 An introduction to Angular2
An introduction to Angular2
 
MongoDB World 2018: Keynote
MongoDB World 2018: KeynoteMongoDB World 2018: Keynote
MongoDB World 2018: Keynote
 
Powerful Generic Patterns With Django
Powerful Generic Patterns With DjangoPowerful Generic Patterns With Django
Powerful Generic Patterns With Django
 

More from Everton Tavares

More from Everton Tavares (7)

BFF - Best Friends Forever?
BFF - Best Friends Forever?BFF - Best Friends Forever?
BFF - Best Friends Forever?
 
Apresentando o Apache Camel
Apresentando o Apache CamelApresentando o Apache Camel
Apresentando o Apache Camel
 
Arquitetura Orientada a Eventos
Arquitetura Orientada a EventosArquitetura Orientada a Eventos
Arquitetura Orientada a Eventos
 
Tdd como uma ferramenta de arquitetura
Tdd como uma ferramenta de arquiteturaTdd como uma ferramenta de arquitetura
Tdd como uma ferramenta de arquitetura
 
Meu Cliente não permite DevOps. E agora?
Meu Cliente não permite DevOps. E agora?Meu Cliente não permite DevOps. E agora?
Meu Cliente não permite DevOps. E agora?
 
Expression Language 3.0
Expression Language 3.0Expression Language 3.0
Expression Language 3.0
 
Criando Entidades "Like a Boss"
Criando Entidades "Like a Boss"Criando Entidades "Like a Boss"
Criando Entidades "Like a Boss"
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 

Minha api deve ser rest?