支持擴展類型: gql, graphql
可以直接導入 graphql 文件到你的代碼中:
# schema.graphql
type Query {
hello: String
}
import schema from './schema.graphql'
現(xiàn)在schema 是一個新的 GraphQL 文檔
也可以使用導入:
# Foo.graphql
type Foo {
bar: String
}
# schema.graphql
# import "./Foo.graphql"
type Query {
foo: Foo
}
更多建議: