Open admund opened 3 years ago
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.