Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark 'MongoDbCollectionExecutable.BuildPipeline' method as virtual #6544

Open
IvAlex1986 opened this issue Sep 20, 2023 · 0 comments
Open

Mark 'MongoDbCollectionExecutable.BuildPipeline' method as virtual #6544

IvAlex1986 opened this issue Sep 20, 2023 · 0 comments

Comments

@IvAlex1986
Copy link
Contributor

Product

Hot Chocolate

Is your feature request related to a problem?

We have some non-standard behavior for Mongo filters. We have some "dynamic" data, that we resolve at runtime. But we can implement our logic for non-pagination queries very easily. We can override method MongoDbCollectionExecutable<T>.ToListAsync(). And it works perfectly!

But when we run pagination queries, HotChocolate uses method MongoDbCollectionExecutable<T>.BuildPipeline() that is not virtual. And we can't override this method. Basically we need to implement minor changes with filters inside this method also.

The solution you'd like

It would be great, if you approve marking method MongoDbCollectionExecutable<T>.BuildPipeline() as virtual. In this case we could implement our logic with minimal changes. Also we could mark this method in another classes (MongoDbFindFluentExecutable and MongoDbAggregateFluentExecutable)

I would be glad to make a PR if you accept it.

Looking forward any feedback.
Thanks in advance!

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

No branches or pull requests

2 participants