entities.data
Read data records with the data repository, and change them with the data mutations. Same records as the REST Data entity.
Queries
Fields of entities { data { … } }.
| 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. | DataEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [DataEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [DataEntity!]! |
| QUERY | getByCriteria(filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | DataEntityConnection |
| QUERY | getPublished(limit: Int, offset: Int, filter: DataFilterInput, orderBy: [DataOrderByInput!], includeDeleted: Boolean)Returns the published records that match the filter, paged with limit and offset. | [DataEntity!]! |
| QUERY | getDrafts(filter: DataFilterInput, orderBy: [DataOrderByInput!])Returns the records that match the filter, with pending unpublished changes applied where a draft exists. | [DataEntity!]! |
| QUERY | getDraftById(entityId: ID!)Returns the record with the given id, with its pending unpublished changes applied when a draft exists. | DataEntity! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | restoreData(input: RestoreDataInput!) | Restore a deleted record | RestoreDataPayload |
| MUTATION | deleteData(input: DeleteDataInput!) | Soft-delete | DeleteDataPayload |
| MUTATION | createData(input: CreateDataInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateDataPayload |
| MUTATION | updateData(input: UpdateDataInput!, validationLevel: [ValidationLevel!]) | Update fields | UpdateDataPayload |
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.
DataEntity object 16 fields: isDeleteProtected, hasDraft, id, …
Option of a dropdown or multi-select field, one of the values users can choose from.
| 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. |
hasDraft | Boolean | True when the record has unpublished draft changes, including pending translation changes, that can be published. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
allowedBy | JSONString | For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available. |
calcValue | Float | Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option). |
dataSetId | ID! | Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field. |
optionName | String! | Name of the entity and its default text representation. |
sortOrder | Int! | Position of the option within its data set; lower values appear first. |
isPublished | Boolean | True when the entity configuration is published; false while it exists only as an unpublished draft. |
revision | Int | Revision when entity was lastly changed. |
optionNameTranslations | JSONString! | Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined. |
optionNameTranslated | String | Option name in the current user's language, taken from optionNameTranslations. Empty when no translation is available for that language. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
DataEntityConnection object pageInfo: PageInfo!, edges: [DataEntityEdge]!, totalCount: Int
Paginated list of Data records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [DataEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
DataEntityEdge object node: DataEntity, cursor: String!
A Relay edge containing a DataEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | DataEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
DataFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for Data records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [DataFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [DataFilterInput!] | Matches records that meet all of the listed filters. |
NOT | DataFilterInput | 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. |
calcValue | EntityFilterNumberField | Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option). |
dataSetId | EntityFilterStringField | Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field. |
optionName | EntityFilterStringField | Name of the entity and its default text representation. |
sortOrder | EntityFilterNumberField | Position of the option within its data set; lower values appear first. |
isPublished | Boolean | True when the entity configuration is published; false while it exists only as an unpublished draft. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
DataOrderByInput input Asc or Desc per field
Sorting of Data 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. |
calcValue | OrderByEnum | Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option). |
optionName | OrderByEnum | Name of the entity and its default text representation. |
sortOrder | OrderByEnum | Position of the option within its data set; lower values appear first. |
isPublished | OrderByEnum | True when the entity configuration is published; false while it exists only as an unpublished draft. |
revision | OrderByEnum | Revision when entity was lastly changed. |
CreateDataInput input 11 fields: clientMutationId, modified, created, …
Field values of a new Data 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. |
allowedBy | JSONString | For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available. |
calcValue | Float | Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option). |
dataSetId | ID! | Identifier of the data set this option belongs to. Shared by all options of a dropdown / radio / multiselect field. |
optionName | String! | Name of the entity and its default text representation. |
sortOrder | Int! | Position of the option within its data set; lower values appear first. |
isPublished | Boolean | True when the entity configuration is published; false while it exists only as an unpublished draft. |
revision | Int | Revision when entity was lastly changed. |
optionNameTranslations | JSONString | Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined. |
DeleteDataInput input clientMutationId: String, id: ID!
Id of the Data 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. |
RestoreDataInput input sortOrder: Int!, id: ID!, clientMutationId: String
Parameters of the restoreData mutation.
| Input field | Type | Description |
|---|---|---|
sortOrder | Int! | Zero-based position of the restored option within its data set; the other options are renumbered around it. |
id | ID! | Identifier of the DataEntity to perform the action on. |
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). |
UpdateDataInput input 10 fields: clientMutationId, id, modified, …
Id of a Data 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. |
allowedBy | JSONString | For dependent dropdowns, the parent-field values this option is available for, as a JSON array of identifiers (option ids or enum names). Empty when always available. |
calcValue | Float | Numeric value associated with the option, used in calculation formulas (e.g. score of a dropdown option). |
optionName | String | Name of the entity and its default text representation. |
sortOrder | Int | Position of the option within its data set; lower values appear first. |
revision | Int | Revision when entity was lastly changed. |
optionNameTranslations | JSONString | Map of locale codes to translated option names (e.g. {"en-US": "Hot", "de-DE": "Heiß"}). Empty when no translations are defined. |
CreateDataPayload object data: DataEntity, clientMutationId: String
Result of the createData mutation.
| Field | Type | Description |
|---|---|---|
data | DataEntity | 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). |
DeleteDataPayload object data: DataEntity, clientMutationId: String
Result of the deleteData mutation.
| Field | Type | Description |
|---|---|---|
data | DataEntity | 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). |
RestoreDataPayload object result: DataEntity, clientMutationId: String
Result of the restoreData mutation.
| Field | Type | Description |
|---|---|---|
result | DataEntity | The restored option. |
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). |
UpdateDataPayload object data: DataEntity, clientMutationId: String
Result of the updateData mutation.
| Field | Type | Description |
|---|---|---|
data | DataEntity | 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). |