APIdays Paris 2019 - Turning your Database into a GraphQL API with Prisma & Nexus by Thibaud Courtoison, Zenika
1. Thibaud Courtoison - Consultant @ Zenika
TURNING YOUR DATABASE INTO
A GRAPHQL API WITH PRISMA AND NEXUS
@Errorname_
2. YOUR COMPANY
“International Shipping Inc.”
Delivers packages
across the world - 24/7
Database with millions of
references and history entries
No tracking API 🤷♂
11. GRAPHQL SERVER
1 - Define the schema 2 - Write the resolvers
3 - Build the schema
12. SDL-FIRST vs CODE-FIRST
Interested about code-first? Read more about it here:
The Problems of "Schema-First" GraphQL Server Development
Problem
✘ Inconsistencies
✘ Modularization
✘ Importing
✘ Composition
✘ Tooling / IDE support
Solution (SDL-first)
✓ Static analysis, code generation
(e.g. graphql-code-generator, ...)
✓ graphql-modules
✓ graphql-import
✓ Schema stitching/federation, ...
✓ VS Code plugins, graphql-tag, ...
✓ Programming language
Solution (Code-first)
✓ Programming language
✓ Programming language
✓ Programming language
✓ Programming language
13. NEXUS
1 - Write your types
2 - Write your queries
(and mutations)
3 - Build the schema