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. Company

List Company attributes by product

With product companyAttributeDefinitions resolvers, you can list all Company attributes

query ProductCompanyAttribute {
  node (id: "<productId>") {
    ... on Product {
      id
      slug
       companyAttributeDefinitions {
              edges {
                node {
                  __typename
                  ... on AttributeSingleSelectDefinition {
                    id
                    name
                    valuesV2 {
                      edges {
                        node {
                          id
                          value
                        }
                      }
                    }
                  }
                  ... on AttributeCheckboxDefinition {
                    id
                    name
                  }
                  ... on AttributeNumberDefinition {
                    id
                    name
                  }
                  ... on AttributeTextDefinition {
                    id
                    name
                  }
                }
              }
            }
    }
  }
}
PreviousCompany AttributeNextCreate a company

Last updated 10 months ago