99designs / 99designs/gqlgen

Use embed for all graphql files sources

Abierto
#2,198 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
10.8k
Forks
1.3k
Merge medio
2 d 36 min
PR fusionados (30 d)
26

Descripción

@vikstrous Now that I have tried to solve https://github.com/99designs/gqlgen/issues/2196 by myself I have realized that you are only using embed for the first file in the list of possible graphql files of the config `schema` field.

Can you try adding another in your project (maybe even using the glob way) and check that it's not just me?

Like my one:

```yml
schema:
- schema/*.graphql
- ../../pkg/**/gqlgen/schema/*.graphql
```

Just as an example, this is an exceprt of the generated.go file after your improvement:

```go
var sources = []*ast.Source{
{Name: "schema/schema.graphql", Input: sourceData("schema/schema.graphql"), BuiltIn: false},
{Name: "../../pkg/player/gqlgen/schema/player.graphql", Input: `type Player {
id: ID!
createdAt: Time!
name: String!
age: Int!
}
`, BuiltIn: false},
// and so on many other sources here...
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.