lib/graphql/object_type.rb
# Declare that this object implements this interface.
# This declaration will be validated when the schema is defined.
# @param interfaces [Array<GraphQL::Interface>] add a new interface that this type implements
# @param inherits [Boolean] If true, copy the interfaces' field definitions to this type
Declare that this object implements this interface.
This declaration will be validated when the schema is defined.
Declare that this object implements this interface . This declaration will be validated when the schema is defined .
def implements(interfaces, inherit: false)
      if !interfaces.is_a?(Array)
        raise ArgumentError, "`implements(interfaces)` must be an array, not #{interfaces.class} (#{interfaces})"
      end
      @clean_interfaces = nil
      @clean_inherited_fields = nil
      dirty_ifaces = inherit ? @dirty_inherited_interfaces : @dirty_interfaces
      dirty_ifaces.concat(interfaces)
    end
def implements ( interfaces , inherit : false ) if ! interfaces . is_a? ( Array ) raise ArgumentError , "`implements(interfaces)` must be an array, not #{interfaces.class} (#{interfaces})" end @clean_interfaces = nil @clean_inherited_fields = nil dirty_ifaces = inherit ? @dirty_inherited_interfaces : @dirty_interfaces dirty_ifaces . concat ( interfaces ) end
Declare that this object implements this interface.
Declare that this object implements this interface .
interfaces
add a new interface that this type implements
add a new interface that this type implements
inherit
inherits
If true, copy the interfaces' field definitions to this type
If true copy the interfaces ' field definitions to this type