apidays LIVE Paris - Responding to the New Normal with APIs for Business, People and Society
December 8, 9 & 10, 2020
The Rise of GraphQL for database APIs
Karthic Rao, Founder of Pixelbytestudio
3. Overview
GraphQL has taken the app development world by storm because of its immense benefits.
GraphQL adoption by UI development teams has brought in a new wave of flexibility in API
design, productivity across frontend-backend teams, intuitiveness in expressing UI data
requirements, and accessibility to powerful tooling. These benefits are why many tech
companies, including Facebook, Airbnb, Paypal, GitHub, and Shopify, are embracing GraphQL.
But, GraphQLs meteoric rise as an Application Programming Interface for Databases has taken
most of the experts by surprise.
What’s the reason behind this increasing trend of database vendors and startups building out of
the box support for GraphQL API? What is the right choice for your use case? What if you want
the best of all worlds?
5. Advantages of out of the box GraphQL
support for DBs
01 Saves you from writing boilerplate code and GraphQL resolvers with Database
client or an ORM. Ship your Basic CRUD features fast. Don’t bother even
implementing your own web server.
02 Database-ORM Best Practices abstraction.
03 Advantages of GraphQL ecosystem
6. Hasura (GraphQL on RelationalDB)
- GraphQL API on top of your Postgres, MySQL
tables without any code.
- You need to just configure your database tables.
- Need to manage your database instance.
- Hasura is not a Database vendor, runs its
webserver on top of your existing database
instances.
- Open source.
- Can run it on top of distributed SQL compatible
DBs.
- Available as Saas.
7. Dgraph (GraphQL on GraphDB)
- Open-source, distributed Graph Database.
- Dgraph is a database vendor, they ship their own
GraphQL.
- Get CRUD GraphQL API just with a GraphQL
schema file.
- Available as Saas.
- GraphQL API is ingrained into the database.
8. FaunaDB (GraphQL on NoSQL DB)
- Proprietary, Saas.
- Multi-model
- Initialize just with GraphQL schema
9. MongoDB (GraphQL on DocumentDB)
- Open Source Document Store
- All new GraphQL API
- Available as Saas.
10. Make the right choice of DB, Don’t directly
jump into the GraphQL bandwagon!
Are you
comfortable
using it without
GraphQL?
Does it fit your
use case?
The GraphQL
convenience
Do you trust the
database?
01
02
03
04
11. Use case study
Building Activity feed
and recommendation.
Graph Database excels when you want to
implement massive social graphs and
power feed and recommendations with
them.
Dgraph or Neo4J with GraphQL would be a
great choice.
12. Use case study
Primary Datastore
for your
application data.
If you want to go ahead with battle
tested solutions, relational DBs
like Postgres and SQL variants
would be a better choice.
Plenty of distributed and
SQL-Compatible databases can
help you scale your data.
Hasura can bring you GraphQL out
of the box on top these databases.
13. Use case study
Simple
applications with
not so complex
data models
If you are a MongoDB fan, Mongo
with GraphQL would be a great
choice for not so complex data
models.
14. What if you want the
best of all worlds?
What if product is complex?
What if you have multiple databases and data
sources which power your applications?
What if you want the best of all worlds?