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
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.
//Response is -----
GraphQLResponse{data='co.heyinnovation.desklessworkers.data.models.amplify.generated.model.BatchGetTeamOutput@2b6d2a38', errors='[]'}
amplifyconfiguration.json
No response
GraphQL Schema
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
leomuko
changed the title
Cannot Amplify-Generated Android Model Files for GraphQL API Requests
Cannot Use Amplify-Generated Android Model Files for GraphQL API Requests
Mar 13, 2024
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.
I believe this is expected. Can you point to documentation that you are attempting to follow? Amplify GraphQL API is primarily intended to be used with Amplify models, especially when it comes to serialization.
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
The text was updated successfully, but these errors were encountered: