Update Gin example to include subscription support
- Linguagem predominante
- Go
- Estrelas
- 10.8k
- Forks
- 1.3k
- Merge médio
- 2d 36min
- PRs com merge (30d)
- 26
Descrição
**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)
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.