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
public subscript<T: GraphQLOperationVariableValue>(key: String)-> T {get{data[key]as!T}set{data[key]= newValue }}
Version
1.15.3
Steps to reproduce the behavior
Deprecate a field of an input object in your schema
Run codegen to pick up the field
Create an instance of the input object using the new default initializer
letinput=MyInput()
Try accessing the deprecated field on the object
if input.oldField ==.none { // crash!
print("worked")}
Logs
Could not cast value of type'Swift.Optional<ApolloAPI.GraphQLOperationVariableValue>' (0x1f05300a0) to 'ApolloAPI.GraphQLNullable<Swift.String>' (0x1f052f388).
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Summary
We recently deprecated a field in an input object.
As a result, codegen created a new default initializer that that excludes that field.
Now, when accessing the deprecated field through the input object, it crashes because that field is not actually present in the underlying InputDict.
Generated code for the property looks like:
…which calls:
Version
1.15.3
Steps to reproduce the behavior
Logs
Anything else?
No response
The text was updated successfully, but these errors were encountered: