Skip to content

Commit 51ab49b

Browse files
another fix# Please enter the commit message for your changes. Lines starting
1 parent e2feeaa commit 51ab49b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphql/schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (sg *SchemaGenerator) buildQueriesFields(
8989
}
9090
}
9191

92-
if len(keyspace.Tables) == 0 {
92+
if len(keyspace.Tables) == 0 || len(keyspace.Tables) == len(ksSchema.ignoredTables) {
9393
// graphql-go requires at least a single query and a single mutation
9494
fields["__keyspaceEmptyQuery"] = &graphql.Field{
9595
Description: "Placeholder query that is exposed when a keyspace is empty.",
@@ -165,7 +165,7 @@ func (sg *SchemaGenerator) buildMutationFields(
165165
}
166166
}
167167

168-
if len(keyspace.Tables) == 0 {
168+
if len(keyspace.Tables) == 0 || len(keyspace.Tables) == len(ksSchema.ignoredTables) {
169169
// graphql-go requires at least a single query and a single mutation
170170
fields["__keyspaceEmptyMutation"] = &graphql.Field{
171171
Description: "Placeholder mutation that is exposed when a keyspace is empty.",

0 commit comments

Comments
 (0)