SlideShare a Scribd company logo
1 of 20
Download to read offline
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
1
A Link Generator for Increasing the Utility of
OpenAPI-to-GraphQL Translations
The Web Conference 2020: Developers Track
Dominik Kus, István Koren, Ralf Klamma
kus,koren,klamma@dbis.rwth-aachen.de
Chair of Computer Science 5 Information Systems & Databases
RWTH Aachen University
April 20, 2020
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
2
Overview
Motivation
Introduction to GraphQL
Migration from OpenAPI to GraphQL
Why Links are so important
The Link Generator
Conclusion: Try it out today!
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
3
Motivation
The Web is powered by APIs
APIs enable all kinds of applications (mobile, web,
microservices, . . . )
Today, most of them are REST(-like)
Limitations
Overfetching, e.g. when only name of project required
Underfetching, e.g. /projects/12
/projects/12/contributors
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
4
Introduction to GraphQL
Alternative to REST: GraphQL
Released in 2015 by Facebook
Quickly gaining popularity
Figure: Examples of GraphQL Adopters
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
4
Introduction to GraphQL
Alternative to REST: GraphQL
Released in 2015 by Facebook
Quickly gaining popularity
Figure: Examples of GraphQL Adopters
Query language approach
Mitigates problems of over- and underfetching
Other advantages (tool support, documentation,
developer friendliness, . . . )
We want to leverage these advantages for existing APIs!
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
5
Migration from REST to GraphQL
Automatic migration
Starting point: machine-readable documentation
For GraphQL: GraphQL Schema
For REST: OpenAPI
1
https://github.com/IBM/openapi-to-graphql
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
5
Migration from REST to GraphQL
Automatic migration
Starting point: machine-readable documentation
For GraphQL: GraphQL Schema
For REST: OpenAPI
Open-source wrapper generator
OpenAPI-to-GraphQL1 [Wittern et al., 2018]
1
https://github.com/IBM/openapi-to-graphql
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
6
OpenAPI-to-GraphQL
Open-source wrapper generator
OpenAPI-to-GraphQL2 [Wittern et al., 2018]
Proxies between GraphQL client and REST API
GraphQL Client GraphQL Wrapper REST API
GraphQL query
REST query
REST response
GraphQL response
2
https://github.com/IBM/openapi-to-graphql
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
7
Why Links are so important
If we use OpenAPI-to-GraphQL on most documentations,
queries look somewhat like this
Listing 1: Query without links
{
project(projectId: 12) {
name
}
projectContributors (projectId: 12) {
name
}
}
Equivalent in REST: /projects/12
/projects/12/contributors
No over- or underfetching
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
7
Why Links are so important
If we use OpenAPI-to-GraphQL on most documentations,
queries look somewhat like this
Listing 2: Query without links
{
project(projectId: 12) {
name
}
projectContributors (projectId: 12) {
name
}
}
But: No connection between a project and its contributors
Counter-intuitive
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
8
OpenAPI Link Definitions
OpenAPI Paths
/project/{id}
/project/{id}/contributors
Parameters: . . .
Response Types: . . .
. . .
Parameters: . . .
Response Types: . . .
. . .
type Project {
id: ID
name: String
}
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
8
OpenAPI Link Definitions
OpenAPI Paths
/project/{id}
/project/{id}/contributors
Parameters: . . .
Response Types: . . .
. . .
Parameters: . . .
Response Types: . . .
. . .
Link
type Project {
id: ID
name: String
contributors: [Person]
}
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
9
Missing link definitions
As shown: link definitions required for nested data
New feature in OpenAPI 3.0
Basically non-existent in real-world documentations3
OpenAPI
Other Unknown Total
1.1 1.2 2.0 3.0
Count 1 44 1106 52 185 190 1578
Percentage 0.1% 2.8% 70.1% 3.3% 11.7% 12.0% 100%
Only 3 (!) documents contain links
⇒ Automatic Link Generation
3
Based on over 1500 documentations in the public
https://apis.guru OpenAPI directory
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
10
Demo
https://openapi-link-generator.herokuapp.com/
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
11
Demo: Example Query
Listing 3: Before
{
project(projectId: 12) {
name
}
projectContributors (projectId: 12) {
name
}
}
Listing 4: After
{
project(projectId: 12) {
name
contributors {
name
}
}
}
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
12
Automatic Link Generation
Solution: OpenAPI-Link-Generator
Takes OpenAPI as input and augments it with link
definitions
Available via npm4
Can be used as Node.js library or command line tool
Also available as Web tool5
Concept
Forward slash implies hierarchical
relationship [Massé, 2012]
e.g. /project and /project/contributors
Add links to paths in such a relationship
Consider path parameters in this process
4
https://www.npmjs.com/package/openapi-link-generator
5
https://openapi-link-generator.herokuapp.com/
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
13
Evaluation of the Link Generator
We tested it on over 1500 real-world API documentations6
Links added to about 34% of API documentations
0 2 4 6 8
0
0.2
0.4
0.6
0.8
Number of paths in OpenAPI doc.
Numberoflinksadded
6
Based on the APIs.Guru OpenAPI directory
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
14
Conclusion: Try it out today!
GraphQL is quickly gaining popularity
Has advantages over REST
Big API providers are migrating to it (e.g. GitHub)
OpenAPI-to-GraphQL makes an existing REST API
available over GraphQL
OpenAPI link definitions improve the quality of the
generated schema
However, they are rarely used
Our link generator tool adds those automatically
Tested on real-world documentations
More information in the accompanying article
https://www.npmjs.com/package/openapi-link-generator
https://openapi-link-generator.herokuapp.com/
https://github.com/rwth-acis/openapi-link-generator
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
15
References
Massé, M. (2012).
REST API design rulebook.
O’Reilly, Farnham.
Wittern, E., Cha, A., and Laredo, J. A. (2018).
Generating GraphQL-Wrappers for REST(-like) APIs.
In Mikkonen, T., Klamma, R., and Hernández, J., editors, Web
Engineering, volume 10845 of Lecture Notes in Computer Science,
pages 65–83, Cham. Springer International Publishing.
A Link Generator
for Increasing the
Utility of
OpenAPI-to-
GraphQL
Translations
Dominik Kus,
István Koren,
Ralf Klamma
Motivation
Introduction to
GraphQL
Migration from
OpenAPI to
GraphQL
Why Links are
so important
The Link
Generator
Conclusion:
Try it out
today!
Lehrstuhl i5
Information
Systems
and Databases
16
The End

