Homepage

HasModelsInterface

Last edit: Oct 13, 2026

Object that can load related users and (deprecated) related models

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)

Returns one related model. Deprecated, use related_record

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

models (Model)

Returns related models. Deprecated, use related_records

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

Returns one related model. Deprecated, use related_record

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

Returns related models. Deprecated, use related_records

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

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 }

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Sort order of the results. When several entries are given, they are applied in the given order

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: friends: related_users(join_on_property: "friend_ids",
foreign_property: "id") { id }

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Sort order of the results. When several entries are given, they are applied in the given order

user (User)

Returns the related user. Deprecated, use related_user

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Sort order of the results. When several entries are given, they are applied in the given order

users (User)

Returns related users. Deprecated, use related_users

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Sort order of the results. When several entries are given, they are applied in the given order

Questions?

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

contact us