Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upGraphQL Go 笔记 #25
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
eyasliu commentedFeb 1, 2019
•
edited
用
github.com/graph-gophers/graphql-go
遇到一些坑框架选型
别人已经对比过了,很详细 https://medium.com/open-graphql/choosing-a-graphql-server-library-in-go-8836f893881b
简单的概括就是:
我要在 go module中单独文件定义schema,只有 gophers 符合
返回类型是否指针
这应该是 string 类型永远都会有值,默认值是
""
,但是指针类型可以为nil
,可判断为空Mutation 和 Query 不能分组
和
graphql-go
无关,是graphql 的 schema 本身就不支持 将 mutation 和 query 分成多个地方,如果 mutation 比较多的话,估计会比较难以管理,query 的根查询倒是问题不大,目前还没有发现什么好方案