entities.type
Read type records with the type repository, and change them with the type mutations. Same records as the REST Types entity.
- 5 queries
- 0 mutations
- REST: Types
Queries
Fields of entities { type { … } }.
| 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. | TypeEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [TypeEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: TypeFilterInput, orderBy: [TypeOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [TypeEntity!]! |
| QUERY | getByCriteria(filter: TypeFilterInput, orderBy: [TypeOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | TypeEntityConnection |
| 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!]! |
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.
TypeEntity object 13 fields: isDeleteProtected, id, primitiveType, …
Data type of fields, defining the kind of value, its validation and whether fields of the type can be filtered, sorted or grouped.
| 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. |
primitiveType | PrimitiveType! | Underlying data type of values of this field type, such as STRING, DECIMAL or DATETIME. Read-only. |
validator | JSONString | Validation rules applied to values of this type (e.g. max length, regex, allowed enum values), as a JSON document. |
flag | Int! | What fields of this type can do, as a sum of flags: 1 - can be a custom field, 2 - can have a calculation formula, 4 - can have a default value, 8 - can be shown on mobile, 16 - needs a field mapping, 32 - cannot be placed on forms, 64 - can be read-only on forms, 128 - only on the main form, 256 - … |
defaultValue | String | Default value applied to fields of this type when no value is supplied at create-time. Empty when the type has no default. |
relationType | RelationType! | Whether fields of this type hold a plain value (NO_RELATION), a reference to one related record (MANY_TO_ONE_SCALAR) or a collection of related records (MANY_TO_MANY_VECTOR). |
containerSize | Int! | Maximum length or capacity for fields of this type (e.g. string max-length). |
isGroupable | Boolean! | True when fields of this type can be used as a grouping column in reports. |
isFilterable | Boolean! | True when fields of this type can be used in filters. |
isSortable | Boolean! | True when fields of this type can be used to sort records. |
isSelectable | Boolean! | True when fields of this type can be selected in queries. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
TypeEntityConnection object pageInfo: PageInfo!, edges: [TypeEntityEdge]!, totalCount: Int
Paginated list of Type records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [TypeEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
TypeEntityEdge object node: TypeEntity, cursor: String!
A Relay edge containing a TypeEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | TypeEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
PrimitiveTypeFilterInput input eq: [PrimitiveType!], NOT: PrimitiveTypeFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [PrimitiveType!] | Matches any of the listed values. |
NOT | PrimitiveTypeFilterInput | Matches values that do not meet this condition. |
RelationTypeFilterInput input eq: [RelationType!], NOT: RelationTypeFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [RelationType!] | Matches any of the listed values. |
NOT | RelationTypeFilterInput | Matches values that do not meet this condition. |
TypeFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for Type records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [TypeFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [TypeFilterInput!] | Matches records that meet all of the listed filters. |
NOT | TypeFilterInput | 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. |
primitiveType | PrimitiveTypeFilterInput | Underlying data type of values of this field type, such as STRING, DECIMAL or DATETIME. Read-only. |
flag | EntityFilterNumberField | What fields of this type can do, as a sum of flags: 1 - can be a custom field, 2 - can have a calculation formula, 4 - can have a default value, 8 - can be shown on mobile, 16 - needs a field mapping, 32 - cannot be placed on forms, 64 - can be read-only on forms, 128 - only on the main form, 256 - … |
defaultValue | EntityFilterStringField | Default value applied to fields of this type when no value is supplied at create-time. Empty when the type has no default. |
relationType | RelationTypeFilterInput | Whether fields of this type hold a plain value (NO_RELATION), a reference to one related record (MANY_TO_ONE_SCALAR) or a collection of related records (MANY_TO_MANY_VECTOR). |
containerSize | EntityFilterNumberField | Maximum length or capacity for fields of this type (e.g. string max-length). |
isGroupable | Boolean | True when fields of this type can be used as a grouping column in reports. |
isFilterable | Boolean | True when fields of this type can be used in filters. |
isSortable | Boolean | True when fields of this type can be used to sort records. |
isSelectable | Boolean | True when fields of this type can be selected in queries. |
TypeOrderByInput input Asc or Desc per field
Sorting of Type 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. |
flag | OrderByEnum | What fields of this type can do, as a sum of flags: 1 - can be a custom field, 2 - can have a calculation formula, 4 - can have a default value, 8 - can be shown on mobile, 16 - needs a field mapping, 32 - cannot be placed on forms, 64 - can be read-only on forms, 128 - only on the main form, 256 - … |
defaultValue | OrderByEnum | Default value applied to fields of this type when no value is supplied at create-time. Empty when the type has no default. |
containerSize | OrderByEnum | Maximum length or capacity for fields of this type (e.g. string max-length). |
isGroupable | OrderByEnum | True when fields of this type can be used as a grouping column in reports. |
isFilterable | OrderByEnum | True when fields of this type can be used in filters. |
isSortable | OrderByEnum | True when fields of this type can be used to sort records. |
isSelectable | OrderByEnum | True when fields of this type can be selected in queries. |
PrimitiveType enum BLOB, BOOL, DATE, DATETIME, DECIMAL, DOUBLE, … (14 values)
Underlying data type of a field type.
| Value | Description |
|---|---|
BLOB | Structured payload, such as a JSON document, form definition or geolocation. |
BOOL | True/false value. |
DATE | Calendar date without time. |
DATETIME | Date and time. |
DECIMAL | Exact decimal number, used for amounts, prices and quantities. |
DOUBLE | Floating-point number, used for example for percentages. |
DYNAMIC | Value whose type depends on context, such as a target value. |
ENUM | One value, or a combination of flags, from a fixed set of options. |
INT | Whole number. |
LIST | List of values, such as multi-select options, lookup links or attachments. |
OBJECT | Composite value, such as a record card, date range or key-value map. |
STRING | Text. |
UUID | Identifier, typically a reference to another record or option. |
TSVECTOR | Full-text search index of the record; not a user-editable value. |
RelationType enum NO_RELATION, MANY_TO_ONE_SCALAR, MANY_TO_MANY_VECTOR
Whether a field type holds a plain value or references related records.
| Value | Description |
|---|---|
NO_RELATION | Plain value; no related record. |
MANY_TO_ONE_SCALAR | Reference to a single related record. |
MANY_TO_MANY_VECTOR | Collection of related records. |