Skip to content

Commit b3a5127

Browse files
committed
Add test for parseLiteral on ComplexScalar
1 parent 5ea2ff1 commit b3a5127

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/execution/__tests__/variables.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,22 @@ describe('Execute: Handles inputs', () => {
175175
}
176176
});
177177
});
178+
179+
it('properly runs parseLiteral on complex scalar types', async () => {
180+
const doc = `
181+
{
182+
fieldWithObjectInput(input: {a: "foo", d: "SerializedValue"})
183+
}
184+
`;
185+
const ast = parse(doc);
186+
187+
return expect(await execute(schema, ast)).to.deep.equal({
188+
data: {
189+
fieldWithObjectInput: '{"a":"foo","d":"DeserializedValue"}',
190+
}
191+
});
192+
});
193+
178194
});
179195

180196
describe('using variables', () => {

0 commit comments

Comments
 (0)