I have the following fragment definition
fragment LocationFragment_viewer on Viewer
@argumentDefinitions(userId: {type: "Int!"}) {
results: locations(
user_id: $userId
) {
...some_other_fragments
}
}
I want to change the argument from user_id
to user_ids
(which is just an array wrapping the id) in the GraphQL query, without changing the argument definition.
So I want something like:
fragment LocationFragment_viewer on Viewer
@argumentDefinitions(userId: {type: "Int!"}) {
results: locations(
user_ids: [$userId]
) {
...some_other_fragments
}
}
Is this even possible? In my case it is a bit hard to change the argument definitions, so trying to see if there is something easy to do without going that route.
Thank you!