Apollo Client is currently the best GraphQL client implementation in the JavaScript ecosystem. It has a large community behind it and has a big company supporting it.
Our implementation of the AWS Amplify GraphQL API uses Apollo Server on the backend, so the usage of Apollo Client will be a perfect match. AWS AppSync uses their implementation of Apollo as the client also, so we will still be using Apollo as a client as well, but not directly.
In this recipe, we will learn how to add the GraphQL client to our application, along with how to connect to the AWS Amplify GraphQL server to execute queries.
Getting ready
The prerequisite for this recipe is as follows:
- The previous recipe's project
- Node.js 12+
The Node.js global objects that are required are as follows:
- @aws-amplify/cli
- @quasar/cli
In this recipe, we will use the project from the Creating your first GraphQL API recipe. Before following this recipe, please follow the steps...