More Related Content

What's hot

05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
Revolution Analytics
 

What's hot (20)

Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
Building and deploying GraphQL Servers with AWS Lambda and Prisma I AWS Dev D...
 
GraphQL Europe Recap
GraphQL Europe RecapGraphQL Europe Recap
GraphQL Europe Recap
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQL
 
React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at Stripe
 
Wrapping and securing REST APIs with GraphQL
Wrapping and securing REST APIs with GraphQLWrapping and securing REST APIs with GraphQL
Wrapping and securing REST APIs with GraphQL
 
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
Designing API: REST | gRPC | GraphQL, which one should you pick? - Cedrick Lu...
 
GraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits togetherGraphQL across the stack: How everything fits together
GraphQL across the stack: How everything fits together
 
DevOps - How to get technical buy in
DevOps - How to get technical buy inDevOps - How to get technical buy in
DevOps - How to get technical buy in
 
Shift Dev Conf API
Shift Dev Conf APIShift Dev Conf API
Shift Dev Conf API
 
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
How web works and browser works ? (behind the scenes)
How web works and browser works ? (behind the scenes)How web works and browser works ? (behind the scenes)
How web works and browser works ? (behind the scenes)
 
Enterprise graph applications
Enterprise graph applicationsEnterprise graph applications
Enterprise graph applications
 
React Flux to GraphQL
React Flux to GraphQLReact Flux to GraphQL
React Flux to GraphQL
 
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
 
ADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized worldADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized world
 
Modular GraphQL with Schema Stitching
Modular GraphQL with Schema StitchingModular GraphQL with Schema Stitching
Modular GraphQL with Schema Stitching
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL
 
Yannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflowYannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflow
 
Apache Flink First Half of 2015 Community Update
Apache Flink First Half of 2015 Community UpdateApache Flink First Half of 2015 Community Update
Apache Flink First Half of 2015 Community Update
 

Similar to A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations

Alexander Kolb – Flink. Yet another Streaming Framework?
Alexander Kolb – Flink. Yet another Streaming Framework?Alexander Kolb – Flink. Yet another Streaming Framework?
Alexander Kolb – Flink. Yet another Streaming Framework?
Flink Forward
 

Similar to A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations (20)

How has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application developmentHow has netflix embraced graph ql for rapid application development
How has netflix embraced graph ql for rapid application development
 
Flink Community Update 2015 June
Flink Community Update 2015 JuneFlink Community Update 2015 June
Flink Community Update 2015 June
 
GraphQL Schema Stitching with Prisma & Contentful
GraphQL Schema Stitching with Prisma & ContentfulGraphQL Schema Stitching with Prisma & Contentful
GraphQL Schema Stitching with Prisma & Contentful
 
GraphQL.pptx
GraphQL.pptxGraphQL.pptx
GraphQL.pptx
 
GraphQL.pptx
GraphQL.pptxGraphQL.pptx
GraphQL.pptx
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
 
codersera_com (1).pdf
codersera_com (1).pdfcodersera_com (1).pdf
codersera_com (1).pdf
 
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo LeeData Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
Data Science lifecycle with Apache Zeppelin and Spark by Moonsoo Lee
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
 
Alexander Kolb – Flink. Yet another Streaming Framework?
Alexander Kolb – Flink. Yet another Streaming Framework?Alexander Kolb – Flink. Yet another Streaming Framework?
Alexander Kolb – Flink. Yet another Streaming Framework?
 
Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...
 
03_aiops-1.pptx
03_aiops-1.pptx03_aiops-1.pptx
03_aiops-1.pptx
 
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
APIdays Paris 2019 - Delivering Exceptional User Experience with REST and Gra...
 
Create API for your Databases
Create API for your DatabasesCreate API for your Databases
Create API for your Databases
 
Adding Spark support to Kylin at Bay Area Spark Meetup
Adding Spark support to Kylin at Bay Area Spark MeetupAdding Spark support to Kylin at Bay Area Spark Meetup
Adding Spark support to Kylin at Bay Area Spark Meetup
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
Rise of Intermediate APIs - Beam and Alluxio at Alluxio Meetup 2016
Rise of Intermediate APIs - Beam and Alluxio at Alluxio Meetup 2016Rise of Intermediate APIs - Beam and Alluxio at Alluxio Meetup 2016
Rise of Intermediate APIs - Beam and Alluxio at Alluxio Meetup 2016
 
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and StreamingGlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
GlueCon 2019: Beyond REST - Moving to Event-Based APIs and Streaming
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
 
Apache® Spark™ MLlib 2.x: migrating ML workloads to DataFrames
Apache® Spark™ MLlib 2.x: migrating ML workloads to DataFramesApache® Spark™ MLlib 2.x: migrating ML workloads to DataFrames
Apache® Spark™ MLlib 2.x: migrating ML workloads to DataFrames
 

More from IstvanKoren

Augmented Reality Lernkontexte - Eine Europäische Perspektive
Augmented Reality Lernkontexte - Eine Europäische PerspektiveAugmented Reality Lernkontexte - Eine Europäische Perspektive
Augmented Reality Lernkontexte - Eine Europäische Perspektive
IstvanKoren
 
Requirements Bazaar - Meet your Users on the Web
Requirements Bazaar - Meet your Users on the WebRequirements Bazaar - Meet your Users on the Web
Requirements Bazaar - Meet your Users on the Web
IstvanKoren
 
Requirements Bazaar FOSDEM 2015 Lightning Talk
Requirements Bazaar FOSDEM 2015 Lightning TalkRequirements Bazaar FOSDEM 2015 Lightning Talk
Requirements Bazaar FOSDEM 2015 Lightning Talk
IstvanKoren
 
Shared Editing on the Web: A Classification of Developer Support Frameworks
Shared Editing on the Web: A Classification of Developer Support FrameworksShared Editing on the Web: A Classification of Developer Support Frameworks
Shared Editing on the Web: A Classification of Developer Support Frameworks
IstvanKoren
 
Informatik-Kolloquium XMPP
Informatik-Kolloquium XMPPInformatik-Kolloquium XMPP
Informatik-Kolloquium XMPP
IstvanKoren
 

More from IstvanKoren (14)

