Company Attribute
With the addNewCompanyAttribute mutation you can easily create a new attribute linked to your companies in your Cycle workspace. Attribute type can be a single select, a number, a text or a boolean
1. Create a number company attribute
mutation createScalarAttribute {
addNewCompanyAttribute(
input: {
productId: "<productId>"
name: "companyPropertyScalar"
color: a
type: { scalar: { type: NUMBER } }
}
) {
__typename
}
}
2. Create a select company attribute
mutation createSingleSelectAttribute {
addNewCompanyAttribute(
input: {
productId: "<productId>"
name: "companyPropertySelect"
color: a
type: { select: { type: SINGLE_SELECT, values: ["a", "b"] } }
}
) {
__typename
}
}
3. Create a text attribute
mutation scalarTextAttribute {
addNewCompanyAttribute(
input: {
productId: "<productId>"
name: "companyPropertyCheckBox"
color: a
type: { scalar: { type: TEXT } }
}
) {
__typename
}
}
4. Create a boolean attribute
mutation scalarBooleanAttribute {
addNewCompanyAttribute(
input: {
productId: "<productId>"
name: "companyPropertyCheckBox"
color: a
type: { scalar: { type: BOOLEAN } }
}
) {
__typename
}
}
5. Built in company attributes
In Cycle there are 2 builtin attributes which can be linked to a company.
type Company implements Node {
id: ID!
arr: Float
numberOfEmployees: Int
...
}
Last updated