File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -325,10 +325,19 @@ where
325
325
// Send errors back to the client as GQL_DATA
326
326
match e {
327
327
SubscriptionError :: GraphQLError ( e) => {
328
- let result = Arc :: new ( QueryResult :: from ( e) ) ;
329
- let msg =
330
- OutgoingMessage :: from_query_result ( err_id. clone ( ) , result) ;
331
- error_sink. unbounded_send ( msg. into ( ) ) . unwrap ( ) ;
328
+ // Don't bug clients with transient `TooExpensive` errors,
329
+ // simply skip updating them
330
+ if !e
331
+ . iter ( )
332
+ . any ( |err| matches ! ( err, QueryExecutionError :: TooExpensive ) )
333
+ {
334
+ let result = Arc :: new ( QueryResult :: from ( e) ) ;
335
+ let msg = OutgoingMessage :: from_query_result (
336
+ err_id. clone ( ) ,
337
+ result,
338
+ ) ;
339
+ error_sink. unbounded_send ( msg. into ( ) ) . unwrap ( ) ;
340
+ }
332
341
}
333
342
} ;
334
343
} )
You can’t perform that action at this time.
0 commit comments