We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6357451 commit b59b98aCopy full SHA for b59b98a
Sources/Graphiti/Schema/Schema.swift
@@ -16,11 +16,12 @@ public final class Schema<Resolver, Context> {
16
try component.update(typeProvider: typeProvider, coders: coders)
17
}
18
19
- guard let query = typeProvider.query else {
20
- fatalError("Query type is required.")
+ guard typeProvider.query != nil || !typeProvider.federatedResolvers.isEmpty else {
+ fatalError("Schema must contain at least 1 query or federated resolver")
21
22
+
23
schema = try GraphQLSchema(
- query: query,
24
+ query: typeProvider.query,
25
mutation: typeProvider.mutation,
26
subscription: typeProvider.subscription,
27
types: typeProvider.types,
0 commit comments