-
Notifications
You must be signed in to change notification settings - Fork 259
fix(datastore): Various integration bug fixes #4954
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
Conversation
/// If the response has errors, the event type will be `error`, otherwise `data` | ||
void sendSubscriptionEvent( | ||
String subscriptionId, GraphQLResponse<String> response) { | ||
final payloadJson = response.hasErrors |
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.
I recommend reusing sendNativeErrorEvent with the encoded error json if the response has 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.
Good suggestion, updated.
) { a, _ in a } | ||
}.map { JSONValue.object($0) } ?? dataPayload | ||
|
||
/// This is included to allow multi-platform support. Requests that do not have `__typename` |
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.
q: Was there supposed to be more to this comment? I am not following the second sentence.
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.
Hm, yah reads like a fragment 😅 Updated.
Description of changes:
modelName
which should always have a value.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.