Skip to content

Commit b6d90b6

Browse files
committed
support @exhaustive on interfaces in addition to unions
1 parent a35c9ca commit b6d90b6

File tree

5 files changed

+83
-13
lines changed

5 files changed

+83
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# master
22

3+
- Support `@exhaustive` on interfaces as well.
4+
35
# 3.5.1
46

57
- Build Linux PPX binary in Debian 11 (bullseye) container to improve compatibility with older glibc versions. The binary now requires glibc 2.31 instead of 2.39, supporting Amazon Linux 2023 (Vercel), Ubuntu 20.04+, Debian 11+, and RHEL 9+.

packages/rescript-relay/__tests__/Test_nodeInterface.res

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ module Query = %relay(`
1212
...TestNodeInterface_user
1313
}
1414
}
15+
16+
_testExhaustiveInterface: node(id: "123") @exhaustive {
17+
... on User {
18+
__typename
19+
}
20+
... on Group {
21+
__typename
22+
}
23+
}
1524
}
1625
`)
1726

packages/rescript-relay/__tests__/Test_unionFragment.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module UserFragment = %relay(`
2828
`)
2929

3030
module PluralFragment = %relay(`
31-
fragment TestUnionFragment_plural_member on Member @relay(plural: true) {
31+
fragment TestUnionFragment_plural_member on Member @relay(plural: true) @exhaustive {
3232
... on User {
3333
firstName
3434
onlineStatus

packages/rescript-relay/__tests__/__generated__/TestNodeInterfaceQuery_graphql.res

Lines changed: 70 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)