Skip to content

Latest commit

History

History
11 lines (10 loc) 路 748 Bytes

2021-04-05.md

File metadata and controls

11 lines (10 loc) 路 748 Bytes
publish_date
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.