Skip to content

Instantly share code, notes, and snippets.

@mtvspec
Created July 19, 2020 16:32
Show Gist options
  • Save mtvspec/1aa46879bd2c829ec01abe45aaea36ff to your computer and use it in GitHub Desktop.
Save mtvspec/1aa46879bd2c829ec01abe45aaea36ff to your computer and use it in GitHub Desktop.
GraphQL Query Examples
query bookList {
bookList {
count
nodes {
id
title
}
}
}
query bookList {
bookList {
count
nodes {
id
title
author {
id
name
}
}
}
}
query book($id: ID!) {
book(id: $id) {
id
title
description
}
}
query authorList {
authorList {
count
nodes {
id
name
}
}
}
query authorList {
authorList {
count
nodes {
id
name
bookList {
count
}
}
}
}
query authorList {
authorList {
count
nodes {
id
name
bookList {
count
nodes {
id
title
}
}
}
}
}
query author($id: ID!) {
author(id: $id) {
id
name
}
}
query author($id: ID!) {
author(id: $id) {
id
name
bookList {
count
}
}
}
query author($id: ID!) {
author(id: $id) {
id
name
bookList {
count
nodes {
id
title
description
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment