Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Do we need GraphQL?
POST /graphql
Content-Type: application/graphql
{
post(id: 1) {
id
title
comments {
id
body
}
}
}
GET /api/posts/1?include=comments
Accept: application/vnd.api+json
POST /graphql
Content-Type: application/graphql
{
post(id: 1) {
id
title
comments {
id
body
}
}
}
// Our second client needs a `published_at`
POST /graphql
Content-Type: application/graphql
{
post(id: 1) {
id
title
published_at // This changes our cache key
comments {
id
body
}
}
}
POST /graphql
Content-Type: application/graphql
{
post(id: 1) {
id
title
published_at
comments {
id
body
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.