-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom query is not called on Union type using relation field type. #900
Comments
Seems To you want to attempt a PR to fix this? If not, I would also only accepts tests showing the problem. |
I'm on vacation in an hour, so no PR from me for now. But here are tests - edgarsn@471a949
|
@edgarsn can you make a PR with the tests? |
I don't think I'm capable of making fix for this. I can only make a draft PR with tests showing the bug, but it wouldn't help you a lot I guess. From my observations For example, query ($id: String!) {
searchQuery(id: $id) {
... on Post {
id
title
comments {
id
}
}
... on Comment {
id
title
body
}
}
}
array:4 [ // /app/src/Support/SelectFields.php:52
"id" => array:3 [
"type" => GraphQL\Type\Definition\NonNull^ {#3664
...
}
"fields" => []
"args" => []
]
"body" => array:3 [
"type" => GraphQL\Type\Definition\StringType^ {#3305
...
}
"fields" => []
"args" => []
]
"title" => array:3 [
"type" => GraphQL\Type\Definition\NonNull^ {#3665
...
}
"fields" => []
"args" => []
]
"comments" => array:3 [
"type" => GraphQL\Type\Definition\NonNull^ {#3662
...
}
"fields" => array:1 [
...
]
"args" => []
]
] And here I'm confused how this could be solved. ID and Title is requested in two different fragments, but here they appear only once in this case. I hope you understood the problem I'm saying and dealing with in my mind. |
Au contraire! It would still be helpful! If you could contribute the tests showing the problem, that's already useful on its own! |
Thank you! Will do on monday. |
Versions:
Description:
Custom query in relation field is not being triggered while using Union type.
Steps To Reproduce:
1. Union query
2. Union Type
3. Model type (Where problem appers)
My client query:
I Hope it helps. I don't know, if this is only related to version 7 or it's reproducible in version 8 as well.
The text was updated successfully, but these errors were encountered: