Skip to content

Commit

Permalink
Fix scalar list selection
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfarla committed Mar 14, 2024
1 parent e7d9c60 commit c010d02
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package nl.geostandaarden.imx.orchestrate.gateway.fetch;

import static graphql.schema.GraphQLTypeUtil.isScalar;
import static graphql.schema.GraphQLTypeUtil.unwrapAll;
import static graphql.schema.GraphQLTypeUtil.unwrapNonNull;
import static java.util.function.Predicate.not;
Expand Down Expand Up @@ -121,7 +122,7 @@ private <B extends AbstractDataRequest.Builder<B>> B selectProperties(B requestB
return;
}

if (fieldType instanceof GraphQLList) {
if (fieldType instanceof GraphQLList && !isScalar(unwrapAll(fieldType)) ) {
requestBuilder.selectCollectionProperty(fieldName, nestedRequestBuilder -> {
selectProperties(nestedRequestBuilder, selectedField.getSelectionSet());
return nestedRequestBuilder.build();
Expand Down

0 comments on commit c010d02

Please sign in to comment.