~/talk

Building a type-safe GraphQL server with Nexus and Prisma workshop

Talkat Prisma Day 2020 · 2020-06-25..06-26· [graphql, databases]
links:none on file
slides:none on file

Hands-on workshop builds a small blog GraphQL API with Nexus and Prisma: types and resolvers for Post, mutations createDraft and publishDraft, then replaces the in-memory array with a SQLite database via the Prisma plugin so resolvers call the Prisma client in context (findMany, create, update). Tests run as high-level system tests with Jest snapshot assertions and per-test databases. CLI workflow uses nexus dev and nexus build; subscriptions are not yet implemented and some attendees hit Prisma engine install/cache issues, but the demo queries, mutations and tests work end-to-end.

AI-written summary · about

  1. 0:00Start
  2. 16:49I Will Ask You Also before We Start the Workshop To Raise Your Hand if You Have Already Set Up Everything so that We Can Start once Everything Has Done Its if You Haven't Then Please Take Your Time Just Loan and Meanwhile What I'Ll Do Is Quickly Present What We'Ll Build in the End so as Jason Mentioned We Are Going To Build a Blog Application a Simple One Which I Am Going To Present to You Now So Give Me a Few Seconds I Will Present the Blog Application Only from the Consumer Perspective
  3. 19:47Once this Draft Is Created We Can Make Sure that We Have that Draft in Our List There We Go I Did Too this Is Exactly the Droplet We'Ve Published We Can Try by the Way To Remove the Headers To Make Sure that We Can Know that Says the Data without Being Authenticated if I Run the Query Now It Tells Us Not Authorized but Let's Bring It Back once We Have the Draft We Can Now Publish It So I'Ll Make Sure To Put the Json Web Token Again We Run the Publish Mutation on the Draft That Has an Id-There We Go We'Ve Just Published the Draft
  4. 28:39And It Is Absolutely Necessary that You Run the Def Command while You Work on this Is What Everyday during the during the Tutorial during the Workshop so that You Get Proper Feedback about around Auto Completion and Typers as You as You Make Changes to Your Schema We Plan To Lift that Limitation Later by Creating a Vs2 Extension That Will Just Do that without You Having To Run a Comment but for Now that's Limitation so Please Please Please if You See that You Have Type Errors and Expected Type Errors
  5. 32:48And the Reason Is It's Really a Format That Is Human Friendly and Super Easy To Read It and So It Really Gives a Super Nice Overview without Even Going into the Code It Really Gives a Nice Overview of the Changes That Were Applied to the Schema Where You Can at a Glance See whether There Was a Breaking Change What What Fields Were Added and It's Maybe Even like a Better Place To Put Comments about Different Changes That You'Ve Made Your Estimate so that's Why We Generated by Default You Can Disable It if You Don't Like It
  6. 48:27Creating Our in-Memory Database
  7. 49:52Add Structural Context
  8. 53:05Create a Draft
  9. 57:04Resolver
  10. 57:22Identify the Draft To Be Published
  11. 59:45Recap
  12. 1:02:10Polymorphic Relations
  13. 1:14:16Dependencies
  14. 1:14:56System Tests
  15. 1:16:42Create a Helper Style
  16. 1:31:12Backing Types
  17. 1:33:04Root Type
  18. 1:44:04Install Nexus Plug-In
  19. 1:45:11Enable Plugins and Mixes
  20. 1:46:37Define a Data Source
  21. 1:48:04Model Our Database Schema
  22. 1:48:36Create the Migration File
  23. 1:55:38Integration Tests
  24. 1:59:48Create a Post
  25. 2:04:44Global Defaults
  26. 2:10:09Migration Process
  27. 2:11:38Personal Introspection
  28. 2:17:58Testing
  29. 2:18:34Testing with Prisma
  30. 2:29:58Live Show
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.