SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
1
Augmenting
a legacy {REST} API
with GraphQL
● Started in 2015
● Back end with Ruby on Rails, two mobiles app (Android
and iOS), website
● Good tests coverage but not perfect
● Some functional documentation for critical features
(like payment)
● Small evolutions and dependencies upgrade during the
years
● End of 2019 new big feature: Beehive for Business
Fast and independent
Coworking with self check-in
2
Why did we add
GraphQL ?
1
Specification Development Code is deployed
reviewed
Front-end validates Development
reviewed
New field
is deployed
Front-end needs
a new field
5
Performance
can be an issue
Some fields are
not required
Many endpoints &
representations
of a resource
Some fields are
expensive to
compute
Documentation
By adding tests and using
json-schemas we can make sure
our documentation is up to date
��♂
Data fetching
��♂
Better
performance
��
No graphQL expert
inside our team
Big investmentLearning curve
��
How did we add
GraphQL ?
2
Ask front end if they can use GraphQL API
Start with queries
Added-value is here, we can do mutation later
Write tests if missing
Extract business code from controller into interactor
Write the GraphQL query and types
With an interactor
Extract business code from controller
def index
offers = Offer.all
filtered_offers = offers.available.not_hidden.not_meeting_room
scoped_offers = policy_scope(filtered_offers)
render json: scoped_offers, root: 'offers', serializer: OfferSerializer
end
def index
offers = GetOffers.new.call(current_user: current_user).value!
render json: offers, root: 'offers', serializer: OfferSerializer
end
Query is the entry point
class QueryType < Types::BaseObject
# Add root-level fields here.
# They will be entry points for queries on your schema.
field :offers, [Types::OfferType], null: false
def offers
GetOffers.new.call(
current_user: context[:current_user]
).value!
end
end
Query
FIELDS
offers [Offer!]!
Type is the equivalent of a REST serializer
class OfferType < Types::BaseObject
field :id, ID, null: false
field :name, String, null: false
field :has_access_to_private_offices, Boolean, null: false
field :hidden, Boolean, null: false
field :highlighted, Boolean, null: false
field :ht_price, String, null: false
field :kind, OfferKind, null: false
field :marketing_name, String, null: true
field :multiplier_for_durations, [GraphQL::Types::JSON], null: false
def multiplier_for_durations
object.possible_multipliers.map do |i|
{
string: I18n.t("offers.period.#{object.period}", count: i),
multiplier: i
}
end
end
end
Offer
FIELDS
hasAccessToPrivateOffices Boolean!
hidden Boolean!
highlighted Boolean!
htPrice String!
id ID!
kind OfferKind!
marketingName String!
multiplierForDurations [JSON!]!
name String!
Ask front end if they can use GraphQL API
Start with queries
Added-value is here, we can do mutation later
Write tests if missing
Extract business code from controller into interactor
Write the GraphQL query and types
Adapt your existing tools
Postman => Altair
Is this over ?
3
15
In the REST world it is solved by adding .preload(:offers)
Enterprise.preload(:offers).all
An innocent query…
# SELECT * FROM enterprises (+ 1 query)
Enterprise.all.each do |enterprise|
# SELECT * FROM offers WHERE enterprise_id = ? (n queries)
enterprise.offers.map(&:id)
end
query {
enterprises {
id
offers {
id
}
}
}
...will result in n + 1 queries being made
Result in bad performance
● Batchloading is a generic lazy batching mechanism
● Idea: Delay evaluation to load data in once
https://github.com/exAspArk/batch-loader & https://github.com/graphql/dataloader
class EnterpriseType < Types::BaseObject
field :offers, [Types::OfferType], null: false
def offers
BatchLoader::GraphQL.for(object).batch do |enterprises, loader|
preloader = ActiveRecord::Associations::Preloader.new
preloader.preload(enterprises, :offers)
enterprises.each do |enterprise|
loader.call(enterprise, enterprise.offers)
end
end
end
end
With a custom helper
GraphQL
class EnterpriseType < Types::BaseObject
preload_field :offers, [Types::OfferType], null: false, associations: :offers
end
{REST}
Enterprise.preload(:offers).all
Front end
point of view
4
React
It’s awesome.
Loading state, pagination, caching,
optimistic UI out of the box.
Mobile apps
Neutral
��♂ ��
Mutations
5
Write missing tests
Extract controller code in independant Interactor
Add mutations
createEnterprise
ARGUMENTS
enterpriseRequest CreateEnterpriseRequest!
SUBTYPES
Failure
SuccessOfEnterprise
TYPE
class CreateEnterpriseMutation < Mutations::BaseMutation
argument :enterprise_request, CreateEnterpriseRequestType,
required: true
type failure_union(EnterpriseType)
def resolve(enterprise_request:)
result = CreateEnterprise.new.call(
user: context[:current_user],
params: {
enterprise: enterprise_request.to_h,
}
)
if result.success?
{ success: result.value! }
else
result.failure
end
end
end
FailureOrSuccessOfEnterpriseUnion Union
What’s next ?
6
Handle file upload
Monitoring: everything is under /graphql
Demystify graphQL for the rest of the team
Learning curve
is not that high
Incremental approach
is possible
You can use both
27

Weitere ähnliche Inhalte

Was ist angesagt?

apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...apidays
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays
 
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...apidays
 
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...apidays
 
apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays
 
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...apidays
 
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMG
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMGapidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMG
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMGapidays
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywhereNordic APIs
 
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonage
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonageapidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonage
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonageapidays
 
Building APIs in a Cloud Native Era
Building APIs in a Cloud Native EraBuilding APIs in a Cloud Native Era
Building APIs in a Cloud Native EraNuwan Dias
 
apidays LIVE Australia - Federating API Development at Australia’s largest bu...
apidays LIVE Australia - Federating API Development at Australia’s largest bu...apidays LIVE Australia - Federating API Development at Australia’s largest bu...
apidays LIVE Australia - Federating API Development at Australia’s largest bu...apidays
 
Executing on API Developer Experience
Executing on API Developer Experience Executing on API Developer Experience
Executing on API Developer Experience SmartBear
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEAN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEGavin Pickin
 
Your API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestYour API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestNordic APIs
 
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...apidays
 
APIDays - API Design Workshop
APIDays - API Design WorkshopAPIDays - API Design Workshop
APIDays - API Design WorkshopRestlet
 
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...apidays
 
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...apidays
 
What do you mean by "API as a Product"?
What do you mean by "API as a Product"?What do you mean by "API as a Product"?
What do you mean by "API as a Product"?Lou Powell
 
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...apidays
 

Was ist angesagt? (20)

apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards  ...
apidays LIVE Paris 2021 - Spatially enabling Web APIs through OGC Standards ...
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
 
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...
apidays LIVE Australia 2021 - From apps to APIs: how no-code is transforming ...
 
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...
apidays LIVE Paris 2021 - 20 Minutes to Build a Serverless COVID-19 GraphQL A...
 
apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...
 
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
apidays LIVE Paris - Data with a mission: a COVID-19 API case study by Matt M...
 
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMG
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMGapidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMG
apidays LIVE New York 2021 - Service API design validation by Uchit Vyas, KPMG
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re Everywhere
 
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonage
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonageapidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonage
apidays LIVE Paris 2021 - What Developers Want by Paul Ardeleanu, Vonage
 
Building APIs in a Cloud Native Era
Building APIs in a Cloud Native EraBuilding APIs in a Cloud Native Era
Building APIs in a Cloud Native Era
 
apidays LIVE Australia - Federating API Development at Australia’s largest bu...
apidays LIVE Australia - Federating API Development at Australia’s largest bu...apidays LIVE Australia - Federating API Development at Australia’s largest bu...
apidays LIVE Australia - Federating API Development at Australia’s largest bu...
 
Executing on API Developer Experience
Executing on API Developer Experience Executing on API Developer Experience
Executing on API Developer Experience
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEAN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
 
Your API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestYour API Strategy: Why Boring is Best
Your API Strategy: Why Boring is Best
 
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...
apidays LIVE Australia 2021 - Confessions of a Product Geek : My First API BY...
 
APIDays - API Design Workshop
APIDays - API Design WorkshopAPIDays - API Design Workshop
APIDays - API Design Workshop
 
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...
apidays LIVE Paris 2021 - API design is where culture and tech meet each othe...
 
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...
apidays LIVE Paris 2021 - Building an Accessible API Spec with Traditional En...
 
What do you mean by "API as a Product"?
What do you mean by "API as a Product"?What do you mean by "API as a Product"?
What do you mean by "API as a Product"?
 
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...
apidays LIVE Paris 2021 - Deliver real-time data to customer using Streaming ...
 

Ähnlich wie apidays LIVE Paris - Augmenting a Legacy REST API with GraphQL by Clément Villain

React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at StripeSashko Stubailo
 
Introduction to Testing GraphQL Presentation
Introduction to Testing GraphQL PresentationIntroduction to Testing GraphQL Presentation
Introduction to Testing GraphQL PresentationKnoldus Inc.
 
