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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