v1.3.0
版本发布时间: 2017-07-19 23:27:19
graffle-js/graffle最新发布版本:next(2020-05-29 21:00:56)
- Allow
fetch
-compatible options in constructor #9
Example:
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))