-
Notifications
You must be signed in to change notification settings - Fork 13
feat: support new Cart respondWith instead of CartInput #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support new Cart respondWith instead of CartInput #409
Conversation
| /** | ||
| * Converts a JSON string to a dictionary. | ||
| */ | ||
| static func stringToJSON(from value: String?) -> [String: Any]? { | ||
| guard let data = value?.data(using: .utf8, allowLossyConversion: false) else { return [:] } | ||
| do { | ||
| return try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: Any] | ||
| } catch { | ||
| print("Failed to convert string to JSON: \(error)", value ?? "nil") | ||
| return [:] | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer referenced anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we were never using it
markmur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good bar the __typenames
Sweet - I'm going to merge as is then do separate PR's for the revert of __typename |
What changes are you making?
Adds support for the new cart responses:
PR Checklist
Important
Releasing a new version of the kit?
package.jsonfile.Tip
See the Contributing documentation for instructions on how to publish a new version of the library.