Homepage

HasUsersInterface

Last edit: Oct 26, 2022

No description

interface HasUsersInterface {
  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!]
}

Fields

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

Questions?

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

contact us