Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
karatakis committed Oct 12, 2022
1 parent 8aa5c14 commit 8bbc5fe
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Go to http://localhost:8000/ and try out the following queries:

```graphql
{
film(pagination: { limit: 10, page: 0 }, orderBy: { title: ASC }) {
data {
film(pagination: { pages: { limit: 10, page: 0 } }, orderBy: { title: ASC }) {
nodes {
title
description
releaseYear
Expand All @@ -79,7 +79,7 @@ Go to http://localhost:8000/ and try out the following queries:
```graphql
{
store(filters: { storeId: { eq: 1 } }) {
data {
nodes {
storeId
address {
address
Expand All @@ -98,8 +98,11 @@ Go to http://localhost:8000/ and try out the following queries:

```graphql
{
customer(filters: { active: { eq: 0 } }, pagination: { page: 2, limit: 3 }) {
data {
customer(
filters: { active: { eq: 0 } }
pagination: { pages: { page: 2, limit: 3 } }
) {
nodes {
customerId
lastName
email
Expand All @@ -110,6 +113,28 @@ Go to http://localhost:8000/ and try out the following queries:
}
```

### The query above using cursor pagination

```graphql
{
customer(
filters: { active: { eq: 0 } }
pagination: { cursor: { limit: 3, cursor: "Int[3]:271" } }
) {
nodes {
customerId
lastName
email
}
pageInfo {
hasPreviousPage
hasNextPage
endCursor
}
}
}
```

### Postgres

Setup the [sakila](https://github.com/SeaQL/seaography/blob/main/examples/postgres/sakila-schema.sql) sample database.
Expand Down

0 comments on commit 8bbc5fe

Please sign in to comment.