使用:TypeScript,Prisma,MySQL, GraphQLServer,ApolloClient,以这种方式构建模式:
const schema = makePrismaSchema({
// Provide all the GraphQL types we've implemented
types: [Query, Mutation, User, Post],...
接着:
const server = new GraphQLServer({
schema,
context: { prisma }
});
如何将其与与 SQL 无关的自定义解析器和类型结合起来?
(我也想通过 GQL 调用一些 REST 端点)