graphql-platform
graphql-platform copied to clipboard
"Could not resolve the actual object type" error when `null` returned in list of interfaces
Schema
type Query{
test: [BaseType]
}
interface BaseType {
name: ID!
}
type ConcreteType implements BaseType {
name: ID!
}
Query
query {
test {
__typename
}
}
Response
{
"errors": [
{
"message": "Could not resolve the actual object type from `HotChocolate.Language.NullValueNode` for the abstract type `test`.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"test",
0
]
}
],
"data": {
"test": [
null
]
}
}
Expected behavior
null should be returned in list without errors.
Additional context HC v11.2.2
Slack conversation https://hotchocolategraphql.slack.com/archives/CD9TNKT8T/p1619428143159200
Hi @gao-artur
I tried to reproduce the issue you described in #3626 but could not reporduce it in a test
cann you provide a repro of this issue?
Hi @PascalSenn Was able to reproduce it only when using stitching. Please see repo here https://github.com/gao-artur/graphql-stitching-3594
Hi @PascalSenn I just tried to debug this issue and that's what I found:
When the remote schema executor reaches this line the result is null:

But when stitching schema executor reaches same line the result is NullValueNode:

Would this be the correct fix for the bug?
if (result is null || result is NullValueNode)
{
completedResult = null;
return true;
}
this is fixed with 4064
@michaelstaib what version should I use to verify the fix? I just tried 12.0.0-rc.11 but the issue still reproduced.
@michaelstaib please reopen the bug, it still reproducible with 12.0.1.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still reproduced with stable 12.8.2 and latest 13.0.0-preview.19.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
HotChocolate.Stitching is now in legacy mode and is replaced by HotChocolate.Fusion. I am closing this issue as we essentially froze the fusion code.
You can join the preview of Hot Chocolate Fusion now on Slack