Skip to content

Add a sample of Projection with MongoDb Provider #39

Open
@vinicius-actcon

Description

Hello everyone!

Thanks for became this amazing solution avaliable for the .NET ecosystem.

I"m reading the documentation of "how use HotChocolate with MongoDb at projection level" but I did found any reference of how to use the projection itself.

For exemple, i see that after IMongoCollection we have access to .AsExecutable() extension method and afterwards this execution whe hav access to With options (WithSorting|WithFiltering|WithOptions|WithProjection) and WithProjection method expect an argument of type MongoDbProjectionDefinition, but how can i instantiate this definition?

There's no one reference in nowhere how to create(instantiate) that definition to be used by projection. Could someone provide a sample of how to do that?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions