Closed Crisp3333 closed 2 years ago
Any progress on that? Dealing with the same question right now...
I figured it out. The trick is to the set the right depth in the .graphqlconfig which is placed in the project root. I changed it from 2 to 3 which is likely the depth simple nested queries have.
maxDepth: 3
After that run "amplify codegen" and then build the project.
Closing this issue since the original question was answered and this issue has been inactive for some time. Please create a new issue if you have additional questions.
State your question Does AWS AppSync SDK for Java/Android supports querying by connections support one to many? I notice that after adding one to many field to my schema
shares
, the generated Java files for the connection field only has a__typename
andnextToken
attributes/fields. Because of this I am wondering if AppSync Supports one to many connections for Java. I have tested the query in the AWS AppSync console and query on theMedia
table works fine forshares
one to many connections, giving back the associatedShare
response. One to one connections works fine in my Android application as it is straight forward, however, figuring out how to get the results fromshares
is a puzzle.Provide code snippets (if applicable) Below is the schema and the static class
Shares
that is within theAllMediaByAuthor
class. As you can see, there is not much to go by with the one to many connection that is suppose to be controlled byShares
.Schema
Generated GraphQL Java file for
AllByMediaQuries -> Shares
In other words, with the generated java classes I cannot achieve the following
shares
response which I can easily achieve in the AppSync console with the following query.Environment(please complete the following information): AppSync SDK Version: [2.8.3] Environment: Windows 10 IDE: Android Studio: 3.5.3 AWS: aws-cli: 1.16.43
Device Information (please complete the following information):