AppSync - An internal failure occurred while resolving this field.

0

I have an API in AppSync backed by a Lambda resolver that is fetching hierarchical data from AWS Cloud Directory. When I run a deep query with multiple levels and many nodes in the lower levels, I'm getting for some of the fields the following error:

{
      "path": [
        "organization",
        "regions",
        2,
        "stores",
        0,
        "departments",
        5,
        "counters"
      ],
      "data": null,
      "errorType": "InternalFailure",
      "errorInfo": null,
      "locations": [
        {
          "line": 10,
          "column": 11,
          "sourceName": null
        }
      ],
      "message": "An internal failure occurred while resolving this field."
    }

If I use filters and get fewer nodes, the same nodes that failed in the larger query come back without any error. Here is an example of the deeper query (without filters):

query OrganizationUsers {
  organization {
    name
    regions {
      region
      stores {
        store_name
        departments {
          department_name
          counters {
            counter_id
          }
        }
      }
    }
  }
}

I don't have any limits in the API settings regarding the query depth or the resolvers' count.

MLGuy
質問済み 2ヶ月前146ビュー
1回答
1

Hello,

As discussed on support case, this was due to Lambda function timing out. Increasing the Lambda timeout addressed the issue.

AWS
サポートエンジニア
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前

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

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

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

関連するコンテンツ