graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

CanHandle of MongoDbCursorPagingProvider doesn't catch IExecutable<T> return type

Open tobias-tengler opened this issue 3 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

When using the MongoDB pagination provider by itself it works, since the provider is taken as the default. If multiple providers are registered and the MongoDB provider is not the first pagination provider (default) it doesn't work since the CanHandle method returns false.

Steps to reproduce

Create a field, following the documentation

[UseMongoDbPaging]
public IExecutable<Person> GetPersons([Service] IMongoCollection<Person> collection)
{
    return collection.AsExecutable();
}

and CanHandle returns false.

Relevant log output

No response

Additional Context?

No response

Product

Hot Chocolate

Version

12.0.0-preview.34

tobias-tengler avatar Aug 28 '21 12:08 tobias-tengler