graphql-dotnet/conventions

Add support for IDataLoaderResult<>, new type from GraphQL 3.0.0

kuzn-ilya opened this issue · 3 comments

DataLoaders in GraphQL have been slightly changed in the 3.0.0 release. Now GraphQL expects IDataLoaderResult<> type, which has to be returned from resolvers instead of Task<>. But it seems like GraphQL.Conventions doesn't handle IDataLoaderResult<> properly.
For instance, this schema fails:

        private class BugReproQueryDataLoaderResult
        {
            public IDataLoaderResult<string> DataLoaderResult() => new DataLoaderResult<string>("Test");
        }

I believe, that it can be fixed similarly to #187, and I have a working solution, so I can raise a PR for this issue.

tlil commented

Cool - go for it :-)

tlil commented

Thank you, @kuzn-ilya - merged in #216. Will follow up with a release tomorrow. :-)