This test is failing:
def "default values in input objects are respected when variable is not provided"() {
given:
def spec = """type Query {
sayHello(arg: Arg! = {}): String
}
input Arg {
foo: String = "bar"
}
"""
DataFetcher df = { dfe ->
Map arg = dfe.getArgument("arg")
return arg.get("foo")
} as DataFetcher
def graphQL = TestUtil.graphQL(spec, ["Query": ["sayHello": df]]).build()
when:
def result = graphQL.execute('{sayHello}')
then:
result.errors.isEmpty()
result.data == [sayHello: "bar"]
}
SchemaGeneratorHelper.buildValue seems to do the same as ValuesResolver.coerceValueAst in some way.
This test is failing:
SchemaGeneratorHelper.buildValue seems to do the same as ValuesResolver.coerceValueAst in some way.