You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a nullable input field is explicitly set to null, the null value should be propagated to the API to enable the semantic difference between an explicit null value and an omitted value to be communicated.
To Reproduce
Consider schema:
type ObjectWithNullable {
id: ID!
nullable: String
}
input InputWithNullable {
id: ID!
nullable: String
}
type Mutation {
update(input: InputWithNullables!): ObjectWithNullable! # Return value is immaterial
}
In the generated code, when I invoke update with input and set nullable to null, the Input.fromNullable correctly returns an Input with valuenull and definedtrue however the null value is not serialised in to the request body by JsonWriter in AppSyncOfflineMutationManager.httpRequestBody - fix would seem to be to set JsonWriter.serializeNulls to true after construction.
Screenshots
N/A
Environment(please complete the following information):
AppSync SDK Version: 3.1.1
Device Information (please complete the following information):
Device: Simulator
Android Version: 29
Specific to simulators: No
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
When a nullable input field is explicitly set to null, the null value should be propagated to the API to enable the semantic difference between an explicit null value and an omitted value to be communicated.
To Reproduce
Consider schema:
and graphql document:
Expected behavior
In the generated code, when I invoke
update
with input and setnullable
to null, the Input.fromNullable correctly returns an Input withvalue
null
anddefined
true
however the null value is not serialised in to the request body by JsonWriter inAppSyncOfflineMutationManager.httpRequestBody
- fix would seem to be to setJsonWriter.serializeNulls
to true after construction.Screenshots
N/A
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: