public function testDoesntAllowNonNullableInputsToBeOmittedInAVariable()
{
$doc = '
query SetsNonNullable($value: String!) {
fieldWithNonNullableStringInput(input: $value)
}
';
$ast = Parser::parse($doc);
try {
Executor::execute($this->schema(), $ast);
$this->fail('Expected exception not thrown');
} catch (Error $e) {
$expected = FormattedError::create('Variable "$value" of required type "String!" was not provided.', [new SourceLocation(2, 31)]);
$this->assertEquals($expected, Error::formatError($e));
}
}