From 51ab49bc0581112f3591134b272e2ffe890b2809 Mon Sep 17 00:00:00 2001 From: Roman Chernobelskiy <1326903+rchernobelskiy@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:58:58 -0400 Subject: [PATCH] another fix# Please enter the commit message for your changes. Lines starting --- graphql/schema.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphql/schema.go b/graphql/schema.go index a77c646..c79b9cf 100644 --- a/graphql/schema.go +++ b/graphql/schema.go @@ -89,7 +89,7 @@ func (sg *SchemaGenerator) buildQueriesFields( } } - if len(keyspace.Tables) == 0 { + if len(keyspace.Tables) == 0 || len(keyspace.Tables) == len(ksSchema.ignoredTables) { // graphql-go requires at least a single query and a single mutation fields["__keyspaceEmptyQuery"] = &graphql.Field{ Description: "Placeholder query that is exposed when a keyspace is empty.", @@ -165,7 +165,7 @@ func (sg *SchemaGenerator) buildMutationFields( } } - if len(keyspace.Tables) == 0 { + if len(keyspace.Tables) == 0 || len(keyspace.Tables) == len(ksSchema.ignoredTables) { // graphql-go requires at least a single query and a single mutation fields["__keyspaceEmptyMutation"] = &graphql.Field{ Description: "Placeholder mutation that is exposed when a keyspace is empty.",