Skip to content

Repository files navigation

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: "johnsmith@gmail.com") {
    firstName
    lastName
    reservations {
    arrivalDate
    departureDate
    guests
    }
    }
    }
    
  • Try the following mutation:
    mutation {
    createGuest(input: {
    firstName: "Jane"
    lastName: "Doe"
    email: "janedoe@gmail.com"
    }) {
    id
    }
    }
    
  • Next steps: Try creating a mutation to create a reservation for a given guest

Other notes

About

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

Topics

Resources

Stars

22 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages