Node.js 将primsa模式导入graphql模式

Node.js 将primsa模式导入graphql模式,node.js,typescript,graphql,apollo-server,prisma,Node.js,Typescript,Graphql,Apollo Server,Prisma,我正在更新一个从graphql瑜伽到apollo服务器的项目。我使用这一行#import*from./generated/prisma.graphql',在graphql下将primsa模式加载到graphql模式(schema.graphql)中,然后将prisma类型导入到模式中 然而,正是瑜伽在这样做,当从瑜伽升级时,这根本不会发生。我使用graphql导入(假设它导入了模式)成功地实现了这一点,但是由于它已被弃用,我无法将其用作解决方案 有人知道我如何使用graphql工具实现这一点吗?

我正在更新一个从graphql瑜伽到apollo服务器的项目。我使用这一行
#import*from./generated/prisma.graphql'
,在graphql下将primsa模式加载到graphql模式(schema.graphql)中,然后将prisma类型导入到模式中

然而,正是瑜伽在这样做,当从瑜伽升级时,这根本不会发生。我使用graphql导入(假设它导入了模式)成功地实现了这一点,但是由于它已被弃用,我无法将其用作解决方案

有人知道我如何使用graphql工具实现这一点吗?下面是我如何创建apollo服务器实例的

const sources = loadTypedefsSync(__dirname + '/schema.graphql', { loaders: [new GraphQLFileLoader()] })

const typeDefs = sources.map(source => source.document)

const schema = makeExecutableSchema({ typeDefs, ...resolvers })
const schemaWithMiddleware = applyMiddleware(schema, permissions)

const server = new ApolloServer({
    schema: schemaWithMiddleware,
    context: ({ req }) => ({
      ...req,
      db
    }),

  })

提前感谢

GraphQL导入的维护人员建议迁移到GraphQL工具。文档中的GraphQL工具提供了一个GraphQL导入示例的直接迁移