express测试和管理GraphQL功能(支持增删改查)
发布时间
阅读量:
阅读量
app.ts
import express, { Request, Response } from "express";
import { createHandler } from "graphql-http/lib/use/express";
import { buildSchema } from "graphql";
import { ruruHTML } from "ruru/server";
import cors from "cors";
import fs from "fs";
import path from "path";
// Int,Float,String,Boolean,ID
var schema = buildSchema(`
#复杂对象类型
type Article {
id: ID
title: String
content: String
}
18. #复杂对象类型
type User {
id: ID
name: String
全部评论 (0)
还没有任何评论哟~
