HasRecordsInterface
Last edit: Oct 26, 2022
No description
interface HasRecordsInterface {
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!]
}
Fields
related_record
(Record
)
Defines has-one relation with other record; ex: children: records(table:
"child" join_on_property: "parent_id" foreign_property: "parent_id") { id }
-
filter
(RecordsFilterInput
) -
foreign_property
(String
)
Load resources with foreign_property == join_on_property
-
join_on_property
(String
)
Load resources with foreign_property == join_on_property
-
sort
(RecordsSortInput
) -
table
(String
)
Joins record [formaly customization] with record-schema-name == table
related_records
(Record
)
Defines has-many relation with other records; ex: children:
related_records(table: "children", join_on_property: "parent_id",
foreign_property: "parent_id") { id }
-
filter
(RecordsFilterInput
) -
foreign_property
(String
)
Load resources with foreign_property == join_on_property
-
join_on_property
(String
)
Load resources with foreign_property == join_on_property
-
limit
(Int
) -
sort
(RecordsSortInput
) -
table
(String
)
Define table name which should be used as a source for related records