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.12.21 lib/graphql/schema/member/scoped.rb
graphql-1.12.20 lib/graphql/schema/member/scoped.rb
graphql-1.12.19 lib/graphql/schema/member/scoped.rb
graphql-1.11.10 lib/graphql/schema/member/scoped.rb
graphql-1.12.18 lib/graphql/schema/member/scoped.rb
graphql-1.11.9 lib/graphql/schema/member/scoped.rb
graphql-1.12.17 lib/graphql/schema/member/scoped.rb
graphql-1.12.16 lib/graphql/schema/member/scoped.rb
graphql-1.12.15 lib/graphql/schema/member/scoped.rb
graphql-1.12.14 lib/graphql/schema/member/scoped.rb
graphql-1.12.13 lib/graphql/schema/member/scoped.rb
graphql-1.12.12 lib/graphql/schema/member/scoped.rb
graphql-1.12.11 lib/graphql/schema/member/scoped.rb
graphql-1.12.10 lib/graphql/schema/member/scoped.rb
graphql-1.12.9 lib/graphql/schema/member/scoped.rb
graphql-1.12.8 lib/graphql/schema/member/scoped.rb
graphql-1.12.7 lib/graphql/schema/member/scoped.rb
graphql-1.12.6 lib/graphql/schema/member/scoped.rb
graphql-1.12.5 lib/graphql/schema/member/scoped.rb
graphql-1.11.8 lib/graphql/schema/member/scoped.rb