Skip to content

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

Notifications You must be signed in to change notification settings

draftbit/apollo-server-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •