$chiubaca / notes / fleeting / 2021-04-05
  • Further familiarisation with Nexus and Prisma. Getting a feel for the full workflow.
    1. update your schema.graphql file
    2. Run npx prisma migrate to create schemas in the db
    3. Run npx prisma generate to generate the types which will be used for graphql resolvers and also FE.
    4. Wire up the definitional for the gql server via Nexus. The nexusPrisma plugin is “aware” of the new schemas in prisma if setup correctly which mean defining the objectTypes is stright forward as t.model will be aware of what properties are available.
    5. Remember to add these definitions to the nexus makeSchema function.
    6. Queries and Resolvers can now be created using the nexus queryType function.
Edit on GitHub ✏️

Hey I'm Alex Chiu 👋. These are my notes for literally anything.

I'm using the Zettelkasten method to organise my thoughts here.

My more polished writings are published to my main blog at chiubaca.com

Follow me on: Github / X (Twitter) / Mastodon / LinkedIn