Skip to content

Commit f5e09fe

Browse files
committed
add failing test for discussion
1 parent 98f4da6 commit f5e09fe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/validation/__tests__/FieldsOnCorrectTypeRule-test.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const testSchema = buildSchema(`
4141
meowVolume: Int
4242
}
4343
44-
union CatOrDog = Cat | Dog
44+
union CatOrDog implements Pet = Cat | Dog
4545
4646
type Human {
4747
name: String
@@ -81,6 +81,15 @@ describe('Validate: Fields on correct type', () => {
8181
`);
8282
});
8383

84+
it('Union implementing interface field selection', () => {
85+
expectValid(`
86+
fragment unionImplementingInterfaceFieldSelection on CatOrDog {
87+
__typename
88+
name
89+
}
90+
`);
91+
});
92+
8493
it('Aliased interface field selection', () => {
8594
expectValid(`
8695
fragment interfaceFieldSelection on Pet {

0 commit comments

Comments
 (0)