Skip to content

When implementing AsyncNodeGraphType ExecutionStrategy throws InvalidOperationException #171

Open
@wtorricos

Description

@wtorricos

I found that when implementing AsyncNodeGraphType the ExecutionStrategy class will throw an InvalidOperationException since the following call returns null:
https://github.com/graphql-dotnet/graphql-dotnet/blob/ed720f46e26704ed457b723801637d9d726f45bd/src/GraphQL/Execution/ExecutionStrategy.cs#L636

The problem seems to be that the execution strategy is not awaiting the result and is trying to find the GraphType of Task instead of just T.

Our implementation broke after we upgraded GraphQL, here you can see the version of our packages:

<PackageReference Include="GraphQL" Version="5.3.3" />
<PackageReference Include="GraphQL.DataLoader" Version="5.3.3" />
<PackageReference Include="GraphQL.MemoryCache" Version="5.3.3" />
<PackageReference Include="GraphQL.MicrosoftDI" Version="5.3.3" />
<PackageReference Include="GraphQL.SystemTextJson" Version="5.3.3" />
<PackageReference Include="GraphQL.Relay" Version="0.8.0" />

Hope this gives you enough information to fix it

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions