-
Notifications
You must be signed in to change notification settings - Fork 202
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
fix: refactor GraphQL response decoder #971
Conversation
Codecov Report
@@ Coverage Diff @@
## main #971 +/- ##
==========================================
+ Coverage 54.59% 54.78% +0.19%
==========================================
Files 631 634 +3
Lines 18371 18372 +1
==========================================
+ Hits 10030 10066 +36
+ Misses 8341 8306 -35
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0ddd802
to
a77fc97
Compare
323e0ef
to
adeffef
Compare
AmplifyPlugins/API/AWSAPICategoryPlugin/Operation/AWSGraphQLSubscriptionOperation.swift
Outdated
Show resolved
Hide resolved
AmplifyPlugins/API/AWSAPICategoryPlugin/Support/Decode/GraphQLResponseDecoder.swift
Outdated
Show resolved
Hide resolved
AmplifyPlugins/API/AWSAPICategoryPlugin/Support/Utils/GraphQLRequest+Extension.swift
Outdated
Show resolved
Hide resolved
44b6433
to
05c4649
Compare
05c4649
to
409357f
Compare
do { | ||
let errors = try getAPIErrors(from: jsonObject) | ||
let data = try getGraphQLData(from: jsonObject) | ||
switch (data, errors) { |
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.
nice! :)
Issue #, if available:
Description of changes:
This refactors the GraphQL decoder code to isolate decoding logic into
decodeToResponseType()
in anticipation of pagination support decodingBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.