-
-
Save lucasconstantino/8cb67cd5d9965bc6a12865fbec650904 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { client } from './client' | |
import gql from 'graphql-tag' | |
const query = gql` | |
query Post ($id: Int!) { | |
post (id: $id) { | |
id | |
title | |
body | |
author { | |
id | |
username | |
} | |
} | |
} | |
` | |
client.query({ query, variables: { id: 1 } }).then(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment