File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/java/graphql/schema Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1111import org .jetbrains .annotations .NotNull ;
1212import org .jetbrains .annotations .Nullable ;
1313
14+ import java .util .ArrayList ;
1415import java .util .List ;
1516import java .util .function .Consumer ;
1617
@@ -34,6 +35,8 @@ public class GraphQLAppliedDirectiveArgument implements GraphQLNamedSchemaElemen
3435 private final Argument definition ;
3536
3637
38+ public static final String CHILD_TYPE = "type" ;
39+
3740 private GraphQLAppliedDirectiveArgument (String name ,
3841 InputValueWithState value ,
3942 GraphQLInputType type ,
@@ -104,19 +107,23 @@ public Argument getDefinition() {
104107
105108 @ Override
106109 public List <GraphQLSchemaElement > getChildren () {
107- return ImmutableKit .emptyList ();
110+ List <GraphQLSchemaElement > children = new ArrayList <>();
111+ children .add (getType ());
112+ return children ;
108113 }
109114
110-
111115 @ Override
112116 public SchemaElementChildrenContainer getChildrenWithTypeReferences () {
113117 return SchemaElementChildrenContainer .newSchemaElementChildrenContainer ()
118+ .child (CHILD_TYPE , originalType )
114119 .build ();
115120 }
116121
117122 @ Override
118123 public GraphQLAppliedDirectiveArgument withNewChildren (SchemaElementChildrenContainer newChildren ) {
119- return this ;
124+ return transform (builder ->
125+ builder .type (newChildren .getChildOrNull (CHILD_TYPE ))
126+ );
120127 }
121128
122129 @ Override
You can’t perform that action at this time.
0 commit comments