在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:expo/koa-graphiql开源软件地址:https://github.com/expo/koa-graphiql开源编程语言:JavaScript 100.0%开源软件介绍:koa-graphiqlKoa middleware to display GraphiQL. Designed for Koa 2. Usagenpm i --save koa-graphiql Add it to your Koa app. You may want to use router middleware if your app serves more than GraphiQL. import graphiql from 'koa-graphiql';
router.get('/graphiql', graphiql(async (ctx) => {
return {
// String of the base URL of the GraphQL endpoint
url: '/graphql',
// String to display in the query panel
query: 'query Demo($token: String) { viewer(token: $token) { id } }',
// Object used to populate the "variables" panel
variables: {
token: 'eyJhbGciOiJIUzI1NiJ9.YWNjb3VudFtpZGVd.-w3FiHaq5jIFIOzHErgdEQGvXXG6wClBUDFDVgwUyx8'
},
// Object to display in the result panel
result: {
data: {
viewer: { id: 'account[ide]' }
}
},
};
})); Typically, you will want to populate the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论