Skip to content

Commit a8db3f5

Browse files
committed
astFromValue correctly handles NonNull values
1 parent 02d71a0 commit a8db3f5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utilities/__tests__/astFromValue-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ describe('astFromValue', () => {
4949
expect(astFromValue(1, GraphQLBoolean)).to.deep.equal(
5050
{ kind: 'BooleanValue', value: true }
5151
);
52+
53+
const NonNullBoolean = new GraphQLNonNull(GraphQLBoolean);
54+
expect(astFromValue(0, NonNullBoolean)).to.deep.equal(
55+
{ kind: 'BooleanValue', value: false }
56+
);
5257
});
5358

5459
it('converts Int values to Int ASTs', () => {

0 commit comments

Comments
 (0)