Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
manymotes committed Jul 20, 2022
1 parent 03d55af commit 6c27073
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
}
Expand Down

0 comments on commit 6c27073

Please sign in to comment.