-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-level item in selectionSet
is not received.
#12665
Comments
Testing directly through AppSync, with query: query MyQuery {
listCommunityPosts {
items {
id
poll {
question
answers {
items {
answer
votes {
items {
id
}
}
}
}
}
}
}
} Following data is returned:
|
Hi @erickriva 👋 thanks for raising this issue. Can you inspect the network request that is made when using the client? Is the shape of the graphql request the same as the one you tried in the AppSync console? |
I think I may have confused up things (sorry, it was almost midnight 🥱), but seems there's a bug here still. Request: {
"query": "query ($id: ID!) {\n getCommunityPost(id: $id) {\n id\n poll {\n id\n question\n answers {\n items {\n votes {\n items {\n id\n }\n }\n }\n }\n }\n }\n}\n",
"variables": {
"id": "1"
}
} Response: {
"data": {
"getCommunityPost": {
"id": "1",
"poll": {
"id": "1",
"question": "Is this a good question for showing in issue?",
"answers": {
"items": [
{
"votes": {
"items": []
}
},
{
"votes": {
"items": [
{
"id": "f0396484-e3c8-4fbc-87cb-1811bad7b4af"
}
]
}
}
]
}
}
}
}
} They seems to match between them, but not with my code:
|
@chrisbonifacio I've been trying to modify the lib's code for the last days and I think I have solved the issue. Don't know about performance yet. I will open a PR soon. |
In the case this PR is approved, I'll send another to fix this issue, at least the execution part of it. Maybe I can fix TS too. |
Hey @erickriva thank you for looking into this and submitting a PR! I will bring it to the team's attention. |
PR #12701 was merged, released in 6.0.9, and this problem was solved. |
@erickriva thank YOU, sir! Excellent work 🙏 |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
GraphQL API
Amplify Categories
No response
Environment information
Describe the bug
A multi-level item in
selectionSet
is not received.Expected behavior
Expected to receive data for any level of nested query.
Reproduction steps
CommunityPost
is received.poll
properties are received.poll.answers
properties are received, except forpoll.answers.votes
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: