-
-
Notifications
You must be signed in to change notification settings - Fork 786
Open
Labels
Area: DataIssue is related to filtering, sorting, pagination or projectionsIssue is related to filtering, sorting, pagination or projectionsArea: Projections🌶️ hot chocolate
Milestone
Description
Product
Hot Chocolate
Is your feature request related to a problem?
No
The solution you'd like
Hi -
I would like to have the option to get count of filtered relations, and also sort on that count
Given the following EF schema:
Class A
{
public string Id {get;set;}
public string FieldA1 {get;set;}
public string FieldA2 {get;set;}
public IReadOnlyCollection<B> BList {get;set;}
}
class B
{
public string Id {get;set;}
public string FieldB1 {get;set;}
public string FieldB2 {get;set;}
}
class Query
{
public IQueryable<A> GetAllA();
}
i would like to be able to query using the following graphql request:
query {
repositories (
order: [{bCount: ASC /* sort by the filter of bCount*/}]
)
{
items {
id
fieldA1
bCount(where: {fieldB: {some - filter})
}
totalCount
}
I was looking through the docs and didn't find a native way to achieve this
Can i achieve this with the existing features?
Thanks!
Metadata
Metadata
Assignees
Labels
Area: DataIssue is related to filtering, sorting, pagination or projectionsIssue is related to filtering, sorting, pagination or projectionsArea: Projections🌶️ hot chocolate