Skip to content

Commit 118df76

Browse files
author
James Bellenger
committed
tidy
1 parent da50203 commit 118df76

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

src/main/java/graphql/validation/ValidationUtil.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,14 @@ public boolean isValidLiteralValue(Value<?> value, GraphQLType type, GraphQLSche
9090
}
9191

9292
if (type instanceof GraphQLScalarType) {
93-
return true;
94-
/*
9593
Optional<GraphQLError> invalid = parseLiteral(value, ((GraphQLScalarType) type).getCoercing());
9694
invalid.ifPresent(graphQLError -> handleScalarError(value, (GraphQLScalarType) type, graphQLError));
9795
return !invalid.isPresent();
98-
*/
9996
}
10097
if (type instanceof GraphQLEnumType) {
101-
return true;
102-
/*
10398
Optional<GraphQLError> invalid = parseLiteralEnum(value, (GraphQLEnumType) type);
10499
invalid.ifPresent(graphQLError -> handleEnumError(value, (GraphQLEnumType) type, graphQLError));
105100
return !invalid.isPresent();
106-
*/
107101
}
108102

109103
if (isList(type)) {

src/test/java/benchmark/ValidatorBenchmark.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,15 @@ public static class MyState {
4949
@Setup
5050
public void setup() {
5151
try {
52-
String schemaString = readFromClasspath("twitter.graphqls");
53-
String query = readFromClasspath("birdwatchnotes-query.graphql");
52+
String schemaString = readFromClasspath("large-schema-4.graphqls");
53+
String query = readFromClasspath("large-schema-4-query.graphql");
5454
schema = SchemaGenerator.createdMockedSchema(schemaString);
5555
document = Parser.parse(query);
5656

57-
// JMB TODO: this fails execution because the query requires variables
58-
5957
// make sure this is a valid query overall
60-
/*
6158
GraphQL graphQL = GraphQL.newGraphQL(schema).build();
6259
ExecutionResult executionResult = graphQL.execute(query);
6360
assertTrue(executionResult.getErrors().size() == 0);
64-
*/
6561
} catch (Exception e) {
6662
System.out.println(e);
6763
throw new RuntimeException(e);

0 commit comments

Comments
 (0)