apollo-server-starter icon indicating copy to clipboard operation
apollo-server-starter copied to clipboard

💻 Apollo Server starter kit, utilizing HapiJS and KnexJS on top of PostgreSQL

Apollo Server starter kit

Utilizes Apollo Server, HapiJS and KnexJS on top of PostgreSQL.

Deploy

To get started

  • $ yarn global add knex / $ npm install -g knex
  • $ createdb apollo_server && psql -d apollo_server -f bootstrap.sql
  • $ knex migrate:latest
  • $ knex seed:run
  • $ yarn dev / $ npm run dev
  • http://localhost:3000/graphiql
  • Try the following query:
    {
      Guest(email: "[email protected]") {
        firstName
        lastName
        reservations {
          arrivalDate
          departureDate
          guests
        }
      }
    }
    
  • Try the following mutation:
    mutation {
      createGuest(input: {
        firstName: "Jane"
        lastName: "Doe"
        email: "[email protected]"
      }) {
        id
      }
    }
    
  • Next steps: Try creating a mutation to create a reservation for a given guest

Other notes