0.1.7 • Published 6 months ago
@hot-chocolate/plugin-request v0.1.7
@hot-chocolate/plugin-request
安装
npm install @hot-chocolate/plugin-request
使用
import {
Manager
} from 'hot-chocolate';
import {
createSandboxRequestPlugin
} from '@hot-chocolate/plugin-request';
new Manager(
[...],
[
createSandboxRequestPlugin({
// 请求发送前的勾子
beforeRequest: (
options, // { url: string, method: string } 请求参数
application // 启动的application
) => {
// 返回新的请求url及method
return {
url: 'xxxx',
method: 'POST'
}
},
})
]
)
0.1.7-beta.0
6 months ago
0.1.7
6 months ago
0.1.6-beta.0
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago