How to Update a Project
To update a Project, you must use a updateProject
mutation. You have to provide projectId
for the Project you want
to update and any fields you want to update. See How to Get Projects for information on how
to retrieve your projects and their ids. Here's an example updating Project's name
:
- Mutation
- Variables
- Response
- cURL
mutation UpdateProject($input: UpdateProjectInput!) {
updateProject(input: $input) {
project {
...ProjectDetails
}
}
}
fragment ProjectDetails on Project {
id
name
# ...other fields you want to retrieve
}
{
"input": {
"projectId": "TjAwN1Byb2plY3Q5ODM5",
"name": "Updated www.lumar.io Project"
}
}
{
"data": {
"updateProject": {
"id": "TjAwN1Byb2plY3Q5ODM5",
"name": "Updated www.lumar.io Project"
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation UpdateProject($input: UpdateProjectInput!) { updateProject(input: $input) { project { ...ProjectDetails } } } fragment ProjectDetails on Project { id name # ...other fields you want to retrieve }","variables":{"input":{"projectId":"TjAwN1Byb2plY3Q5ODM5","name":"Updated www.lumar.io Project"}}}' https://api.lumar.io/graphql
Explore UpdateProjectInput
to see what fields are available.