Appsync composite key (GSI in dynamodb) returns Null in query response

0

Hi, I have a appsync Schema which has composite key

@key(name: "FinderJobbyDateWithCompositKey", fields: [ "finder_id", "date", "job_status" ], queryField: "JobsFinderWithCompositKey")

I did amplify push and it successfully created GSI with the respective table. the table has the data but when I run query

query MyQuery { JobsFinderWithCompositKey(finder_id: "+929898989898", dateJob_status: {eq: {date: "2022-04-06T09:00:00.000Z", job_status: "15"}}) { items { cod_charge createdAt } } }

it give me Null in response. Please specify what is the issue and how to solve and get result.

I followed this link:

https://docs.amplify.aws/cli-legacy/graphql-transformer/key/#example-get-orders-by-customer-email-by-createdat

  • Hello Shaista, can you share more info about your schema (full model) and your resolver templates?

  • The names of the fields are not the same: date and dateJob_status. The simple way to check for it is to call DynamoDB directly using the AWS CLI for example with the relevant query and see if you get any results. You can also enable the "Logs" option in the AppSync Query and see if you get errors or results.

1 個回答
0

Hello Shaista,

I understand that you followed this guideline to make Amplify push, which successfully created GSI in the corresponding DynamoDB table. The table has expected data, however when you run the query, it is giving you null response. We need additional account specific information in order to troubleshoot this issue. Hence, kindly, reach out to AWS Support and work with Premium Support Engineers to resolve this issue. While creating the support case to Premium Support, you will need to provide following details.

•	Account ID
•	Region
•	Table Name
•	GSI name
•	Time frame(10-15 minutes window)
•	DynamoDB Request ID(Important)
AWS
支援工程師
Isha_K
已回答 2 年前

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

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

回答問題指南