问题描述
环境
- apollo-server-express
- 打字稿
- nodejs
问题
import { gql } from 'apollo-server-express';
const typeDefs = gql`
type Result<T> {
success: bool
result: T?
message: String
}
type Query {
name: String!
}
type Mutation {
reset(team: Int?)
editName(name: String): String!
}
`
export default typeDefs;
我想将 Result 类型用于通用目的,例如 type Result<T>
这在 apollo graphql 中可能吗?
请检查!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)