Record
Record: a row of a table defined in app/schema, holding its values in properties
type Record implements HasModelsInterfaceForRecords, HasRecordsInterface, HasUsersInterface, PropertiesInterface, RemoteRecordsInterface, RemoteUsersInterface {
address(name: String!): CustomAddrress
addresses(name: String): [CustomAddrress!]
attachment(name: String!): PrivateFile
attachments(name: String): [PrivateFile!]
created_at: JSONDate!
customizable_id: ID
customizable_type: String
deleted_at: JSONDate
external_id: ID
id: ID
image(name: String!): Image
images(name: String): [Image!]
model(
filter: ModelsFilterInput
foreign_property: String = "id"
join_on_property: String!
model_name: [String]!
sort: [ModelsSortInput!]
): Model
model_schema_id: ID!
model_schema_name: String
models(
foreign_property: String!
join_on_property: String!
limit: Int
model_name: [String]!
sort: [ModelsSortInput!]
): [Model!]
name: String
properties(select: [PropertiesFieldInput!]): HashObject
property(name: String!): String
property_array(name: String!): [String!]
property_boolean(name: String!): Boolean
property_float(name: String!): Float
property_int(name: String!): Int
property_json(name: String!): JSONPayload
property_object(name: String!): HashObject
property_upload(expires_in: Int, name: String!): PropertyUpload
related_model(
filter: ModelsFilterInput
foreign_property: String = "id"
join_on_property: String!
model_schema_name: [String]!
sort: [ModelsSortInput!]
): Model
related_models(
filter: ModelsFilterInput
foreign_property: String!
join_on_property: String!
limit: Int
model_schema_name: [String]!
sort: [ModelsSortInput!]
): [Model!]
related_record(
filter: RecordsFilterInput
foreign_property: String = "id"
join_on_property: String!
sort: [RecordsSortInput!]
table: [String]!
): Record
related_records(
filter: RecordsFilterInput
foreign_property: String!
join_on_property: String!
limit: Int
sort: [RecordsSortInput!]
table: [String]!
): [Record!]
related_user(
filter: UsersFilterInput
foreign_property: String = "id"
join_on_property: String = "user_id"
sort: [UsersSortInput!]
): User
related_users(
filter: UsersFilterInput
foreign_property: String!
join_on_property: String!
limit: Int
sort: [UsersSortInput!]
): [User!]
remote_records(endpoint: Endpoint!, join_on_property: String!): [Record!]
remote_users(endpoint: Endpoint!, join_on_property: String!): [User!]
table: String
table_id: ID!
updated_at: JSONDate!
user(
foreign_property: String = "id"
join_on_property: String = "user_id"
sort: [UsersSortInput!]
): User
user_id: ID
users(
foreign_property: String!
join_on_property: String!
limit: Int
sort: [UsersSortInput!]
): [User!]
}
Fields
address (CustomAddrress)
Returns the legacy address property with the given name. Deprecated, store addresses in your own table
-
name(String)
Name of the address property
addresses (CustomAddrress)
Returns legacy address properties, optionally only those with the given name.
Deprecated, store addresses in your own table
-
name(String)
Name of the address property; all when omitted
attachment (PrivateFile)
Returns the legacy attachment property with the given name. Deprecated, use property_upload
-
name(String)
Name of the attachment property
attachments (PrivateFile)
Returns legacy attachment properties, optionally only those with the given name. Deprecated, use property_upload
-
name(String)
Name of the attachment property; all when omitted
created_at (JSONDate)
Timestamp of when the object was created, set automatically by the system
customizable_id (ID)
Deprecated, ID of the attached-to object
customizable_type (String)
Deprecated, type of the attached-to object
deleted_at (JSONDate)
Timestamp of when the object was soft deleted, populated by the delete action.
It is also possible to set it manually via update. To undelete, change it back
to an empty value; note that associated objects need to be undeleted manually as well.
external_id (ID)
Identifier of the object in an external system. Used mainly for import/export,
when a third party service is the source of truth
id (ID)
Unique identifier of the object
image (Image)
Returns the legacy image property with the given name. Deprecated, use property_upload
-
name(String)
Name of the image property
images (Image)
Returns legacy image properties, optionally only those with the given name. Deprecated, use property_upload
-
name(String)
Name of the image property; all when omitted
model (Model)
Returns one related model. Deprecated, use related_record
-
filter(ModelsFilterInput)
Additional conditions the related objects must match
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
model_name(String)
Name of the model schema (table) of the related models
-
sort(ModelsSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
model_schema_id (ID)
Deprecated, use table_id
model_schema_name (String)
Deprecated, use table
models (Model)
Returns related models. Deprecated, use related_records
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
limit(Int)
Maximum number of related objects returned for each object
-
model_name(String)
Name of the model schema (table) of the related models
-
sort(ModelsSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
name (String)
Deprecated, use table
properties (HashObject)
All properties of the object as an object keyed by property name
-
select(PropertiesFieldInput)
Properties to return, each converted to the given type (as by the matching
property_* field; other types become strings); all properties as stored when omitted
property (String)
Returns the value of the property with the given name as a string; ex: hair_color: property(name: "hair_color")
-
name(String)
Name of the property
property_array (String)
Returns the value of the property with the given name as an array of strings;
a single value is wrapped in an array and no value gives an empty array; ex:
todo_list: property_array(name: "todo_list")
-
name(String)
Name of the property
property_boolean (Boolean)
Returns the value of the property with the given name as a boolean. Accepts
true/false values and the strings "t"/"T" and "f"/"F"; any other value returns
an error; ex: enabled: property_boolean(name: "enabled")
-
name(String)
Name of the property
property_float (Float)
Returns the value of the property with the given name as a float; returns an
error when the value is not a number; ex: price: property_float(name: "price")
-
name(String)
Name of the property
property_int (Int)
Returns the value of the property with the given name as an integer; returns
an error when the value cannot be converted, e.g. "abc" or "1.5"; ex: age:
property_int(name: "age")
-
name(String)
Name of the property
property_json (JSONPayload)
Returns the value of the property with the given name as stored, without conversion
-
name(String)
Name of the property
property_object (HashObject)
Returns the value of the property with the given name parsed from JSON text
into an object; returns an error when the value is not valid JSON
-
name(String)
Name of the property
property_upload (PropertyUpload)
Returns the file stored in the given upload property; ex: avatar: property_upload(name: "avatar") { url }
-
expires_in(Int)
Number of seconds for which the returned URLs are valid. When given, signed
URLs are returned; required to access files uploaded with acl private
-
name(String)
Name of the upload property
related_model (Model)
Returns one related model. Deprecated, use related_record
-
filter(ModelsFilterInput)
Additional conditions the related objects must match
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
model_schema_name(String)
Name of the model schema (table) of the related models
-
sort(ModelsSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
related_models (Model)
Returns related models. Deprecated, use related_records
-
filter(ModelsFilterInput)
Additional conditions the related objects must match
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
limit(Int)
Maximum number of related objects returned for each object
-
model_schema_name(String)
Name of the model schema (table) of the related models
-
sort(ModelsSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
related_record (Record)
Returns one record of the given table whose foreign_property equals the value
of join_on_property of this object (belongs-to or has-one relation). When
several records match, the last one in sort order is returned, by default the
most recently updated; ex: parent: related_record(table: "parent",
join_on_property: "parent_id") { id }
-
filter(RecordsFilterInput)
Additional conditions the related record must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id) of the related object that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute, e.g. id or user_id) of this object whose
value is matched against foreign_property. When the value is an array,
records matching any of its elements are returned. Returns an error when
this object has no such property
-
sort(RecordsSortInput)
Sort order used to pick the record; updated_at ascending when omitted
-
table(String)
Name of the table (or tables) the related record belongs to
related_records (Record)
Returns records of the given table whose foreign_property equals the value of
join_on_property of this object (has-many relation). Related records of all
objects in the result are loaded in one batch of at most 10,000 records,
soft-deleted records are skipped; ex: children: related_records(table:
"child", join_on_property: "id", foreign_property: "parent_id") { id }
-
filter(RecordsFilterInput)
Additional conditions the related records must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id) of the related object that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute, e.g. id or user_id) of this object whose
value is matched against foreign_property. When the value is an array,
records matching any of its elements are returned. Returns an error when
this object has no such property
-
limit(Int)
Maximum number of related objects returned for each object
-
sort(RecordsSortInput)
Sort order of the related records; updated_at ascending when omitted
-
table(String)
Name of the table (or tables) the related records belong to
related_user (User)
Returns the user whose foreign_property equals the value of join_on_property
of this object (belongs-to relation); by default the user whose id is in
user_id; ex: invited_by: related_user(join_on_property: "invited_by_id") { id }
-
filter(UsersFilterInput)
Additional conditions the related user must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id, email, slug or external_id) of
the user that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object whose value is matched
against foreign_property. Must not be an array (use related_users). Returns
an error when this object has no such property
-
sort(UsersSortInput)
Sort order used to pick the user when several match; the last one is returned
related_users (User)
Returns users whose foreign_property equals the value of join_on_property of
this object (has-many relation). Related users of all objects in the result
are loaded in one batch of at most 10,000 users, soft-deleted users are
skipped; ex: members: related_users(join_on_property: "id", foreign_property:
"company_id") { id }
-
filter(UsersFilterInput)
Additional conditions the related users must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id, email, slug or external_id) of
the user that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute, e.g. id) of this object whose value is
matched against foreign_property. When the value is an array, users matching
any of its elements are returned. Returns an error when this object has no such property
-
limit(Int)
Maximum number of related objects returned for each object
-
sort(UsersSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
remote_records (Record)
Returns records loaded from a remote endpoint: the value of join_on_property
is sent as ids and the records in the JSON response are returned. Requests of
all objects in the result are batched. Not available while serving a request
made by another platformOS remote fetch (returns null)
-
endpoint(Endpoint)
Remote endpoint returning the resources for the given ids as JSON
-
join_on_property(String)
Name of the property of this object holding the id (or array of ids) to request
remote_users (User)
Returns users loaded from a remote endpoint: the value of join_on_property is
sent as ids and the users in the JSON response are returned. Requests of all
objects in the result are batched. Not available while serving a request made
by another platformOS remote fetch (returns null)
-
endpoint(Endpoint)
Remote endpoint returning the resources for the given ids as JSON
-
join_on_property(String)
Name of the property of this object holding the id (or array of ids) to request
table (String)
Name of the table the record belongs to; "DELETED" for a soft-deleted record whose table no longer exists
table_id (ID)
ID of the table the record belongs to
updated_at (JSONDate)
Timestamp of when the object was last updated, set automatically by the system
user (User)
Returns the related user. Deprecated, use related_user
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
sort(UsersSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
user_id (ID)
ID of the user who owns the record
users (User)
Returns related users. Deprecated, use related_users
-
foreign_property(String)
Name of the property (or attribute) of the related object equal to join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object matched against foreign_property
-
limit(Int)
Maximum number of related objects returned for each object
-
sort(UsersSortInput)
Sort order of the results. When several entries are given, they are applied in the given order
Interfaces
HasModelsInterfaceForRecords
Deprecated relations of a record to models and users; use related_records and related_users instead
HasRecordsInterface
Object that can load related records
HasUsersInterface
Object that can load related users
PropertiesInterface
Object with properties, including upload properties
RemoteRecordsInterface
Object that can load related records over HTTP from a remote endpoint
RemoteUsersInterface
Object that can load related users over HTTP from a remote endpoint