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.

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