调用
const xxx = {
type: MediaQueryType,
args: {},
resolve (root, params, options){
const data = api.xxx()
return data
}
}
api 方法中的实现
export async function xxx () {
return axios.get(`${BASE_URL}/xx/xxxxx`)
}
提示错误:graphql_1.execute(...).then is not a function
resolve 中用 axios 获取数据不可行么?