AppSync empty selectionSetList in the GraphQL Info Object

0

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.

VasylK
已提問 1 個月前檢視次數 108 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南