Skip to content

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

@tobias-tengler

Description

@tobias-tengler

Is there an existing issue for this?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: DataIssue is related to filtering, sorting, pagination or projectionsArea: MongoDBIssue is related to the MongoDB integration🌶️ hot chocolate

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions