From 6c270736b50e445be33044afb2c601b914e6f8e6 Mon Sep 17 00:00:00 2001 From: manymotes Date: Wed, 20 Jul 2022 08:46:00 -0600 Subject: [PATCH] linting --- .../graphql/dgs/client/codegen/GraphQLMultiQueryRequest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/graphql-dgs-codegen-shared-core/src/main/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLMultiQueryRequest.kt b/graphql-dgs-codegen-shared-core/src/main/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLMultiQueryRequest.kt index 75ec45bc0..ea06c5f4b 100644 --- a/graphql-dgs-codegen-shared-core/src/main/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLMultiQueryRequest.kt +++ b/graphql-dgs-codegen-shared-core/src/main/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLMultiQueryRequest.kt @@ -25,7 +25,6 @@ class GraphQLMultiQueryRequest( ) { fun serialize(): String { - if (requests.isEmpty()) throw AssertionError("Request must have at least one query") val operationDef = OperationDefinition.newOperationDefinition() @@ -38,8 +37,8 @@ class GraphQLMultiQueryRequest( for (request in this.requests) { val query = request.query - //Graphql only supports multiple mutations or multiple queries. Not a combination of the two. - //Graphql does not support multiple subscriptions in one request http://spec.graphql.org/June2018/#sec-Single-root-field + // Graphql only supports multiple mutations or multiple queries. Not a combination of the two. + // Graphql does not support multiple subscriptions in one request http://spec.graphql.org/June2018/#sec-Single-root-field if (!query.getOperationType().equals(queryType) || queryType == OperationDefinition.Operation.SUBSCRIPTION.name) { throw AssertionError("Request has to have exclusively queries or mutations in a multi operation request") }