lib/graphql/relay/node.rb in graphql-1.12.1 vs lib/graphql/relay/node.rb in graphql-1.12.2

- old
+ new

@@ -3,11 +3,11 @@ module Relay # Helpers for working with Relay-specific Node objects. module Node # @return [GraphQL::Field] a field for finding objects by their global ID. def self.field(**kwargs, &block) - warn "GraphQL::Relay::Node.field will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::NodeField instead" + GraphQL::Deprecation.warn "GraphQL::Relay::Node.field will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::NodeField instead" # We have to define it fresh each time because # its name will be modified and its description # _may_ be modified. field = GraphQL::Types::Relay::NodeField.graphql_definition @@ -17,11 +17,11 @@ field end def self.plural_field(**kwargs, &block) - warn "GraphQL::Relay::Nodes.field will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::NodesField instead" + GraphQL::Deprecation.warn "GraphQL::Relay::Nodes.field will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::NodesField instead" field = GraphQL::Types::Relay::NodesField.graphql_definition if kwargs.any? || block field = field.redefine(**kwargs, &block) end @@ -29,10 +29,10 @@ field end # @return [GraphQL::InterfaceType] The interface which all Relay types must implement def self.interface - warn "GraphQL::Relay::Node.interface will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::Node instead" + GraphQL::Deprecation.warn "GraphQL::Relay::Node.interface will be removed from GraphQL-Ruby 2.0, use GraphQL::Types::Relay::Node instead" @interface ||= GraphQL::Types::Relay::Node.graphql_definition end end end end