graphql文件如下
// schema.graphql
type Query{
helloWorld: String!
}
想实现如下效果
import * as typeDefs from "src/schema/schema.graphql";
import { resolvers } from "src/schema/resolver";
const apolloServer = new ApolloServer({
typeDefs,
resolvers
})
可以的话如何配置?
感谢
暂时使用fs当text解析为字符串引入使用