Open alexjameslittle opened 1 year ago
When you pass enum to create test mocks, you get a JSON decoding error:
couldNotConvert(value: AnyHashable(ApolloAPI.GraphQLEnum<ProfileFriendStatus>.case(ProfileFriendStatus.none)), to: Swift.String)
1.1.2
You need a type that has an enum for a field.
enum ProfileFriendStatus { NONE FRIENDS PENDING } type Profile { friendStatus: ProfileFriendStatus! }
Then when trying to create the mock like so, it always fails
let mock = Mock<Profile>(friendStatus: GraphQLEnum<ProfileFriendStatus>.case(.none))
No response
Possibly related to https://github.com/apollographql/apollo-ios/issues/2830 and https://github.com/apollographql/apollo-ios/issues/2686.
Summary
When you pass enum to create test mocks, you get a JSON decoding error:
Version
1.1.2
Steps to reproduce the behavior
You need a type that has an enum for a field.
Then when trying to create the mock like so, it always fails
Logs
No response
Anything else?
No response