Skip to content

Commit 63dcac3

Browse files
committed
cosmetics
1 parent 3557a71 commit 63dcac3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main/java/graphql/execution/Execution.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ private boolean propagateErrors(CoercedVariables variables, List<Directive> dire
256256
Directive foundDirective = NodeUtil.findNodeByName(directives, ERROR_HANDLING_DIRECTIVE_DEFINITION.getName());
257257
if (foundDirective != null) {
258258
Map<String, Object> argumentValues = ValuesResolver.getArgumentValues(ErrorHandlingDirective.getArguments(), foundDirective.getArguments(), variables, GraphQLContext.getDefault(), Locale.getDefault());
259-
Object flag = argumentValues.get("onError");
260-
Assert.assertTrue(flag instanceof String, "The '%s' directive MUST have a OnError value for the 'if' argument", ERROR_HANDLING_DIRECTIVE_DEFINITION.getName());
261-
return flag.equals(Enums.ON_ERROR_PROPAGATE);
259+
Object argumentValue = argumentValues.get("onError");
260+
Assert.assertTrue(argumentValue instanceof String, "The '%s' directive MUST have an OnError value for the 'onError' argument", ERROR_HANDLING_DIRECTIVE_DEFINITION.getName());
261+
return argumentValue.equals(Enums.ON_ERROR_PROPAGATE);
262262
}
263263
return defaultValue;
264264
}

src/main/java/graphql/schema/idl/SchemaGenerator.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public SchemaGenerator() {
5959
* Created a schema from the SDL that is has a mocked runtime.
6060
*
6161
* @param sdl the SDL to be mocked
62+
*
6263
* @return a schema with a mocked runtime
64+
*
6365
* @see RuntimeWiring#MOCKED_WIRING
6466
*/
6567
public static GraphQLSchema createdMockedSchema(String sdl) {
@@ -73,7 +75,9 @@ public static GraphQLSchema createdMockedSchema(String sdl) {
7375
*
7476
* @param typeRegistry this can be obtained via {@link SchemaParser#parse(String)}
7577
* @param wiring this can be built using {@link RuntimeWiring#newRuntimeWiring()}
78+
*
7679
* @return an executable schema
80+
*
7781
* @throws SchemaProblem if there are problems in assembling a schema such as missing type resolvers or no operations defined
7882
*/
7983
public GraphQLSchema makeExecutableSchema(TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem {
@@ -87,7 +91,9 @@ public GraphQLSchema makeExecutableSchema(TypeDefinitionRegistry typeRegistry, R
8791
* @param options the controlling options
8892
* @param typeRegistry this can be obtained via {@link SchemaParser#parse(String)}
8993
* @param wiring this can be built using {@link RuntimeWiring#newRuntimeWiring()}
94+
*
9095
* @return an executable schema
96+
*
9197
* @throws SchemaProblem if there are problems in assembling a schema such as missing type resolvers or no operations defined
9298
*/
9399
public GraphQLSchema makeExecutableSchema(Options options, TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) throws SchemaProblem {

0 commit comments

Comments
 (0)