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-2.0.31 lib/graphql/schema/member/scoped.rb
graphql-1.13.23 lib/graphql/schema/member/scoped.rb
graphql-2.0.29 lib/graphql/schema/member/scoped.rb
graphql-1.13.22 lib/graphql/schema/member/scoped.rb
graphql-2.0.28 lib/graphql/schema/member/scoped.rb
graphql-1.13.21 lib/graphql/schema/member/scoped.rb
graphql-1.13.20 lib/graphql/schema/member/scoped.rb
graphql-2.0.27 lib/graphql/schema/member/scoped.rb
graphql-2.0.26 lib/graphql/schema/member/scoped.rb
graphql-2.0.25 lib/graphql/schema/member/scoped.rb
graphql-2.0.24 lib/graphql/schema/member/scoped.rb
graphql-2.0.23 lib/graphql/schema/member/scoped.rb
graphql-2.0.22 lib/graphql/schema/member/scoped.rb
graphql-2.0.21 lib/graphql/schema/member/scoped.rb
graphql-2.0.20 lib/graphql/schema/member/scoped.rb
graphql-2.0.17.2 lib/graphql/schema/member/scoped.rb
graphql-2.0.17.1 lib/graphql/schema/member/scoped.rb
graphql-2.0.19 lib/graphql/schema/member/scoped.rb
graphql-2.0.18 lib/graphql/schema/member/scoped.rb
graphql-2.0.17 lib/graphql/schema/member/scoped.rb