Skip to content

Spec to alert if Direct Transfer GraphQL queries use deprecated schema

What does this MR do and why?

This MR:

  • Adds logging for when GraphQL query has deprecated arguments.
  • Add test coverage for Direct Transfer GraphQL queries to alert when queries used deprecated fields or arguments.

The spec piggy-backs on the existing analyzer that adds this data to the RequestStore. It validates the assumption that certain keys are present in this store.

The intention of the spec is for future breaking changes to GraphQL schema used by Direct Transfer queries to become known as soon as possible. Engineers can then work out how best to proceed with the deprecation.

#438021 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

To QA the logging:

  1. On this branch, go to your localhost GraphiQL explorer: http://gdk.test:3000/-/graphql-explorer
  2. Tail your log/graphql_json.log file: tail -f log/graphql_json.log
  3. Enter this query:
    {
      runners(active: false)  {
        nodes {
          id
        }
      }
    }
  4. Note in the logs you will see "query_analysis.used_deprecated_arguments":["RunnersResolver.active"]

Related to #438021 (closed)

Merge request reports