Skip to content

Commit

Permalink
* Added failing test for issue apollographql#739
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyaha committed Oct 7, 2016
1 parent 895ffbd commit 8791be8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/roundtrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,31 @@ describe('roundtrip', () => {
});
});

it('should resolve fields it can on interface with non matching inline fragments', () => {
storeRoundtrip(gql`
query {
dark_forces {
__typename
name
... on Droid {
model
}
}
}`, {
dark_forces: [
{
__typename: 'Droid',
name: '8t88',
model: '88',
},
{
__typename: 'Darth',
name: 'Anakin Skywalker',
},
],
});
});

it('should throw an error on two of the same inline fragment types', () => {
assert.throws(() => {
storeRoundtrip(gql`
Expand Down

0 comments on commit 8791be8

Please sign in to comment.