Class: GraphQL::Schema::Mask::EitherMask Private

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/schema/mask.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Hides member if either mask would hide the member.

API:

  • private

Instance Method Summary collapse

Constructor Details

#initialize(first_mask, second_mask) ⇒ EitherMask

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of EitherMask.

API:

  • private



44
45
46
47
# File 'lib/graphql/schema/mask.rb', line 44

def initialize(first_mask, second_mask)
  @first_mask = first_mask
  @second_mask = second_mask
end

Instance Method Details

#call(member, ctx) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



49
50
51
# File 'lib/graphql/schema/mask.rb', line 49

def call(member, ctx)
  @first_mask.call(member, ctx) || @second_mask.call(member, ctx)
end