You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3e0684d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,35 @@
1
+
# 6.0.0
2
+
3
+
6.0.0 includes everything from the `6.0.0-beta1` – `6.0.0-beta8` releases — see the beta sections below for full details and the complete list of breaking changes. A summary of the big items:
4
+
5
+
## Highlights
6
+
7
+
-**Partial results & spec compliance** (beta1) — top-level fields execute independently; if one fails you get the successful fields' data plus error details for the failed ones, and `data` is `null` when an error prevents a valid response, per the GraphQL spec. `MapGraphQL` follows the [GraphQL-over-HTTP spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md) by default.
8
+
-**New async model & cancellation** (beta1) — `.ResolveAsync<>()` for async fields, end-to-end `CancellationToken` support (passed through `ExecuteRequestAsync` and into your resolvers), and async subscription setup (`Task<IObservable<T>>`).
9
+
-**Query protection** (beta3) — opt-in pre-execution guards (`MaxQueryDepth`, `MaxFieldSelections`, `MaxFieldAliases`, `MaxQueryComplexity`), per-field complexity scoring via `field.SetComplexity(...)`, and per-field rate limiting via `field.AddRateLimit(...)` with a `PartitionedRateLimiter`-backed implementation in `EntityGraphQL.AspNet`.
10
+
-**New `UseAggregate()` field extension** (beta8) — expose `count`/`min`/`max`/`sum`/`average` over a collection field, translated to a single SQL query under EF. Placement adapts to the field (attaches to a paging wrapper, wraps as `{ items, aggregate }`, or an additive sibling field), and it supports aggregating service-backed and bulk-resolved fields via the two-pass execution model.
11
+
-**Filtering improvements** — reference service fields in filters (#303), GraphQL variables in filters (`filter: "name == $searchTerm"`, #396), `selectMany` for nested collections, generic custom type converters (#476), better nullable numeric comparisons (#484), and filtering by paged child fields (#378, below).
12
+
-**Paging & EF performance** — the `COUNT` query only runs when the selection needs the total, `hasNextPage` alone is answered with a cheap `EXISTS` query, and connection cursor assignment computes its argument math once per request. Page queries select only the requested columns with parameterized paging.
13
+
-**New GraphQL document parser** (beta3) — replaced the third-party parser; adds document descriptions from the September 2025 spec; structured error source `locations` in responses.
14
+
-**Targets** — adds `net10.0`; `EntityGraphQL.AspNet` drops `net6.0`/`net7.0` (the core `EntityGraphQL` package still targets `netstandard2.1` for older runtimes).
15
+
16
+
## Breaking changes summary
17
+
18
+
Each is detailed in the beta section it shipped in:
19
+
20
+
- Partial-results behavior and `AddGraphQLValidator` now registering `IGraphQLValidator` as transient (beta1)
21
+
-`MapGraphQL` spec-following behavior is the default (beta1); removed previously-obsolete members; filter support via `ArgumentHelper.EntityQuery` removed — use `UseFilter()` (beta1)
22
+
-`AddGraphQLOptions<T>` restructured to composition (`options.Builder` / `options.Schema`), `ConfigureSchema(...)` methods, and `AddGraphQLSchema()` returning a `GraphQLSchemaBuilder<T>` for chaining `ConfigureGraphQLSchema(...)` (beta3/beta5)
23
+
- Authorization refactored to a keyed data structure; role/policy helpers replace the roles constructor (beta3)
24
+
-`IFieldExtension` hooks take context objects instead of positional parameters (beta4)
- Default serializers use `JsonSerializerDefaults.Web` (beta6)
27
+
28
+
## Changes since beta8
29
+
30
+
-#378 - Filtering by a paged child field now works. Within a filter expression a field using `UseOffsetPaging()`/`UseConnectionPaging()` resolves to its underlying collection (the page wrapper only exists in the GraphQL schema), so `enquiries(filter: "enquirerDaps.count() > 0")`, `"enquirerDaps.items.count() > 0"` (`items`/`edges` are the collection) and `"enquirerDaps.totalItems > 0"` (`totalItems`/`totalCount` map to `Count()`) all compile and translate to SQL under EF. Previously these failed with `Method 'count' not found on current context 'OffsetPage'` or a `NullReferenceException`. Other page metadata (e.g. `hasNextPage`) raises a clear error when used in a filter.
Copy file name to clipboardExpand all lines: docs/docs/field-extensions/filtering.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,6 +345,19 @@ With variables:
345
345
}
346
346
```
347
347
348
+
## Paged Fields in Filters
349
+
350
+
A field using `UseOffsetPaging()`/`UseConnectionPaging()` returns a page wrapper type in the GraphQL schema, but that wrapper can't execute inside a filter (or translate to SQL). So within a filter expression a paged field resolves to its **underlying collection**:
351
+
352
+
```graphql
353
+
# enquirerDaps uses UseOffsetPaging - all of these are equivalent in a filter:
354
+
enquiries(filter: "enquirerDaps.count() > 0")
355
+
enquiries(filter: "enquirerDaps.items.count() > 0") # items/edges are the collection itself
356
+
enquiries(filter: "enquirerDaps.totalItems > 0") # totalItems/totalCount map to Count()
357
+
```
358
+
359
+
Note the collection is the *unfiltered* source — any `filter` argument passed to the paged field in the query applies to that field's own results, not to the parent's filter. Other page metadata (e.g. `hasNextPage`) is not available in filters.
360
+
348
361
## Service Fields in Filters
349
362
350
363
When using the filter extension with fields that resolve data from services (using `Resolve<TService>()`) and have two-pass execution enabled (`ExecuteServiceFieldsSeparately = true`, which is the default), EntityGraphQL automatically handles filter splitting to optimize query performance.
$"Field '{name}' is not supported on a paged field within a filter. The paged field resolves to its underlying collection - use it directly (e.g. field.count()) or via items/edges/totalItems/totalCount."
Copy file name to clipboardExpand all lines: src/EntityGraphQL/EntityGraphQL.csproj
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
<LangVersion>13.0</LangVersion>
5
5
<AssemblyName>EntityGraphQL</AssemblyName>
6
6
<PackageId>EntityGraphQL</PackageId>
7
-
<PackageVersion>6.0.0-beta8</PackageVersion>
7
+
<PackageVersion>6.0.0</PackageVersion>
8
8
<Description>A GraphQL library for .NET. Compiles queries into .NET Expressions (LinqProvider) for runtime execution against object graphs. E.g. against an ORM data model (EntityFramework or others) or just an in-memory object.</Description>
0 commit comments