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
I'm adding a new enum value to my GraphQL schema and I'm starting sending it. My older version apps crash or not work properly, because auto generated pares can handle that. It's done that way:
final MyEnum something;
if (somethingStr != null) {
something = MyEnum.valueOf(somethingStr);
} else {
something = null;
}
And valueOf will throw exception if it will get unknown value.
Expected behavior
if we just catch exception and return null, everything will keep working.
Environment(please complete the following information):
AppSync SDK Version: 3.1.4
Additional context
I'm not sure if this is AppSync problem or GraphQL which is used here. If second option, maybe AppSync should update this lib to newer one. From iOS team I know that this is working correctly with their AppSync SDK.
The text was updated successfully, but these errors were encountered:
Hi, we are facing the same issue in our android app. As @admund suggested, we just need to catch the exception and set the field to null. Especially if we are doing a list query of say 100 records, even if one record has an unrecognised enum value, the entire 100 records do not get processed.
Describe the bug
I'm adding a new enum value to my GraphQL schema and I'm starting sending it. My older version apps crash or not work properly, because auto generated pares can handle that. It's done that way:
And
valueOf
will throw exception if it will get unknown value.Expected behavior
if we just catch exception and return null, everything will keep working.
Environment(please complete the following information):
Additional context
I'm not sure if this is AppSync problem or GraphQL which is used here. If second option, maybe AppSync should update this lib to newer one. From iOS team I know that this is working correctly with their AppSync SDK.
The text was updated successfully, but these errors were encountered: