Homepage

HasModelsInterface

Last edit: Oct 26, 2022

No description

interface HasModelsInterface {
  model(
    filter: ModelsFilterInput
    foreign_property: String = "id"
    join_on_property: String!
    model_name: [String]!
    sort: [ModelsSortInput!]
  ): Model
  models(
    foreign_property: String!
    join_on_property: String!
    limit: Int
    model_name: [String]!
    sort: [ModelsSortInput!]
  ): [Model!]
  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_user(
    filter: ModelsFilterInput
    foreign_property: String = "id"
    join_on_property: String = "user_id"
    sort: [UsersSortInput!]
  ): User
  related_users(
    filter: ModelsFilterInput
    foreign_property: String!
    join_on_property: String!
    limit: Int
    sort: [UsersSortInput!]
  ): [User!]
  user(
    foreign_property: String = "id"
    join_on_property: String = "user_id"
    sort: [UsersSortInput!]
  ): User
  users(
    foreign_property: String!
    join_on_property: String!
    limit: Int
    sort: [UsersSortInput!]
  ): [User!]
}

Fields

model (Model)

Defines has-one relation with other model, e.g: children: models(model_name:
"child" join_on_property: "parent_id" foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

Joins model [formaly customization] with model-schema-name == model_name

models (Model)

Defines has-many relation with other model; ex: children: models(model_name:
"child", join_on_property: "parent_id", foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

Joins model [formaly customization] with model-schema-name == model_name

Defines has-one relation with other model; ex: children: models(model_name:
"child" join_on_property: "parent_id" foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

Joins model [formaly customization] with model-schema-name == model_schema_name

Defines has-many relation with other model; ex: children:
related_models(model_schema_name: "child", join_on_property: "parent_id",
foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

Joins model [formaly customization] with model-schema-name == model_schema_name

Defines relation with other user; ex: invited_by: related_user(join_on_property: "invited_by_id") { id }

Load resources with foreign_property == join_on_property

Defines has-many relation with other user; ex: children:
users(join_on_property: "parent_id", foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

user (User)

Defines relation with other user; ex: invited_by: user(join_on_property: "invited_by_id") { id }

Load resources with foreign_property == join_on_property

users (User)

Defines has-many relation with other user; ex: children:
users(join_on_property: "parent_id", foreign_property: "parent_id") { id }

Load resources with foreign_property == join_on_property

Load resources with foreign_property == join_on_property

Contribute to this page

Github Icon

Questions?

We are always happy to help with any questions you may have.

contact us