Quickstart

Follow the instructions to get started quickly, pick a tutorial to setup a Prisma service with your preferred database or use a bootstrap an entire GraphQL server based on Prisma and Prisma bindings.

  1. Install the Prisma CLI:
    npm install -g prisma 
  2. Create a new service:
    prisma init hello-world 
    1. Select the Demo server (or set up a Prisma server with your own DB)
    2. When the browser opens, register with Prisma Cloud and go back to your terminal
    3. Select the region for your demo server
    4. Use the suggested values for service and stage by hitting Enter twice
  3. Navigate into the new directory:
    cd hello-world 
  4. Deploy your service:
    prisma deploy 
  5. Open the GraphQL API to send queries and mutations:
    prisma playground 
    Create new User
    Query all Users
    Filter for Users
    Mutation
    Copy
    1
    2
    3
    4
    5
    6
    7
    8
    # Create a new user
    mutation {
      createUser(data: {
        name: "Alice"
      }) {
        id
      }
    }
    
  6. Optional: Update
    datamodel.graphql
    and run
    prisma deploy 
    again to update your schema.