Skip to content
Snippets Groups Projects

[graphql] Convert to using the new query interpreter runtime

Merged Brett Walker requested to merge bw-graphql-interpreter into master
1 unresolved thread
Compare and
71 files
+ 699
389
Compare changes
  • Side-by-side
  • Inline
Files
71
@@ -39,14 +39,18 @@ def ready?(**args)
true
end
def load_application_object(argument, lookup_as_type, id, context)
::Gitlab::Graphql::Lazy.new { super }.catch(::GraphQL::UnauthorizedError) do |e|
Gitlab::ErrorTracking.track_exception(e)
# The default behaviour is to abort processing and return nil for the
# entire mutation field, but not set any top-level errors. We prefer to
# at least say that something went wrong.
raise_resource_not_available_error!
end
def load_application_object(argument, id, context)
::Gitlab::Graphql::Lazy.new { super }
end
# TODO: can this be moved to the schema object:
# https://graphql-ruby.org/authorization/authorization.html#handling-unauthorized-objects
def unauthorized_object(error)
# The default behavior is to abort processing and return nil for the
# entire mutation field, but not set any top-level errors. We prefer to
# at least say that something went wrong.
Gitlab::ErrorTracking.track_exception(error)
raise_resource_not_available_error!
end
def self.authorizes_object?
Loading