Update Gin example to include subscription support
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
**Proposed documentation update**
The current [Gin example](https://gqlgen.com/recipes/gin/) only adds support for `POST` operations (`query`, `mutation`). The example should also include support for `subscription` by also binding to `GET`.
The updated example would look something like this:
```golang
func main() {
// Setting up Gin
r := gin.Default()
gqlHandler := graphqlHandler() // Reuse handler in GET and POST
r.GET("/query", gqlHandler) // Add GET support
r.POST("/query", gqlHandler)
r.GET("/", playgroundHandler())
r.Run()
}
```
I am happy to create a PR with the proposed change included in [gin.md](https://github.com/99designs/gqlgen/blob/master/docs/content/recipes/gin.md)
贡献指南
调研方向
需要更新的文件是 docs/content/recipes/gin.md。查看现有的 Gin 示例代码块,并按照 issue 中的内容添加 subscriptions 的 GET 路由。通过检查本地文档构建或预览来验证更改。PR 应只修改 Markdown 文件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100