Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sast_resolver.rb « ci_configuration « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e8c42076ea2ae25e89b781d9387fcafa1271c7ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require "json"

module Resolvers
  module CiConfiguration
    class SastResolver < BaseResolver
      SAST_UI_SCHEMA_PATH = 'app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json'

      type ::Types::CiConfiguration::Sast::Type, null: true

      def resolve(**args)
        Gitlab::Json.parse(File.read(Rails.root.join(SAST_UI_SCHEMA_PATH)))
      end
    end
  end
end