mp-graphql-request
v1.0.8
Published
小程序Graphql Client
Downloads
2
Maintainers
Readme
mp-graphql-request
小程序Graphql Client
Quickstart
import { request } from 'mp-graphql-request'
const query = `
query getMovies($first: Int!) {
allMovies(first:$first) {
id
slug
}
}
`
request('https://api.graph.cool/simple/v1/movies', query, { first: 3 })
.then(data => (this.movies = data.allMovies))
.catch(err => console.log(err))