Support for IQueryable<T> providers that do not support LongCount
See original GitHub issueIs your feature request related to a problem? Please describe.
I am trying to use HotChocolate with Azure CosmosDb via DocumentClient
, which supports
IQueryable<T>
. Unfortunately, although Count
is supported, LongCount
is not, so I get an error when I try to add pagination to a field. This happens at https://github.com/ChilliCream/hotchocolate/blob/b9ddf60a35f64527e9b49c527fdd62e2946ce28b/src/Core/Types/Types/Relay/QueryableConnectionResolver.cs#L52
Describe the solution you’d like
I would like QueryableConnectionResolver<T>
to use or fall back to Count
if LongCount
is not supported.
Describe alternatives you’ve considered
It would be nice if DocumentClient
and friends dealt with this themselves 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
c# - Is there a practical reason why LINQ's LongCount ...
I have no first-hand knowledge of this design decision but I can offer an educated guess. The method is of obvious usefulness for...
Read more >Supported and Unsupported LINQ Methods (LINQ to Entities)
This article summarizes the standard query operators that are supported and unsupported in LINQ to Entities queries.
Read more >LINQ LongCount is not supported by cosmosdb client #738
Cosmos.Linq.DocumentQueryException: 'Method 'LongCount' is not supported.' Is there a reason why it's not supported? I mean, Int32 ...
Read more >The Pain of Implementing LINQ Providers
There is no technical reason why LINQ to Entities cannot support queries on string indices, but consider what it would mean from the ......
Read more >IQueryable is Tight Coupling - ploeh blog
Please note that this post is about the problematic aspects of designing an API around the IQueryable<T> interface. It's not an attack on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes we were testing that already in a private beta with Microsoft. Still we need to write some integration tests for cosmosDB and use the IntCount since not all databases support the long count. This one is not yer implemented but I think will follow in the next two previews of version 9 probably preview 30. Version 9 should be finished in the next two weeks. We are heavily working one the new documentation which will pick up lots of new areas.
This one is now fixed with preview.40.