You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/graphql/schema/argument.rb
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,10 @@ def to_graphql
146
146
argument
147
147
end
148
148
149
-
attr_writer:type
149
+
deftype=(new_type)
150
+
validate_input_type(new_type)
151
+
@type=new_type
152
+
end
150
153
151
154
deftype
152
155
@type ||= begin
@@ -155,10 +158,7 @@ def type
155
158
rescueStandardError=>err
156
159
raiseArgumentError,"Couldn't build type for Argument #{@owner.name}.#{name}: #{err.class.name}: #{err.message}",err.backtrace
157
160
end
158
-
unwrapped_parsed_type=parsed_type.unwrap
159
-
if !unwrapped_parsed_type.kind.input?
160
-
raiseArgumentError,"Invalid input type for #{path}: #{unwrapped_parsed_type.graphql_name}. Must be scalar, enum, or input object, not #{unwrapped_parsed_type.kind.name}."
0 commit comments