Skip to content

Commit 951041a

Browse files
author
Guido
committed
Root subscription type must be defined
1 parent fa2ad55 commit 951041a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/graphql_sqlalchemy/schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,8 @@ def build_schema(base: DeclarativeMeta) -> GraphQLSchema:
9797
build_queries(model, objects, queries, inputs)
9898
build_mutations(model, objects, mutations, inputs)
9999

100-
return GraphQLSchema(GraphQLObjectType("Query", queries), GraphQLObjectType("Mutation", mutations))
100+
return GraphQLSchema(
101+
GraphQLObjectType("Query", queries),
102+
GraphQLObjectType("Mutation", mutations),
103+
GraphQLObjectType("Subscription", {}),
104+
)

0 commit comments

Comments
 (0)