在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):SimonDegraeve/hapi-graphql开源软件地址(OpenSource Url):https://github.com/SimonDegraeve/hapi-graphql开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):GraphQL Hapi PluginCreate a GraphQL HTTP server with Hapi. Port from express-graphql. npm install --save hapi-graphql Exampleimport Hapi from 'hapi';
import GraphQL from 'hapi-graphql';
import {GraphQLSchema} from 'graphql';
const server = new Hapi.Server();
server.connection({
port: 3000
});
const TestSchema = new GraphQLSchema({});
server.register({
register: GraphQL,
options: {
query: {
# options, see below
},
// OR
//
// query: (request) => ({
// # options, see below
// }),
route: {
path: '/graphql',
config: {}
}
}
}, () =>
server.start(() =>
console.log('Server running at:', server.info.uri)
)
); OptionsThe
DebuggingDuring development, it's useful to get more information from errors, such as
stack traces. Providing a function to formatError: error => ({
message: error.message,
locations: error.locations,
stack: error.stack
}) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论