Tag: serialization
-
How to serialize GraphQLEnum JSON in swift with Apollo version 1.3
0 I am trying to serialize data from a GraphQL Apollo request into JSON in order to decode into my swift model. However, when trying to serialize the data with an enum it fails. static func decodeUser(userJson:JSONObject)->UserQL?{ let decoder = JSONDecoder() print(userJson) guard let jsonData = try? JSONSerializationFormat.serialize(value: userJson) else { return nil } return…