Skip to content

Instantly share code, notes, and snippets.

@lucasconstantino
Created March 29, 2017 18:22
Show Gist options
  • Save lucasconstantino/8cb67cd5d9965bc6a12865fbec650904 to your computer and use it in GitHub Desktop.
Save lucasconstantino/8cb67cd5d9965bc6a12865fbec650904 to your computer and use it in GitHub Desktop.
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
email
}
}
}
`
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