divramod
divramod

Reputation: 1504

how to use prisma (graphql) cluster

i am just starting to use the promising project https://github.com/graphcool/prisma

i have some questions on how to use it:

  1. can i run many local named prisma clusters at once?
  2. how to nuke only one named local prisma cluster (i want to keep the data of different clusters)
  3. how to nuke only one apps data
  4. how to point to a local named cluster in the prisma.yml

thx in advance for answering!

Edit

ad 1. i tried sudo prisma local start --name test1 (got the result that i have to stop my already running default local development cluster) so how can i maybe change the port which will be used?

ad 3. i think i can only nuke a complete cluster (is there a way to only nuke one apps data?)

Upvotes: 0

Views: 354

Answers (1)

maticzav
maticzav

Reputation: 962

first, I think that what you mean with a cluster is actually a service. A cluster can hold multiple services, whereas the service is an instance you are connecting to with your client/server.

  1. You can have multiple named services in your localhost cluster. The only limit is a unique name and different stage per name. I think it might be possible to have multiple clusters but I see no use for it - at least locally.

  2. In order to delete a service and its data, you can use the following command. Go to the root of your project - where your Prisma service is defined and run the following command.

    prisma delete

    This will delete the service, including all of its data, you have defined in your current project file but will leave every other service you have in your cluster untouched.

  3. I think that 2. solves this.

  4. Use "local" as cluster name and change "service" name to navigate between different application/service deployments.

Hope I am not missing anything.

Upvotes: 1

Related Questions