The API to serve TechnoServe Coffee Program web app called "My PIMA"
Explain how to get your GraphQL API project up and running. Include instructions on prerequisites, installation, and configuration.
- Install Node.js
- Install PostgreSQL
Provide step-by-step installation instructions. For example:
- Clone this repository:
git clone https://github.com/TechnoServe/my-pima-back.git
- Navigate to the project directory:
cd my-pima-back
- Install dependencies:
npm install
- Configure the environment variables from .env.example (if applicable).
Use apollo studio to test the API
Apollo Studio: [PIMA API documentation] (https://studio.apollographql.com/sandbox/explorer?endpoint=https://api.pima.ink/graphql)
// Sample GraphQL query using Apollo Client
import { ApolloClient, InMemoryCache, gql } from "@apollo/client";
const client = new ApolloClient({
uri: "https://api.pima.ink/graphql",
cache: new InMemoryCache(),
});
client
.query({
query: gql`
query {
// Your GraphQL query here
}
`,
})
.then((result) => console.log(result))
.catch((error) => console.error(error));