Skip to content

Commit 4cc493b

Browse files
committed
add changeset for group by
1 parent b6f695d commit 4cc493b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.changeset/petite-lizards-reply.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
"@neo4j/graphql": minor
3+
---
4+
5+
Add `groupBy` fields in connections for grouping results.
6+
7+
These can be enabled with the `@groupBy` directive:
8+
9+
```graphql
10+
type Movie {
11+
title: String!
12+
year: Int! @groupBy
13+
}
14+
```
15+
16+
This enables queries such as:
17+
18+
```graphql
19+
moviesConnection {
20+
groupBy(fields: {year: true}) {
21+
edges {
22+
node {
23+
title
24+
}
25+
}
26+
}
27+
}
28+
```
29+
30+
Which returns the movies, grouped by `year`

0 commit comments

Comments
 (0)