Skip to content

GraphQL in Node.js using Apollo Server and PostgreSQL

Notifications You must be signed in to change notification settings

luax/graphql-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-node

Based on Apollo's getting started guide with added functionality like cursor-based pagination (WIP) or DataLoader for caching and batching PostgresSQL statements.

Usage

Start server:

$ yarn start

Go to http://localhost:4000/ and enter some query, for example:

{
  author(id: 1) {
    booksConnection(input: { first: 11 }) {
      totalCount
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id,
          title
        }
        cursor
      }
    }
  }
}

Setup

Have PostgreSQL and yarn installed then run:

$ bin/setup

Resources

Releases

No releases published

Packages

No packages published

Languages