GraphQL ServerGraphQL 服务器
这是一个 GraphQL 服务器,支持 Express, Connect, Hapi 和 Koa
示例代码:
Express:
import express from 'express'; import bodyParser from 'body-parser'; import { graphqlExpress } from 'graphql-server-express'; const myGraphQLSchema = // ... define or import your schema here! const PORT = 3000; var app = express(); // bodyParser is needed just for POST. app.use('/graphql', bodyParser.json(), graphqlExpress({ schema: myGraphQLSchema })); app.listen(PORT);
Connect:
import connect from 'connect'; import bodyParser from 'body-parser'; import { graphqlConnect } from 'graphql-server-express'; import http from 'http'; const PORT = 3000; var app = connect(); // bodyParser is needed just for POST. app.use('/graphql', bodyParser.json()); app.use('/graphql', graphqlConnect({ schema: myGraphQLSchema })); http.createServer(app).listen(PORT);
Hapi:
import hapi from 'hapi'; import { graphqlHapi } from 'graphql-server-hapi'; const server = new hapi.Server(); const HOST = 'localhost'; const PORT = 3000; server.connection({ host: HOST, port: PORT, }); server.register({ register: graphqlHapi, options: { path: '/graphql', graphqlOptions: { schema: myGraphQLSchema, }, route: { cors: true } }, }); server.start((err) => { if (err) { throw err; } console.log(`Server running at: ${server.info.uri}`); });
评论
Hasura GraphQL EngineGraphQL 服务器
HasuraGraphQLEngine是一个超快的GraphQL服务器,可以让你基于Postgres数据库快速简历GraphQLAPI服务。通过数据库事件实现 webhooktriggers ,其 r
Hasura GraphQL EngineGraphQL 服务器
0
DGS FrameworkNetflix 开发的 GraphQL 服务器框架
DGS 框架(DomainGraphService)是一个用于SpringBoot的GraphQL服务器框架,由Netflix开发。DGS框架的主要功能包括:基于注释的SpringBoot编程模型用于
DGS FrameworkNetflix 开发的 GraphQL 服务器框架
0
DGS FrameworkNetflix 开发的 GraphQL 服务器框架
DGS 框架(Domain Graph Service) 是一个用于 Spring Boot 的 G
DGS FrameworkNetflix 开发的 GraphQL 服务器框架
0
GraphQL Tools快速开发 GraphQL
GraphQLTools是一套用于快速开发GraphQLSchemas的实用工具。GraphQLTools是一组NPM包和一个关于如何在JavaScript中构建GraphQL模式和解析器的结构,遵循
GraphQL Tools快速开发 GraphQL
0
GraphQL Tools快速开发 GraphQL
GraphQL Tools 是一套用于快速开发 GraphQL Schemas 的实用工具。Grap
GraphQL Tools快速开发 GraphQL
0
gqlgenGo 语言实现的基于 graphql 的服务器库
gqlgen是一个使用Go语言实现的用于快速创建严格类型的graphql服务器的库。dep ensure -add github.com/vektah/gqlgen示例代码定义schema sche
gqlgenGo 语言实现的基于 graphql 的服务器库
0
gqlgenGo 语言实现的基于 graphql 的服务器库
gqlgen 是一个使用 Go 语言实现的用于快速创建严格类型的 graphql 服务器的库。dep
gqlgenGo 语言实现的基于 graphql 的服务器库
0