Testing Graph QL Presentation (Test Automation)
Testing Graph QL Presentation (Test Automation)Testing Graph QL Presentation (Test Automation)
Testing Graph QL Presentation (Test Automation)Knoldus Inc.
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays
 
GraphQL API Crafts presentation
GraphQL API Crafts presentationGraphQL API Crafts presentation
GraphQL API Crafts presentationSudheer J
 
No Graph Theory Required: Ember and GraphQL in Practice
No Graph Theory Required: Ember and GraphQL in PracticeNo Graph Theory Required: Ember and GraphQL in Practice
No Graph Theory Required: Ember and GraphQL in PracticeRocky Neurock
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsSashko Stubailo
 
Tutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPTutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPAndrew Rota
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCTim Burks
 
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...apidays
 
What could go wrong with a GraphQL query and can OpenTelemetry help? KubeCon...
What could go wrong  with a GraphQL query and can OpenTelemetry help? KubeCon...What could go wrong  with a GraphQL query and can OpenTelemetry help? KubeCon...
What could go wrong with a GraphQL query and can OpenTelemetry help? KubeCon...SonjaChevre
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first classLibbySchulze
 
GraphQL @ Manc.JS (March 2018)
GraphQL @ Manc.JS (March 2018)GraphQL @ Manc.JS (March 2018)
GraphQL @ Manc.JS (March 2018)Chris Grice
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2Hammad Rajjoub
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2Hammad Rajjoub
 
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionSimplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionVMware Tanzu
 
GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018Sashko Stubailo
 
GraphQL APIs is with eZ Platform, a Symfony CMS
GraphQL APIs is with eZ Platform, a Symfony CMSGraphQL APIs is with eZ Platform, a Symfony CMS
GraphQL APIs is with eZ Platform, a Symfony CMSJani Tarvainen
 

Ähnlich wie apidays LIVE Paris - Augmenting a Legacy REST API with GraphQL by Clément Villain (20)

React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at Stripe
 
Introduction to Testing GraphQL Presentation
Introduction to Testing GraphQL PresentationIntroduction to Testing GraphQL Presentation
Introduction to Testing GraphQL Presentation
 
Testing Graph QL Presentation (Test Automation)
Testing Graph QL Presentation (Test Automation)Testing Graph QL Presentation (Test Automation)
Testing Graph QL Presentation (Test Automation)
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
 
GraphQL API Crafts presentation
GraphQL API Crafts presentationGraphQL API Crafts presentation
GraphQL API Crafts presentation
 
No Graph Theory Required: Ember and GraphQL in Practice
No Graph Theory Required: Ember and GraphQL in PracticeNo Graph Theory Required: Ember and GraphQL in Practice
No Graph Theory Required: Ember and GraphQL in Practice
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
 
Tutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPTutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHP
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
 
What could go wrong with a GraphQL query and can OpenTelemetry help? KubeCon...
What could go wrong  with a GraphQL query and can OpenTelemetry help? KubeCon...What could go wrong  with a GraphQL query and can OpenTelemetry help? KubeCon...
What could go wrong with a GraphQL query and can OpenTelemetry help? KubeCon...
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first class
 
GraphQL @ Manc.JS (March 2018)
GraphQL @ Manc.JS (March 2018)GraphQL @ Manc.JS (March 2018)
GraphQL @ Manc.JS (March 2018)
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2C:\Fakepath\Combating Software Entropy 2
C:\Fakepath\Combating Software Entropy 2
 
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionSimplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) Extension
 
GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018GraphQL over REST at Reactathon 2018
GraphQL over REST at Reactathon 2018
 
React Flux to GraphQL
React Flux to GraphQLReact Flux to GraphQL
React Flux to GraphQL
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
 
GraphQL APIs is with eZ Platform, a Symfony CMS
GraphQL APIs is with eZ Platform, a Symfony CMSGraphQL APIs is with eZ Platform, a Symfony CMS
GraphQL APIs is with eZ Platform, a Symfony CMS
 

Mehr von apidays

apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...apidays
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOapidays
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...apidays
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...apidays
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...apidays
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...apidays
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...apidays
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...apidays
 

Mehr von apidays (20)

apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

