Sha256: b849b7149ccd808e9f18cf2f0a34bd060e501b87c697eb27105261d104760ec9

Contents?: true

Size: 697 Bytes

Versions: 4

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true
require "graphql/schema/visibility/subset"
require "graphql/schema/visibility/migration"

module GraphQL
  class Schema
    class Visibility
      def self.use(schema, preload: nil, migration_errors: false)
        schema.visibility = self.new(schema, preload: preload)
        schema.use_schema_visibility = true
        if migration_errors
          schema.subset_class = Migration
        end
      end

      def initialize(schema, preload:)
        @schema = schema
        @cached_subsets = {}

        if preload.nil? && defined?(Rails) && Rails.env.production?
          preload = true
        end

        if preload

        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
graphql-2.3.18 lib/graphql/schema/visibility.rb
graphql-2.3.17 lib/graphql/schema/visibility.rb
graphql-2.3.16 lib/graphql/schema/visibility.rb
graphql-2.3.15 lib/graphql/schema/visibility.rb