graphql-dotnet / conventions

GraphQL Conventions Library for .NET
MIT License
233 stars 63 forks source link

Add DataLoaderUnwrapper #221

Closed Shane32 closed 3 years ago

Shane32 commented 3 years ago

Fixes #220

For resolvers that return an IDataLoaderResult, this PR has the resolver wait until the data loader executes, and then unwraps the result. It is recursive in that the result can return a data loader result, which is unwrapped when executed. It does not affect when the data loader executes within the execution strategy. It does create a couple allocations per data loader result.