Method: ManageIQ::API::Common::GraphQL::Generator.collection_schema_overlay

Defined in:
lib/manageiq/api/common/graphql/generator.rb

.collection_schema_overlay(schema_overlay, collection) ⇒ Object



73
74
75
76
77
78
79
# File 'lib/manageiq/api/common/graphql/generator.rb', line 73

def self.collection_schema_overlay(schema_overlay, collection)
  schema_overlay.keys.each_with_object({}) do |collection_regex, collection_schema_overlay|
    next unless collection.match?(collection_regex)

    collection_schema_overlay.merge!(schema_overlay[collection_regex] || {})
  end
end