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.10.0.pre1 lib/graphql/schema/member/scoped.rb
graphql-1.9.13 lib/graphql/schema/member/scoped.rb
graphql-1.9.12 lib/graphql/schema/member/scoped.rb
graphql-1.9.11 lib/graphql/schema/member/scoped.rb
graphql-1.9.10 lib/graphql/schema/member/scoped.rb
graphql-1.9.9 lib/graphql/schema/member/scoped.rb
graphql-1.9.8 lib/graphql/schema/member/scoped.rb
graphql-1.9.7 lib/graphql/schema/member/scoped.rb
graphql-1.9.6 lib/graphql/schema/member/scoped.rb
graphql-1.9.5 lib/graphql/schema/member/scoped.rb
graphql-1.9.4 lib/graphql/schema/member/scoped.rb
graphql-1.9.3 lib/graphql/schema/member/scoped.rb
graphql-1.9.2 lib/graphql/schema/member/scoped.rb
graphql-1.8.17 lib/graphql/schema/member/scoped.rb
graphql-1.8.16 lib/graphql/schema/member/scoped.rb
graphql-1.9.1 lib/graphql/schema/member/scoped.rb
graphql-1.9.0 lib/graphql/schema/member/scoped.rb
graphql-1.8.15 lib/graphql/schema/member/scoped.rb
graphql-1.9.0.pre4 lib/graphql/schema/member/scoped.rb
graphql-1.8.14 lib/graphql/schema/member/scoped.rb