lib/graphql/schema/member/instrumentation.rb in graphql-1.9.3 vs lib/graphql/schema/member/instrumentation.rb in graphql-1.9.4

- old
+ new

@@ -26,9 +26,15 @@ root_type = query.irep_selection.return_type # If it has a wrapper, apply it wrapper_class = root_type.metadata[:type_class] if wrapper_class new_root_value = wrapper_class.authorized_new(query.root_value, query.context) + new_root_value = query.schema.sync_lazy(new_root_value) + if new_root_value.nil? + # This is definitely a hack, + # but we need some way to tell execute.rb not to run. + query.context[:__root_unauthorized] = true + end query.root_value = new_root_value end end end