|
1 | 1 | /* |
2 | | - * Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved. |
| 2 | + * Copyright (C) 2007-2026 Crafter Software Corporation. All Rights Reserved. |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License version 3 as published by |
|
24 | 24 | import java.util.Map; |
25 | 25 | import java.util.Set; |
26 | 26 |
|
27 | | -import graphql.schema.DataFetcher; |
28 | | -import graphql.schema.GraphQLCodeRegistry; |
29 | | -import graphql.schema.GraphQLFieldDefinition; |
30 | | -import graphql.schema.GraphQLObjectType; |
31 | | -import graphql.schema.GraphQLType; |
32 | | -import graphql.schema.StaticDataFetcher; |
33 | | -import graphql.schema.TypeResolver; |
| 27 | +import graphql.schema.*; |
34 | 28 | import org.apache.commons.lang3.StringUtils; |
35 | 29 | import org.craftercms.engine.graphql.impl.fetchers.ConverterDataFetcher; |
36 | 30 | import org.slf4j.Logger; |
@@ -68,7 +62,7 @@ public class SchemaCustomizer { |
68 | 62 | /** |
69 | 63 | * List of additional types to add |
70 | 64 | */ |
71 | | - protected List<GraphQLType> additionalTypes = new LinkedList<>(); |
| 65 | + protected List<GraphQLNamedType> additionalTypes = new LinkedList<>(); |
72 | 66 |
|
73 | 67 | /** |
74 | 68 | * Adds a custom field to the root type |
@@ -136,7 +130,7 @@ public void resolver(String typeName, TypeResolver resolver) { |
136 | 130 | * |
137 | 131 | * @param types the types to add |
138 | 132 | */ |
139 | | - public void additionalTypes(GraphQLType... types) { |
| 133 | + public void additionalTypes(GraphQLNamedType... types) { |
140 | 134 | additionalTypes.addAll(Arrays.asList(types)); |
141 | 135 | } |
142 | 136 |
|
@@ -191,7 +185,7 @@ protected void apply(String rootTypeName, GraphQLObjectType.Builder rootTypeBuil |
191 | 185 | /** |
192 | 186 | * Returns the set of additional types to add |
193 | 187 | */ |
194 | | - public Set<GraphQLType> getAdditionalTypes() { |
| 188 | + public Set<GraphQLNamedType> getAdditionalTypes() { |
195 | 189 | return new HashSet<>(additionalTypes); |
196 | 190 | } |
197 | 191 |
|
|
0 commit comments