Skip to content

Commit 0e439f3

Browse files
author
Sam Cooke
committed
Add test for parseLiteral on ComplexScalar
Related GraphQL-js commit: graphql/graphql-js@b3a5127
1 parent 2528d1d commit 0e439f3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

graphql/execution/tests/test_variables.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@ def test_does_not_use_incorrect_value():
141141
})
142142

143143

144+
def test_properly_runs_parse_literal_on_complex_scalar_types():
145+
doc = '''
146+
{
147+
fieldWithObjectInput(input: {a: "foo", d: "SerializedValue"})
148+
}
149+
'''
150+
check(doc, {
151+
'data': {
152+
'fieldWithObjectInput': '{"a": "foo", "d": "DeserializedValue"}',
153+
}
154+
})
155+
156+
144157
# noinspection PyMethodMayBeStatic
145158
class TestUsingVariables:
146159
doc = '''

0 commit comments

Comments
 (0)