We will launch an Apollo server with Node, and perform some read & write operations from the Apollo studio sandbox to a HarperDB instance.
- Set up an Apollo server with Node.js and connect it to a HarperDB instance by obtaining the instance credentials from the HarperDB Studio configuration.
- Clone the code from the GitHub repository and install the required dependencies.
- Create an .env file and add the HarperDB instance URL as an environment variable.
- Start the server using the npm start command and access the Apollo Studio sandbox on http://localhost:4000/.
- Set the authorization header in the Apollo Studio by providing the basic token obtained from HarperDB Studio.
- Explore the code files, including datasource.js, index.js, resolvers.js, and schema.js, which handle making API calls to HarperDB, defining the GraphQL schema, implementing resolvers, and starting the server.
- Perform GraphQL operations using the Apollo Studio, such as creating a schema, creating a table, adding entries to the table, retrieving records, and querying selective records from the table.
- Verify the results in the Apollo Studio and HarperDB Studio, and feel free to ask questions or provide feedback.