Cycle API
CycleStatusChangelog
  • Cycle API
  • Introduction
    • About Cycle
    • Data model
  • The graphql API
    • How to start
    • Authentication
    • Node interface
    • Pagination
    • Webhooks
    • Limitations
    • Graphql Schema
    • Examples
  • Company
    • Company Attribute
    • List Company attributes by product
    • Create a company
    • Update a company attribute value
  • Practical use case: the feedback form
    • Create a feedback
    • Advanced: use your properties
Powered by GitBook
On this page
  • 1. Update a number attribute value
  • 2. Update a boolean attribute value
  • 3. Update a select attribute value with id
  • 4. Update a select attribute value with id
  1. Company

Update a company attribute value

With the updateCompanyAttributeValue mutation you can easily update a company attribute value for a given company in your Cycle workspace

1. Update a number attribute value

mutation updateCompanyAttribute {
  updateCompanyAttributeValue(
    companyId: "<productId>"
    attributeDefinitionId: "<attributeId>"
    value: { number: 10 }
  ) {
    __typename
  }
}

2. Update a boolean attribute value

mutation updateCompanyAttribute {
  updateCompanyAttributeValue(
    companyId: "<productId>"
    attributeDefinitionId: "<attributeId>"
    value: { checkbox: true }
  ) {
    __typename
  }
}

3. Update a select attribute value with id

mutation updateCompanyAttribute {
  updateCompanyAttributeValue(
    companyId: "<productId>"
    attributeDefinitionId: "<attributeId>"
    value: { select: "<valueId>" }
  ) {
    __typename
  }
}

4. Update a select attribute value with id

mutation updateCompanyAttribute {
  updateCompanyAttributeValue(
    companyId: "<productId>"
    attributeDefinitionId: "<attributeId>"
    value: { select: "<valueText>" }
  ) {
    __typename
  }
}
PreviousCreate a companyNextCreate a feedback

Last updated 11 months ago