99designs / 99designs/gqlgen

Alias support with gqlgen code

Aperta
#2,356 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
10.8k
Fork
1.3k
Merge medio
2g 36m
PR unite (30g)
26

Descrizione

### Discussed in https://github.com/99designs/gqlgen/discussions/2350

Originally posted by **chadgh** August 29, 2022
I'm new to Go and gqlgen, but I wanted to know if there was native support to be able to submit multiple queries in a single request using the alias features in graphql. https://graphql.org/learn/queries/#aliases

So if I've got a schema like the following:

```graphql
type Book {
tite: String!
author: [Author!]!
}

type Author {
name: String!
}
```

Could I define and submit a query like the following using what gqlgen provides? (Or how would I do the following using gqlgen? Is it even possible?)

```graphql
query ThreeFavoriteBooks {
one: book(id: 5) {
title
author {
name
}
}
two: book(id: 7) {
title
author {
name
}
}
three: book(id: 14) {
title
author {
name
}
}
}
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.