Skip to content

Commit

Permalink
fix legacy constant names
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jan 27, 2021
1 parent 63709dd commit 5133a15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/graphql/define/assign_global_id_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Define
module AssignGlobalIdField
def self.call(type_defn, field_name, **field_kwargs)
resolve = GraphQL::Relay::GlobalIdResolve.new(type: type_defn)
GraphQL::Define::AssignObjectField.call(type_defn, field_name, **field_kwargs, type: GraphQL::Deprecation_ID_TYPE.to_non_null_type, resolve: resolve)
GraphQL::Define::AssignObjectField.call(type_defn, field_name, **field_kwargs, type: GraphQL::DEPRECATED_ID_TYPE.to_non_null_type, resolve: resolve)
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions lib/graphql/define/type_definer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module Define
class TypeDefiner
include Singleton
# rubocop:disable Naming/MethodName
def Int; GraphQL::Deprecation_INT_TYPE; end
def String; GraphQL::Deprecation_STRING_TYPE; end
def Float; GraphQL::Deprecation_FLOAT_TYPE; end
def Boolean; GraphQL::Deprecation_BOOLEAN_TYPE; end
def ID; GraphQL::Deprecation_ID_TYPE; end
def Int; GraphQL::DEPRECATED_INT_TYPE; end
def String; GraphQL::DEPRECATED_STRING_TYPE; end
def Float; GraphQL::DEPRECATED_FLOAT_TYPE; end
def Boolean; GraphQL::DEPRECATED_BOOLEAN_TYPE; end
def ID; GraphQL::DEPRECATED_ID_TYPE; end
# rubocop:enable Naming/MethodName

# Make a {ListType} which wraps the input type
Expand Down
8 changes: 4 additions & 4 deletions lib/graphql/relay/connection_instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ module ConnectionInstrumentation
def self.default_arguments
@default_arguments ||= begin
argument_definitions = [
["first", GraphQL::Deprecation_INT_TYPE, "Returns the first _n_ elements from the list."],
["after", GraphQL::Deprecation_STRING_TYPE, "Returns the elements in the list that come after the specified cursor."],
["last", GraphQL::Deprecation_INT_TYPE, "Returns the last _n_ elements from the list."],
["before", GraphQL::Deprecation_STRING_TYPE, "Returns the elements in the list that come before the specified cursor."],
["first", GraphQL::DEPRECATED_INT_TYPE, "Returns the first _n_ elements from the list."],
["after", GraphQL::DEPRECATED_STRING_TYPE, "Returns the elements in the list that come after the specified cursor."],
["last", GraphQL::DEPRECATED_INT_TYPE, "Returns the last _n_ elements from the list."],
["before", GraphQL::DEPRECATED_STRING_TYPE, "Returns the elements in the list that come before the specified cursor."],
]

argument_definitions.reduce({}) do |memo, arg_defn|
Expand Down

0 comments on commit 5133a15

Please sign in to comment.