js版
GraphQL在 NodeJS 服务端中使用最多
安装graphql-yoga:
npm install graphql-yoga
新建index.js:
const {GraphQLServer} = require("graphql-yoga")
const server = new GraphQLServer({
typeDefs: `
type Query {
hello(name:String):String!
}
`,
resolvers: {
Query: {

最低0.47元/天 解锁文章
22

被折叠的 条评论
为什么被折叠?



