Simple GraphQL Client for JavaScript. Minimal. Extensible. Type Safe. Runs everywhere.
MIT License
Bot releases are hidden (Show)
Published by schickling about 7 years ago
Replaced isomorphic-fetch
with cross-fetch
. Thanks for the PR #30 @lquixada!
Published by timsuchanek about 7 years ago
error
object to fix the issue described in #23fetch
-compatible options in constructor #9Example:
import { GraphQLClient } from 'graphql-request'
const client = new GraphQLClient('my-endpoint', {
credentials: 'include',
mode: 'cors'
})
const query = `{
Movie(title: "Inception") {
releaseDate
actors {
name
}
}
}`
client.request(query).then(data => console.log(data))