Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 1.33 KB

README.md

File metadata and controls

55 lines (44 loc) · 1.33 KB

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