Skip to content

Apply a where filter to the related model #83

@anibalaguirreconsultora

Description

Hello

I am doing some test queries using your plugin over a loopback application.

I want to apply a where filter to the related model .

Does the "where" parameter of type JSON works with related model properties ?

In the below example: the second "where" filter (where: {name: "SMH"} ) on the related model is not working ..

query ListEntities($where: JSON!) {
allEntityRoles(where: $where, first: 10) {
totalCount
EntityRoles {
id
entity(where: {name: "SMH"}) {
edges {
node {
id
entCode
name
}
}
}

}

}
}

variable:
{
"where": {
"CompanyId": "aa5d2125-bcfc-4808-ae55-5aec699f3509",
"EntityRoleTypeId": "f3e03826-28cb-4d72-ad71-7b5e174dbfb9"

}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions