我像这样加载我的 GraphQL 架构:
const schema = loadSchemaSync('./src/graphql/server/schema/*.gql', {
loaders: [new GraphQLFileLoader()],
})
这在本地工作正常,但是,在部署到 vercel 时出现错误:
Unable to find any GraphQL type definitions for the following pointers:
- ./src/graphql/server/schema/*.gql
我认为这是因为 vercel 在构建后删除了相关文件?