amplify-codegen icon indicating copy to clipboard operation
amplify-codegen copied to clipboard

How to access index(GSI) with amplify API?

Open Frankat1578 opened this issue 2 years ago • 4 comments

Hi, Is the a way I can query data with index, both Partition and Sort keys, using the GraphQL API in android? I have already pulled down the index into my local project and its inside my query schema. Also I am able to query and generate results in my AppSyncConsole. But am unable to use this inside my android project? Using the example below is the any way I can use the index in the android project query?

  id: ID!
  name: String! @index(name: "byNameAndPhoneNumber", sortKeyFields: ["phoneNumber"], queryField: "customerByNameAndPhone")
  phoneNumber: String
  accountRepresentativeID: ID! @index 

Any links or suggestion is welcome. Thanks

Frankat1578 avatar Dec 25 '22 17:12 Frankat1578