Sha256: 74281c7e41456160e14b719c25ff09463ed6f9a0fdbfbab32f0e3d6e09d38df9

Contents?: true

Size: 626 Bytes

Versions: 150

Compression:

Stored size: 626 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  class Schema
    class Member
      module Scoped
        # This is called when a field has `scope: true`.
        # The field's return type class receives this call.
        #
        # By default, it's a no-op. Override it to scope your objects.
        #
        # @param items [Object] Some list-like object (eg, Array, ActiveRecord::Relation)
        # @param context [GraphQL::Query::Context]
        # @return [Object] Another list-like object, scoped to the current context
        def scope_items(items, context)
          items
        end
      end
    end
  end
end

Version data entries

150 entries across 150 versions & 2 rubygems

Version Path
graphql-1.9.0.pre3 lib/graphql/schema/member/scoped.rb
graphql-1.9.0.pre2 lib/graphql/schema/member/scoped.rb
graphql-1.8.13 lib/graphql/schema/member/scoped.rb
graphql-1.8.12 lib/graphql/schema/member/scoped.rb
graphql-1.9.0.pre1 lib/graphql/schema/member/scoped.rb
graphql-1.8.11 lib/graphql/schema/member/scoped.rb
graphql-1.8.10 lib/graphql/schema/member/scoped.rb
graphql-1.8.9 lib/graphql/schema/member/scoped.rb
graphql-1.8.8 lib/graphql/schema/member/scoped.rb
graphql-1.8.7 lib/graphql/schema/member/scoped.rb