From f0f6ee6b0bce41c35503860325d5c980202cb16d Mon Sep 17 00:00:00 2001 From: kerim1 Date: Wed, 1 Feb 2023 15:35:50 +0100 Subject: [PATCH] Update GraphQL --- .../huygens/timbuctoo/v5/dropwizard/endpoints/GraphQl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/timbuctoo-instancev4/src/main/java/nl/knaw/huygens/timbuctoo/v5/dropwizard/endpoints/GraphQl.java b/timbuctoo-instancev4/src/main/java/nl/knaw/huygens/timbuctoo/v5/dropwizard/endpoints/GraphQl.java index 9da60ed5bd..5fea906675 100644 --- a/timbuctoo-instancev4/src/main/java/nl/knaw/huygens/timbuctoo/v5/dropwizard/endpoints/GraphQl.java +++ b/timbuctoo-instancev4/src/main/java/nl/knaw/huygens/timbuctoo/v5/dropwizard/endpoints/GraphQl.java @@ -32,6 +32,8 @@ import javax.ws.rs.core.StreamingOutput; import javax.ws.rs.core.UriBuilder; import java.net.URI; +import java.time.Duration; +import java.time.Instant; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -162,7 +164,7 @@ public Response executeGraphql(String query, String acceptHeader, String acceptP final UserPermissionCheck userPermissionCheck = new UserPermissionCheck(user, permissionFetcher); final GraphQLSchema schema = graphqlGetter.get(); - final GraphQLSchema transform = schema.transform(sb -> + final GraphQLSchema transform = schema.transformWithoutTypes(sb -> sb.codeRegistry(schema.getCodeRegistry().transform(crb -> crb.fieldVisibility(new PermissionBasedFieldVisibility(userPermissionCheck, dataSetRepository))))); final GraphQL.Builder builder = GraphQL.newGraphQL(transform);