apidays LIVE Paris - Augmenting a Legacy REST API with GraphQL by Clément Villain

  • 1. 1 Augmenting a legacy {REST} API with GraphQL
  • 2. ● Started in 2015 ● Back end with Ruby on Rails, two mobiles app (Android and iOS), website ● Good tests coverage but not perfect ● Some functional documentation for critical features (like payment) ● Small evolutions and dependencies upgrade during the years ● End of 2019 new big feature: Beehive for Business Fast and independent Coworking with self check-in 2
  • 3. Why did we add GraphQL ? 1
  • 4. Specification Development Code is deployed reviewed Front-end validates Development reviewed New field is deployed Front-end needs a new field
  • 5. 5 Performance can be an issue Some fields are not required Many endpoints & representations of a resource Some fields are expensive to compute
  • 6. Documentation By adding tests and using json-schemas we can make sure our documentation is up to date ��♂ Data fetching ��♂ Better performance ��
  • 7. No graphQL expert inside our team Big investmentLearning curve ��
  • 8. How did we add GraphQL ? 2
  • 9. Ask front end if they can use GraphQL API Start with queries Added-value is here, we can do mutation later Write tests if missing Extract business code from controller into interactor Write the GraphQL query and types
  • 10. With an interactor Extract business code from controller def index offers = Offer.all filtered_offers = offers.available.not_hidden.not_meeting_room scoped_offers = policy_scope(filtered_offers) render json: scoped_offers, root: 'offers', serializer: OfferSerializer end def index offers = GetOffers.new.call(current_user: current_user).value! render json: offers, root: 'offers', serializer: OfferSerializer end
  • 11. Query is the entry point class QueryType < Types::BaseObject # Add root-level fields here. # They will be entry points for queries on your schema. field :offers, [Types::OfferType], null: false def offers GetOffers.new.call( current_user: context[:current_user] ).value! end end Query FIELDS offers [Offer!]!
  • 12. Type is the equivalent of a REST serializer class OfferType < Types::BaseObject field :id, ID, null: false field :name, String, null: false field :has_access_to_private_offices, Boolean, null: false field :hidden, Boolean, null: false field :highlighted, Boolean, null: false field :ht_price, String, null: false field :kind, OfferKind, null: false field :marketing_name, String, null: true field :multiplier_for_durations, [GraphQL::Types::JSON], null: false def multiplier_for_durations object.possible_multipliers.map do |i| { string: I18n.t("offers.period.#{object.period}", count: i), multiplier: i } end end end Offer FIELDS hasAccessToPrivateOffices Boolean! hidden Boolean! highlighted Boolean! htPrice String! id ID! kind OfferKind! marketingName String! multiplierForDurations [JSON!]! name String!
  • 13. Ask front end if they can use GraphQL API Start with queries Added-value is here, we can do mutation later Write tests if missing Extract business code from controller into interactor Write the GraphQL query and types Adapt your existing tools Postman => Altair
  • 15. 15
  • 16. In the REST world it is solved by adding .preload(:offers) Enterprise.preload(:offers).all An innocent query… # SELECT * FROM enterprises (+ 1 query) Enterprise.all.each do |enterprise| # SELECT * FROM offers WHERE enterprise_id = ? (n queries) enterprise.offers.map(&:id) end query { enterprises { id offers { id } } } ...will result in n + 1 queries being made Result in bad performance
  • 17. ● Batchloading is a generic lazy batching mechanism ● Idea: Delay evaluation to load data in once https://github.com/exAspArk/batch-loader & https://github.com/graphql/dataloader class EnterpriseType < Types::BaseObject field :offers, [Types::OfferType], null: false def offers BatchLoader::GraphQL.for(object).batch do |enterprises, loader| preloader = ActiveRecord::Associations::Preloader.new preloader.preload(enterprises, :offers) enterprises.each do |enterprise| loader.call(enterprise, enterprise.offers) end end end end
  • 18. With a custom helper GraphQL class EnterpriseType < Types::BaseObject preload_field :offers, [Types::OfferType], null: false, associations: :offers end {REST} Enterprise.preload(:offers).all
  • 20. React It’s awesome. Loading state, pagination, caching, optimistic UI out of the box. Mobile apps Neutral ��♂ ��
  • 22. Write missing tests Extract controller code in independant Interactor Add mutations
  • 23. createEnterprise ARGUMENTS enterpriseRequest CreateEnterpriseRequest! SUBTYPES Failure SuccessOfEnterprise TYPE class CreateEnterpriseMutation < Mutations::BaseMutation argument :enterprise_request, CreateEnterpriseRequestType, required: true type failure_union(EnterpriseType) def resolve(enterprise_request:) result = CreateEnterprise.new.call( user: context[:current_user], params: { enterprise: enterprise_request.to_h, } ) if result.success? { success: result.value! } else result.failure end end end FailureOrSuccessOfEnterpriseUnion Union
  • 25. Handle file upload Monitoring: everything is under /graphql Demystify graphQL for the rest of the team
  • 26. Learning curve is not that high Incremental approach is possible You can use both
  • 27. 27