How to use AWS Amplify GraphQL search and aggregate queries in React code?

How to use AWS Amplify GraphQL search and aggregate queries in React code?


0

In the current AWS Amplify React documentation there are no any examples showing how to use these GraphQL queries in React code. Can someone please post an example here. Authentication method needs be the API_KEY. Thanks.

query SearchStudentsByEmail {
  searchStudents(filter: { name: { eq: "Rene Brandel" } }) {
    items {
      id
      name
      email
    }
  }
}

1 Answer
1


-1

The amplify docs don’t deal with react at all.

I recommend you install the apollo-client and use its react hooks in react.



Leave a Reply

Your email address will not be published. Required fields are marked *