File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
main/java/issue/spring/graphql/objectlist
test/java/issue/spring/graphql/objectlist Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 25
25
<artifactId >spring-boot-starter-web</artifactId >
26
26
</dependency >
27
27
28
+ <dependency >
29
+ <groupId >com.graphql-java</groupId >
30
+ <artifactId >graphql-java-extended-scalars</artifactId >
31
+ <version >18.1</version >
32
+ </dependency >
33
+
28
34
<dependency >
29
35
<groupId >org.springframework.boot</groupId >
30
36
<artifactId >spring-boot-starter-test</artifactId >
Original file line number Diff line number Diff line change 1
1
package issue .spring .graphql .objectlist ;
2
2
3
+ import graphql .scalars .ExtendedScalars ;
3
4
import graphql .schema .*;
4
5
import org .springframework .boot .autoconfigure .graphql .GraphQlSourceBuilderCustomizer ;
5
6
import org .springframework .context .annotation .Bean ;
@@ -37,7 +38,8 @@ public Object parseLiteral(Object input) throws CoercingParseLiteralException {
37
38
public GraphQlSourceBuilderCustomizer sourceBuilderCustomizer (GraphQLScalarType objectGraphQLScalarType ) {
38
39
return (graphQlSourceBuilder ) -> graphQlSourceBuilder
39
40
.configureRuntimeWiring ((wiringBuilder ) -> wiringBuilder
40
- .scalar (objectGraphQLScalarType ));
41
+ .scalar (ExtendedScalars .Object ));
42
+ //.scalar(objectGraphQLScalarType));
41
43
}
42
44
}
43
45
Original file line number Diff line number Diff line change 1
1
package issue .spring .graphql .objectlist ;
2
2
3
+ import graphql .scalars .ExtendedScalars ;
3
4
import org .junit .jupiter .api .Test ;
4
5
import org .springframework .beans .factory .annotation .Autowired ;
5
6
import org .springframework .boot .test .autoconfigure .graphql .GraphQlTest ;
@@ -37,6 +38,10 @@ void filterValueIsInstanceOfList_stringValue() {
37
38
/**
38
39
* There is no {@link Exception} with an array of 2 {@link String} declared directly in the GraphQL query,
39
40
* we have an {@link graphql.language.ArrayValue} in {@link Object}, shall we have a List instead ?
41
+ *
42
+ * UPDATE: after switching on {@link ExtendedScalars} object type we have the exception on both test
43
+ * (`filterValueIsInstanceOfList_withoutVariables` and `filterValueIsInstanceOfList_withException`),
44
+ * it is more coherent.
40
45
*/
41
46
@ Test
42
47
void filterValueIsInstanceOfList_withoutVariables () {
You can’t perform that action at this time.
0 commit comments