GraphQLRepositoriesproductCategory
entities.productCategory
Read product category records with the productCategory repository, and change them with the product category mutations. Same records as the REST ProductCategories entity.
Queries
Fields of entities { productCategory { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | ProductCategoryEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [ProductCategoryEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: ProductCategoryFilterInput, orderBy: [ProductCategoryOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [ProductCategoryEntity!]! |
| QUERY | getByCriteria(filter: ProductCategoryFilterInput, orderBy: [ProductCategoryOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | ProductCategoryEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createProductCategory(input: CreateProductCategoryInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateProductCategoryPayload |
| MUTATION | updateProductCategory(input: UpdateProductCategoryInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateProductCategoryPayload |
| MUTATION | bulkUpdateProductCategory(input: [CreateOrUpdateProductCategoryInput!]!, deleteInput: [DeleteProductCategoryInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdateProductCategoryPayload |
| MUTATION | deleteProductCategory(input: DeleteProductCategoryInput!) | Soft-delete | DeleteProductCategoryPayload |
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
ProductCategoryEntity object 11 fields: isDeleteProtected, id, isDeleted, …
Category in the hierarchy of the product catalog.
| Field | Type | Description |
|---|---|---|
isDeleteProtected | Boolean! | True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
parent | ProductCategoryEntity | Parent category in the catalog hierarchy. Empty for top-level categories. |
name | String! | Name of the entity and its default text representation. |
parentId | ID | Id of the parent category. |
revision | Int | Revision when entity was lastly changed. |
productRelations | ProductEntityConnection (7 args) | All Products in this category. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
ProductCategoryEntityConnection object pageInfo: PageInfo!, edges: [ProductCategoryEntityEdge]!, totalCount: Int
Paginated list of ProductCategory records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [ProductCategoryEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
ProductCategoryEntityEdge object node: ProductCategoryEntity, cursor: String!
A Relay edge containing a ProductCategoryEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | ProductCategoryEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
ProductCategoryFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for ProductCategory records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [ProductCategoryFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [ProductCategoryFilterInput!] | Matches records that meet all of the listed filters. |
NOT | ProductCategoryFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
name | EntityFilterStringField | Name of the entity and its default text representation. |
parentId | EntityFilterStringField | Id of the parent category. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
parent | ProductCategoryFilterInput | Parent category in the catalog hierarchy. Empty for top-level categories. Matches records where a related record meets these conditions. |
productRelations | ProductFilterInput | All Products in this category. Matches records where a related record meets these conditions. |
ProductCategoryOrderByInput input Asc or Desc per field
Sorting of ProductCategory records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
parent | [ProductCategoryOrderByNestedInput!] | Parent category in the catalog hierarchy. Empty for top-level categories. Sorts by fields of the related record, listed in order of priority. |
name | OrderByEnum | Name of the entity and its default text representation. |
parentId | OrderByEnum | Id of the parent category. |
revision | OrderByEnum | Revision when entity was lastly changed. |
CreateOrUpdateProductCategoryInput input 8 fields: clientMutationId, id, modified, …
Field values of a ProductCategory record to create, or to update when its id is set.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
name | String | Name of the entity and its default text representation. |
parentId | ID | Id of the parent category. |
revision | Int | Revision when entity was lastly changed. |
productRelations | [CreateProductNoProductCategoryBackrefInput!] | All Products in this category. |
CreateProductCategoryInput input 7 fields: clientMutationId, modified, created, …
Field values of a new ProductCategory record.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
name | String! | Name of the entity and its default text representation. |
parentId | ID | Id of the parent category. |
revision | Int | Revision when entity was lastly changed. |
productRelations | [CreateProductNoProductCategoryBackrefInput!] | All Products in this category. |
CreateProductNoProductCategoryBackrefInput input 16 fields: modified, created, picture, …
Field values of a new Product record, created together with the record it belongs to.
| Input field | Type | Description |
|---|---|---|
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
picture | CreateCloudObjectInput | Product picture. |
allowedPipelines | AccessPipelinesEnum | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | ID | Id of the currency exchange rate list applied to this product. |
description | String | Free-form description of the product. |
name | String! | Name of the product, shown in catalogues and pickers. |
pictureId | ID | Id of the product picture document. |
productTypeId | ID | Id of the product type that classifies this product. |
sku | String | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | String | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
customFields | JSONString | Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field. |
revision | Int | Revision when entity was lastly changed. |
productPipelineRelations | [CreateProductPipelineRelationNoProductBackrefInput!] | Deprecated pipeline connection. |
productPipelines | ProductPipelinesInput | Configuration of Pipelines where the Product can be used. |
pictureSourceUrl | String | URL of an image to use as the product picture. The image is downloaded from this URL and checked; only pictures are supported. |
DeleteProductCategoryInput input clientMutationId: String, id: ID!
Id of the ProductCategory record to delete.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
UpdateProductCategoryInput input 8 fields: clientMutationId, id, modified, …
Id of a ProductCategory record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
name | String | Name of the entity and its default text representation. |
parentId | ID | Id of the parent category. |
revision | Int | Revision when entity was lastly changed. |
productRelations | [CreateProductNoProductCategoryBackrefInput!] | All Products in this category. |
BulkUpdateProductCategoryPayload object result: BulkUpdateResults!
Result of the bulkUpdateProductCategory mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreateProductCategoryPayload object productCategory: ProductCategoryEntity, clientMutationId: String
Result of the createProductCategory mutation.
| Field | Type | Description |
|---|---|---|
productCategory | ProductCategoryEntity | The created record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
DeleteProductCategoryPayload object productCategory: ProductCategoryEntity, clientMutationId: String
Result of the deleteProductCategory mutation.
| Field | Type | Description |
|---|---|---|
productCategory | ProductCategoryEntity | The deleted record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
UpdateProductCategoryPayload object productCategory: ProductCategoryEntity, clientMutationId: String
Result of the updateProductCategory mutation.
| Field | Type | Description |
|---|---|---|
productCategory | ProductCategoryEntity | The updated record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |