Skip to content

Commit a95cc02

Browse files
committed
Tidy up
1 parent 0a1559b commit a95cc02

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/main/java/graphql/util/Anonymizer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
import graphql.schema.GraphQLNamedOutputType;
6161
import graphql.schema.GraphQLNamedSchemaElement;
6262
import graphql.schema.GraphQLNamedType;
63-
import graphql.schema.GraphQLNonNull;
6463
import graphql.schema.GraphQLObjectType;
6564
import graphql.schema.GraphQLScalarType;
6665
import graphql.schema.GraphQLSchema;
@@ -70,7 +69,6 @@
7069
import graphql.schema.GraphQLTypeVisitor;
7170
import graphql.schema.GraphQLTypeVisitorStub;
7271
import graphql.schema.GraphQLUnionType;
73-
import graphql.schema.InputValueWithState;
7472
import graphql.schema.SchemaTransformer;
7573
import graphql.schema.TypeResolver;
7674
import graphql.schema.idl.DirectiveInfo;
@@ -94,7 +92,6 @@
9492

9593
import static graphql.Assert.assertNotNull;
9694
import static graphql.parser.ParserEnvironment.newParserEnvironment;
97-
import static graphql.schema.GraphQLArgument.newArgument;
9895
import static graphql.schema.GraphQLNonNull.nonNull;
9996
import static graphql.schema.GraphQLTypeUtil.unwrapNonNull;
10097
import static graphql.schema.GraphQLTypeUtil.unwrapNonNullAs;

src/test/resources/large-schema-1.graphqls

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ directive @skip(
1515
if: Boolean!
1616
) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
1717

18-
directive @deprecated(reason: String!) on FIELD_DEFINITION | ENUM_VALUE
18+
"Marks the field, argument, input field or enum value as deprecated"
19+
directive @deprecated(
20+
"The reason for the deprecation"
21+
reason: String! = "No longer supported"
22+
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
1923

2024
"Exposes a URL that specifies the behaviour of this scalar."
2125
directive @specifiedBy(
@@ -544,4 +548,4 @@ input InputObject9 {
544548
inputField32: [ID!]
545549
inputField33: [Scalar2]
546550
inputField34: InputObject8
547-
}
551+
}

src/test/resources/many-fragments.graphqls

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ directive @Directive8(argument7: Enum3!) on FIELD_DEFINITION
2525

2626
directive @Directive9(argument8: String!) on OBJECT
2727

28-
directive @deprecated(reason: String!) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
28+
"Marks the field, argument, input field or enum value as deprecated"
29+
directive @deprecated(
30+
"The reason for the deprecation"
31+
reason: String! = "No longer supported"
32+
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
2933

3034
"Directs the executor to include this field or fragment only when the `if` argument is true"
3135
directive @include(

0 commit comments

Comments
 (0)