I'm making a nested query and I wanna return users but only ones whose isActive == true All of these approaches which are below are returning errors
I've tries something like that:
account: {
query: gql`
query account($id: Int!) {
account(id: $id) {
name,
users(isActive: true) {
id, name, isActive
},
}
}
`,
variables() {
return {
id: this.id,
};
},
},
and:
account: {
query: gql`
query account($id: Int!) {
account(id: $id) {
name,
users(where: {isActive: true}) {
id, name, isActive
},
}
}
`,
variables() {
return {
id: this.id,
};
},
},
None of them worked..
Aucun commentaire:
Enregistrer un commentaire