Upgrade to go 1.19 and update dependencies (#3069)

* Update to go 1.19
* Update dependencies
* Update cross-compile script
* Add missing targets to cross-compile-all
* Update cache action to remove warning
This commit is contained in:
WithoutPants
2022-11-04 13:41:26 +11:00
committed by GitHub
parent f25881a3bf
commit bba7c23957
939 changed files with 101336 additions and 43819 deletions

View File

@@ -9,6 +9,8 @@ import (
"github.com/99designs/gqlgen/codegen/config"
"github.com/vektah/gqlparser/v2/ast"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
type GoFieldType int
@@ -38,7 +40,7 @@ func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
if err != nil {
return nil, fmt.Errorf("%s: %w", typ.Name, err)
}
caser := cases.Title(language.English, cases.NoLower)
obj := &Object{
Definition: typ,
Root: b.Schema.Query == typ || b.Schema.Mutation == typ || b.Schema.Subscription == typ,
@@ -46,7 +48,7 @@ func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
Stream: typ == b.Schema.Subscription,
Directives: dirs,
ResolverInterface: types.NewNamed(
types.NewTypeName(0, b.Config.Exec.Pkg(), strings.Title(typ.Name)+"Resolver", nil),
types.NewTypeName(0, b.Config.Exec.Pkg(), caser.String(typ.Name)+"Resolver", nil),
nil,
nil,
),