Immersive Community Analytics for Wearable Enhanced Learning (HCI Internation...
Immersive Community Analytics for Wearable Enhanced Learning (HCI Internation...Immersive Community Analytics for Wearable Enhanced Learning (HCI Internation...
Immersive Community Analytics for Wearable Enhanced Learning (HCI Internation...
 
Augmented Reality Lernkontexte - Eine Europäische Perspektive
Augmented Reality Lernkontexte - Eine Europäische PerspektiveAugmented Reality Lernkontexte - Eine Europäische Perspektive
Augmented Reality Lernkontexte - Eine Europäische Perspektive
 
The Exploitation of OpenAPI Documents for the Generation of Web Frontends
The Exploitation of OpenAPI Documents for the Generation of Web FrontendsThe Exploitation of OpenAPI Documents for the Generation of Web Frontends
The Exploitation of OpenAPI Documents for the Generation of Web Frontends
 
The BBC micro:bit - discover your inner maker!
The BBC micro:bit - discover your inner maker!The BBC micro:bit - discover your inner maker!
The BBC micro:bit - discover your inner maker!
 
DevOps Gamification Workshop at JTEL Summer School 2015
DevOps Gamification Workshop at JTEL Summer School 2015DevOps Gamification Workshop at JTEL Summer School 2015
DevOps Gamification Workshop at JTEL Summer School 2015
 
Smart Ambient Learning with Physical Artifacts Using Wearable Technologies - ...
Smart Ambient Learning with Physical Artifacts Using Wearable Technologies - ...Smart Ambient Learning with Physical Artifacts Using Wearable Technologies - ...
Smart Ambient Learning with Physical Artifacts Using Wearable Technologies - ...
 
Requirements Bazaar - Meet your Users on the Web
Requirements Bazaar - Meet your Users on the WebRequirements Bazaar - Meet your Users on the Web
Requirements Bazaar - Meet your Users on the Web
 
Unpacking the Layers Box
Unpacking the Layers BoxUnpacking the Layers Box
Unpacking the Layers Box
 
Layers box agder docker
Layers box agder dockerLayers box agder docker
Layers box agder docker
 
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
Requirements Bazaar powered by AngularJS and Polymer - Talk at Google Develop...
 
Requirements Bazaar FOSDEM 2015 Lightning Talk
Requirements Bazaar FOSDEM 2015 Lightning TalkRequirements Bazaar FOSDEM 2015 Lightning Talk
Requirements Bazaar FOSDEM 2015 Lightning Talk
 
DireWolf Goes Pack Hunting: A Peer-to-Peer Approach for Secure Low Latency Wi...
DireWolf Goes Pack Hunting: A Peer-to-Peer Approach for Secure Low Latency Wi...DireWolf Goes Pack Hunting: A Peer-to-Peer Approach for Secure Low Latency Wi...
DireWolf Goes Pack Hunting: A Peer-to-Peer Approach for Secure Low Latency Wi...
 
Shared Editing on the Web: A Classification of Developer Support Frameworks
Shared Editing on the Web: A Classification of Developer Support FrameworksShared Editing on the Web: A Classification of Developer Support Frameworks
Shared Editing on the Web: A Classification of Developer Support Frameworks
 
Informatik-Kolloquium XMPP
Informatik-Kolloquium XMPPInformatik-Kolloquium XMPP
Informatik-Kolloquium XMPP
 

Recently uploaded

Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 

Recently uploaded (20)

GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 

A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations

  • 1. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 1 A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations The Web Conference 2020: Developers Track Dominik Kus, István Koren, Ralf Klamma kus,koren,klamma@dbis.rwth-aachen.de Chair of Computer Science 5 Information Systems & Databases RWTH Aachen University April 20, 2020
  • 2. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 2 Overview Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today!
  • 3. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 3 Motivation The Web is powered by APIs APIs enable all kinds of applications (mobile, web, microservices, . . . ) Today, most of them are REST(-like) Limitations Overfetching, e.g. when only name of project required Underfetching, e.g. /projects/12 /projects/12/contributors
  • 4. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 4 Introduction to GraphQL Alternative to REST: GraphQL Released in 2015 by Facebook Quickly gaining popularity Figure: Examples of GraphQL Adopters
  • 5. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 4 Introduction to GraphQL Alternative to REST: GraphQL Released in 2015 by Facebook Quickly gaining popularity Figure: Examples of GraphQL Adopters Query language approach Mitigates problems of over- and underfetching Other advantages (tool support, documentation, developer friendliness, . . . ) We want to leverage these advantages for existing APIs!
  • 6. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 5 Migration from REST to GraphQL Automatic migration Starting point: machine-readable documentation For GraphQL: GraphQL Schema For REST: OpenAPI 1 https://github.com/IBM/openapi-to-graphql
  • 7. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 5 Migration from REST to GraphQL Automatic migration Starting point: machine-readable documentation For GraphQL: GraphQL Schema For REST: OpenAPI Open-source wrapper generator OpenAPI-to-GraphQL1 [Wittern et al., 2018] 1 https://github.com/IBM/openapi-to-graphql
  • 8. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 6 OpenAPI-to-GraphQL Open-source wrapper generator OpenAPI-to-GraphQL2 [Wittern et al., 2018] Proxies between GraphQL client and REST API GraphQL Client GraphQL Wrapper REST API GraphQL query REST query REST response GraphQL response 2 https://github.com/IBM/openapi-to-graphql
  • 9. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 7 Why Links are so important If we use OpenAPI-to-GraphQL on most documentations, queries look somewhat like this Listing 1: Query without links { project(projectId: 12) { name } projectContributors (projectId: 12) { name } } Equivalent in REST: /projects/12 /projects/12/contributors No over- or underfetching
  • 10. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 7 Why Links are so important If we use OpenAPI-to-GraphQL on most documentations, queries look somewhat like this Listing 2: Query without links { project(projectId: 12) { name } projectContributors (projectId: 12) { name } } But: No connection between a project and its contributors Counter-intuitive
  • 11. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 8 OpenAPI Link Definitions OpenAPI Paths /project/{id} /project/{id}/contributors Parameters: . . . Response Types: . . . . . . Parameters: . . . Response Types: . . . . . . type Project { id: ID name: String }
  • 12. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 8 OpenAPI Link Definitions OpenAPI Paths /project/{id} /project/{id}/contributors Parameters: . . . Response Types: . . . . . . Parameters: . . . Response Types: . . . . . . Link type Project { id: ID name: String contributors: [Person] }
  • 13. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 9 Missing link definitions As shown: link definitions required for nested data New feature in OpenAPI 3.0 Basically non-existent in real-world documentations3 OpenAPI Other Unknown Total 1.1 1.2 2.0 3.0 Count 1 44 1106 52 185 190 1578 Percentage 0.1% 2.8% 70.1% 3.3% 11.7% 12.0% 100% Only 3 (!) documents contain links ⇒ Automatic Link Generation 3 Based on over 1500 documentations in the public https://apis.guru OpenAPI directory
  • 14. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 10 Demo https://openapi-link-generator.herokuapp.com/
  • 15. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 11 Demo: Example Query Listing 3: Before { project(projectId: 12) { name } projectContributors (projectId: 12) { name } } Listing 4: After { project(projectId: 12) { name contributors { name } } }
  • 16. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 12 Automatic Link Generation Solution: OpenAPI-Link-Generator Takes OpenAPI as input and augments it with link definitions Available via npm4 Can be used as Node.js library or command line tool Also available as Web tool5 Concept Forward slash implies hierarchical relationship [Massé, 2012] e.g. /project and /project/contributors Add links to paths in such a relationship Consider path parameters in this process 4 https://www.npmjs.com/package/openapi-link-generator 5 https://openapi-link-generator.herokuapp.com/
  • 17. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 13 Evaluation of the Link Generator We tested it on over 1500 real-world API documentations6 Links added to about 34% of API documentations 0 2 4 6 8 0 0.2 0.4 0.6 0.8 Number of paths in OpenAPI doc. Numberoflinksadded 6 Based on the APIs.Guru OpenAPI directory
  • 18. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 14 Conclusion: Try it out today! GraphQL is quickly gaining popularity Has advantages over REST Big API providers are migrating to it (e.g. GitHub) OpenAPI-to-GraphQL makes an existing REST API available over GraphQL OpenAPI link definitions improve the quality of the generated schema However, they are rarely used Our link generator tool adds those automatically Tested on real-world documentations More information in the accompanying article https://www.npmjs.com/package/openapi-link-generator https://openapi-link-generator.herokuapp.com/ https://github.com/rwth-acis/openapi-link-generator
  • 19. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 15 References Massé, M. (2012). REST API design rulebook. O’Reilly, Farnham. Wittern, E., Cha, A., and Laredo, J. A. (2018). Generating GraphQL-Wrappers for REST(-like) APIs. In Mikkonen, T., Klamma, R., and Hernández, J., editors, Web Engineering, volume 10845 of Lecture Notes in Computer Science, pages 65–83, Cham. Springer International Publishing.
  • 20. A Link Generator for Increasing the Utility of OpenAPI-to- GraphQL Translations Dominik Kus, István Koren, Ralf Klamma Motivation Introduction to GraphQL Migration from OpenAPI to GraphQL Why Links are so important The Link Generator Conclusion: Try it out today! Lehrstuhl i5 Information Systems and Databases 16 The End