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 0428770 commit 25a3a7cCopy full SHA for 25a3a7c
Sources/Graphiti/Schema/Schema.swift
@@ -1,6 +1,10 @@
1
import GraphQL
2
import NIO
3
4
+public struct SchemaError: Error, Equatable {
5
+ let description: String
6
+}
7
+
8
public final class Schema<Resolver, Context> {
9
public let schema: GraphQLSchema
10
@@ -17,7 +21,7 @@ public final class Schema<Resolver, Context> {
17
21
}
18
22
19
23
guard typeProvider.query != nil || !typeProvider.federatedResolvers.isEmpty else {
20
- fatalError("Schema must contain at least 1 query or federated resolver")
24
+ throw SchemaError(description: "Schema must contain at least 1 query or federated resolver")
25
26
27
schema = try GraphQLSchema(
0 commit comments