RelationOnDemandInterface
No description
interface RelationOnDemandInterface {
model(
foreign_property: String = "id"
join_on_property: String
model_name: String
): ListingsCustomization
models(
foreign_property: String!
join_on_property: String!
model_name: [String]
): [ListingsCustomization!]
related_model(
foreign_property: String = "id"
join_on_property: String
model_schema_name: String
): ListingsCustomization
related_models(
foreign_property: String!
join_on_property: String!
model_schema_name: [String]
): [ListingsCustomization!]
related_user(
foreign_property: String = "id"
join_on_property: String = "user_id"
): User
user(
foreign_property: String = "id"
join_on_property: String = "user_id"
): User
}
Fields
model (ListingsCustomization)
Defines belongs-to relation with other model; ex: parent: model(model_name:
"parent", join_on_property: "parent_id") { id }
-
foreign_property(String)
Load resources with foreign_property == join_on_property
-
join_on_property(String)
Load remote resource with id == join_on_property
-
model_name(String)
Joins model [formaly customization] with custom-model-type-name == model_name
models (ListingsCustomization)
Defines has-many relation with other model; ex: children: models(model_name:
"child", join_on_property: "parent_id", foreign_property: "parent_id") { id }
-
foreign_property(String)
Load resources with foreign_property == join_on_property
-
join_on_property(String)
Load resources with foreign_property == join_on_property
-
model_name(String)
Joins model [formaly customization] with custom-model-type-name == model_name
related_model (ListingsCustomization)
Defines belongs-to relation with other model; ex: parent: model(model_name:
"parent", join_on_property: "parent_id") { id }
-
foreign_property(String)
Load resources with foreign_property == join_on_property
-
join_on_property(String)
Load remote resource with id == join_on_property
-
model_schema_name(String)
Joins model [formaly customization] with custom-model-type-name == model_name
related_models (ListingsCustomization)
Defines has-many relation with other model, returns maximum of 10000 records
at once; ex: children: models(model_name: "child", join_on_property:
"parent_id", foreign_property: "parent_id") { id }
-
foreign_property(String)
Load resources with foreign_property == join_on_property
-
join_on_property(String)
Load resources with foreign_property == join_on_property
-
model_schema_name(String)
Joins model [formaly customization] with custom-model-type-name == model_name
related_user (User)
Defines relation with other user, returns maximum of 10000 records at once;
ex: invited_by: user(join_on_property: "invited_by_id") { id }
user (User)
Defines relation with other user; ex: invited_by: user(join_on_property: "invited_by_id") { id }