During the development of our Android application, I utilized Amplify's codegen tool to generate model files intended for interfacing with our GraphQL API. These generated files encompass classes that either extend the Model class or are simple Java model classes.
According to the provided documentation, these generated model files should seamlessly facilitate requests to our GraphQL API. However, upon attempting to utilize these files for making requests, we encountered unexpected results. Instead of successful interactions with the API, parsing issues within Amplify arose, leading to the generation of errors.
Notably, the response is returned as a string.
It's worth noting that the files extending the Model class seem to work fine, whereas the "simple Java files" do not return expected results.
Our objective is to leverage these generated model files for Amplify requests, streamlining our process and ensuring smoother migrations of future changes. Currently, we are resorting to using custom files for parsing responses, which adds complexity to our workflow.
I am seeking clarification on the root cause of these parsing failures. I have diligently followed the steps outlined in the AWS documentation. Any insights or assistance in resolving this issue would be greatly appreciated.
Before opening, please confirm:
Language and Async Model
Java, Kotlin
Amplify Categories
GraphQL API
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/android/build-a-backend/graphqlapi/advanced-workflows
Describe the bug
During the development of our Android application, I utilized Amplify's codegen tool to generate model files intended for interfacing with our GraphQL API. These generated files encompass classes that either extend the
Model
class or are simple Java model classes.According to the provided documentation, these generated model files should seamlessly facilitate requests to our GraphQL API. However, upon attempting to utilize these files for making requests, we encountered unexpected results. Instead of successful interactions with the API, parsing issues within Amplify arose, leading to the generation of errors.
Notably, the response is returned as a string.
It's worth noting that the files extending the
Model
class seem to work fine, whereas the "simple Java files" do not return expected results.Our objective is to leverage these generated model files for Amplify requests, streamlining our process and ensuring smoother migrations of future changes. Currently, we are resorting to using custom files for parsing responses, which adds complexity to our workflow.
I am seeking clarification on the root cause of these parsing failures. I have diligently followed the steps outlined in the AWS documentation. Any insights or assistance in resolving this issue would be greatly appreciated.
Reproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
No response
Additional information and screenshots
No response