Skip to content

Add GraphQL Client

What does this MR do and why?

This MR adds a GraphQL client to triage ops for use in processors.

This is an MVC client - not quite fully featured (doesn't observe rate limits, and/or pagination).

Based on https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/blob/master/lib/gitlab/triage/network_adapters/graphql_adapter.rb

I had to use the namespace Triage::GraphqlQuery as GraphQL was getting confused between this class and the upstream library.

The Schema query is cached (and shared by any users) so we don't have to run the expensive (and slow) schema query regularly. I've chosen a day (86400 seconds) as a sensible default, but this could be tweaked (and indeed overridden by an implementing class)

Expected impact & dry-runs

No current impact expected - this is simply adding a GraphQL client to be used in subsequent features.

Action items

Edited by Raimund Hook

Merge request reports