Introduce a new BaseEdge class for GraphQL

Background

In !70692 (merged) we introduced a custom implementation of an Edge class, RunnerWebUrlEdge this class extends the GraphQL::Types::Relay::BaseEdge.

Problem

This class does not implement authorization like Types::BaseObject currently does. So adding :authorize to edge classes does not have any effect.

Proposed solution

Implement a Types::BaseEdge class to enforce security/authorization policies.

Original Discussion

The following discussion from !70692 (merged) should be addressed:

  • @alexkalderimis started a discussion: (+10 comments)

    Suggestion, since this field is only available for admins, we may wish to hide it (i.e. using visibility overrides) when the current user is not an admin. This will prevent running queries with this field (it will raise the equivalant of a syntax error), and prevent revealing the field in introspection queries.

    Overall I think that would be safer, but please check with security