# frozen_string_literal: true # This goes in a Rails initializer, or some other code that runs before your schema/types are required GraphQL::Field.accepts_definitions( preload: -> (type, *args) do type.metadata[:preload] ||= [] type.metadata[:preload].concat(args) end )