-
I am following this Documentation: Update objects based on their fields On updating specific row where id is there mutation UpdateUser($id: String, $object: users_set_input) {
update_users(where: {id: {_lte: $id}}, _set: $object) {
affected_rows
returning {
id
first_name
last_name
username
profile_image_url
updated_at
created_at
}
}
} {
"id": "user_2HXjNIMIurpcn1GzKPerVy3AyaN",
"object": {
"first_name": "Mashwishi",
"last_name": "",
"username": "mashwishitest",
"profile_image_url": "https://images.clerk.dev/oauth_discord/img_2HXjNhFlmMHZMd2WU30L9N6JVjF.gif",
"updated_at": "1668438283397",
"created_at": "1668438280022"
}
} Why does other row affected when i am pointing specific ID? {
"data": {
"update_users": {
"affected_rows": 2,
"returning": [
{
"id": "user_29w83sxmDNGwOuEthce5gg56FcC",
"first_name": "Mashwishi",
"last_name": "",
"username": "mashwishitest",
"profile_image_url": "https://images.clerk.dev/oauth_discord/img_2HXjNhFlmMHZMd2WU30L9N6JVjF.gif",
"updated_at": "1668438283397",
"created_at": "1668438280022"
},
{
"id": "user_2HXjNIMIurpcn1GzKPerVy3AyaN",
"first_name": "Mashwishi",
"last_name": "",
"username": "mashwishitest",
"profile_image_url": "https://images.clerk.dev/oauth_discord/img_2HXjNhFlmMHZMd2WU30L9N6JVjF.gif",
"updated_at": "1668438283397",
"created_at": "1668438280022"
}
]
}
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
matsyui
Nov 14, 2022
Replies: 1 comment
-
lte "less than or equal" |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
matsyui
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lte "less than or equal"
gte "greater than or equal"
eq "equal"