ChilliCream / ChilliCream/graphql-platform
Mark 'MongoDbCollectionExecutable.BuildPipeline' method as virtual
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate MongoDbCollectionExecutable.BuildPipeline() and inspect the related MongoDbFindFluentExecutable and MongoDbAggregateFluentExecutable classes. Confirm the requested methods can be overridden for pagination filter customization, then verify the change with the relevant MongoDB execution tests if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, mongodb
- Domain
- database
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100