【发布时间】:2019-09-06 15:47:04
【问题描述】:
您好,我正在学习 GraphQL。在学习过程中,我发现在硬编码 .js 文件中创建 Schema 是个好主意,最好使用 .graphql 文件目录来编写字段等。
我安装了 babel-plugin-import-graphql 用于导入其他 .graphql 文件,但是当我运行服务器时,我总是收到 missing type Otp
.rootGraphql
#import Otp from "ac.graphql"
type Query {
Otp: Otp
}
.ac.graphql
type Otp {
mobilenumber(no: String!): String
}
【问题讨论】:
标签: graphql graphql-js