HasUsersInterface
Object that can load related users
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
related_user (User)
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 }
-
filter(UsersFilterInput)
Additional conditions the related user must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id, email, slug or external_id) of
the user that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute) of this object whose value is matched
against foreign_property. Must not be an array (use related_users). Returns
an error when this object has no such property
-
sort(UsersSortInput)
Sort order used to pick the user when several match; the last one is returned
related_users (User)
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: members: related_users(join_on_property: "id", foreign_property:
"company_id") { id }
-
filter(UsersFilterInput)
Additional conditions the related users must match
-
foreign_property(String)
Name of the property (or attribute, e.g. id, email, slug or external_id) of
the user that must equal the value of join_on_property
-
join_on_property(String)
Name of the property (or attribute, e.g. id) of this object whose value is
matched against foreign_property. When the value is an array, users matching
any of its elements are returned. Returns an error when this object has no such property
-
limit(Int)
Maximum number of related objects returned for each object
-
sort(UsersSortInput)
Sort order of the results. When several entries are given, they are applied in the given order