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 a52bed8 commit 50dc3a0Copy full SHA for 50dc3a0
1 file changed
Sources/GraphQL/Subscription/Subscribe.swift
@@ -255,8 +255,14 @@ func executeSubscription(
255
return SourceEventStreamResult.failure(error)
256
} else if let observable = resolved as? Observable<Any> {
257
return SourceEventStreamResult.success(observable)
258
+ } else if resolved == nil {
259
+ return SourceEventStreamResult.failure(
260
+ GraphQLError(message: "Resolved subscription was nil")
261
+ )
262
} else {
- return SourceEventStreamResult.failure(GraphQLError(message: "Subscription field resolver must return an Observable<Any>"))
263
264
+ GraphQLError(message: "Subscription field resolver must return an Observable<Any>, not \(Swift.type(of:resolved))")
265
266
}
267
268
0 commit comments