Method: GraphQL::Schema::Member::HasArguments#remove_argument
- Defined in:
- lib/graphql/schema/member/has_arguments.rb
#remove_argument(arg_defn) ⇒ 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.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/graphql/schema/member/has_arguments.rb', line 86 def remove_argument(arg_defn) prev_defn = @own_arguments[arg_defn.name] case prev_defn when nil # done when Array prev_defn.delete(arg_defn) when GraphQL::Schema::Argument @own_arguments.delete(arg_defn.name) else raise "Invariant: unexpected `@own_arguments[#{arg_defn.name.inspect}]`: #{prev_defn.inspect}" end nil end |