question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for IQueryable<T> providers that do not support LongCount

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelstaibcommented, May 12, 2019

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.

0reactions
michaelstaibcommented, May 22, 2019

This one is now fixed with preview.40.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found