99designs / 99designs/gqlgen

Alias support with gqlgen code

Open
#2,356 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

### 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
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.