99designs / 99designs/gqlgen

Use embed for all graphql files sources

未關閉
#2,198 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
10.8k
分支
1.3k
平均合併
2 天 36 分鐘
30 天內合併 PR
26

描述

@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...
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。