99designs / 99designs/gqlgen

Update Gin example to include subscription support

Aberta
#1,410 1 comentário 2 reações 0 responsáveis Ver no GitHub
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

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.