This is an example of a using the CreateProject mutation in the Rize GraphQL API. Be sure to have your API key available (see Authentication if you don’t have one yet).

Example via Curl

curl -X POST <https://api.rize.io/api/v1/graphql> \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-d '{
  "query": "mutation CreateProject($name: String!) { createProject(input: { args: { name: $name } }) { project { id name } } }",
  "variables": {
    "name": "Your Project Name"
  }
}'

Successful response

{"data":{"createProject":{"project":{"id":"124112319","name":"Your Project Name"}}}}

Error response

{"data":{"createProject":null},"errors":[{"message":"You must be signed in to access mutation CreateProject","locations":[{"line":1,"column":42}],"path":["createProject"],"extensions":{"code":"AUTHENTICATION_ERROR"}}]}

Example via GraphQL Playground

https://www.loom.com/share/981b0b42d7cf4393ac7455e5e3d0fc46