aws-amplify / aws-amplify/amplify-codegen

How to access index(GSI) with amplify API?

Open
#864 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
59
Forks
64
PR merge metrics
No merged PRs in 30d

Description

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?

``` type Customer @model @auth(rules: [{ allow: public }]) {
id: ID!
name: String! @index(name: "byNameAndPhoneNumber", sortKeyFields: ["phoneNumber"], queryField: "customerByNameAndPhone")
phoneNumber: String
accountRepresentativeID: ID! @index
```

Any links or suggestion is welcome. Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.