aws / aws/aws-appsync-community
AppSync empty selectionSetList in the GraphQL Info Object
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
It seems **selectionSetList** is always empty when running queries returning a union type.
Simplified schema example:
type Post {
id: ID!
content: String!
}
type QueryError {
message: String!
}
union QueryResult = Post | QueryError
type Query {
getPost(id: String!): QueryResult
}
Query Example:
query GetPostQuery {
getPost(id: "post-guid") {
... on Post {
id
content
}
... on QueryError {
message
}
}
}
Lambda function receives *$event.info.selectionSetList = []* for such type of queries on AWS AppSync.
Is there anything one can do to make it work?
P.S: It works correctly when running locally using **Amplify AppSyncSimulator.**
Contributor guide
Research direction
Start by reproducing the reported union-type query in AWS AppSync and inspect the Lambda event's $event.info.selectionSetList. Compare the result with Amplify AppSyncSimulator, then determine whether the empty list is expected, has a documented workaround, or requires an AWS service fix; done means recording a confirmed resolution or reproducible finding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100