From eb11340bcf2c44e4c1d589b48df0616b2bde887d Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 14 May 2020 10:45:58 -0400 Subject: [PATCH] API: move to upstream gqlgen My bugfixes were merged --- api/database/ql.go | 2 +- api/go.mod | 8 +-- api/go.sum | 10 ++++ api/gqlgen.yml | 14 ++--- api/graph/api/generated.go | 96 +++++++++++++++++------------------ api/graph/model/models_gen.go | 2 +- api/graph/resolver.go | 2 +- api/graph/schema.resolvers.go | 2 +- api/server.go | 4 +- 9 files changed, 75 insertions(+), 65 deletions(-) diff --git a/api/database/ql.go b/api/database/ql.go index 4ae6b2a..771633d 100644 --- a/api/database/ql.go +++ b/api/database/ql.go @@ -7,7 +7,7 @@ import ( "github.com/lib/pq" "github.com/vektah/gqlparser/v2/ast" - "git.sr.ht/~sircmpwn/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql" ) func collectFields(ctx context.Context) []graphql.CollectedField { diff --git a/api/go.mod b/api/go.mod index 0ee78c6..83b5d40 100644 --- a/api/go.mod +++ b/api/go.mod @@ -4,7 +4,7 @@ go 1.14 require ( git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3 - git.sr.ht/~sircmpwn/gqlgen v0.0.0-20200412134447-57d7234737d4 + github.com/99designs/gqlgen v0.11.4-0.20200512031635-40570d1b4d70 github.com/Masterminds/squirrel v1.2.0 github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/fernet/fernet-go v0.0.0-20191111064656-eff2850e6001 @@ -15,7 +15,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/lib/pq v1.3.0 github.com/matryer/moq v0.0.0-20200310130814-7721994d1b54 // indirect - github.com/mitchellh/mapstructure v1.2.2 // indirect + github.com/mitchellh/mapstructure v1.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/urfave/cli/v2 v2.2.0 // indirect github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec @@ -23,6 +23,6 @@ require ( github.com/vektah/gqlparser v1.3.1 github.com/vektah/gqlparser/v2 v2.0.1 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 - golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef // indirect - gopkg.in/yaml.v2 v2.2.8 // indirect + golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect ) diff --git a/api/go.sum b/api/go.sum index 05ee7b9..2b9f647 100644 --- a/api/go.sum +++ b/api/go.sum @@ -6,6 +6,10 @@ git.sr.ht/~sircmpwn/git.sr.ht v0.0.0-20200430231646-4014870a700b h1:xHyh0xixoMog git.sr.ht/~sircmpwn/git.sr.ht v0.0.0-20200511133609-1161d017dc00 h1:uHwXamWDLQX54bOBJcGub96xOX6ApQtQWJ83QmE39OM= git.sr.ht/~sircmpwn/gqlgen v0.0.0-20200412134447-57d7234737d4 h1:J/Sb88htNHzZaN6ZEF8BnRWj3LzYoTrOL4WRhZEEiQE= git.sr.ht/~sircmpwn/gqlgen v0.0.0-20200412134447-57d7234737d4/go.mod h1:W1cijL2EqAyL1eo1WAJ3ijNVkZM2okpYyCF5TRu1VfI= +github.com/99designs/gqlgen v0.11.3 h1:oFSxl1DFS9X///uHV3y6CEfpcXWrDUxVblR4Xib2bs4= +github.com/99designs/gqlgen v0.11.3/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= +github.com/99designs/gqlgen v0.11.4-0.20200512031635-40570d1b4d70 h1:bZj4qAWfwu0SFTx5QsEI+y7JTji7L7ndm6snyDEIVLs= +github.com/99designs/gqlgen v0.11.4-0.20200512031635-40570d1b4d70/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Masterminds/squirrel v1.2.0 h1:K1NhbTO21BWG47IVR0OnIZuE0LZcXAYqywrC3Ko53KI= github.com/Masterminds/squirrel v1.2.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA= @@ -85,6 +89,8 @@ github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047 h1:zCoDWFD5 github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.0 h1:iDwIio/3gk2QtLLEsqU5lInaMzos0hDTz8a6lazSFVw= +github.com/mitchellh/mapstructure v1.3.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -158,6 +164,8 @@ golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589 h1:rjUrONFu4kLchcZTfp3/96b golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef h1:RHORRhs540cYZYrzgU2CPUyykkwZM78hGdzocOo9P8A= golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97 h1:DAuln/hGp+aJiHpID1Y1hYzMEPP5WLwtZHPb50mN0OE= +golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -172,5 +180,7 @@ gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/api/gqlgen.yml b/api/gqlgen.yml index 52b15d0..968e2c9 100644 --- a/api/gqlgen.yml +++ b/api/gqlgen.yml @@ -45,15 +45,15 @@ autobind: models: ID: model: - - git.sr.ht/~sircmpwn/gqlgen/graphql.ID - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int64 - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int32 + - github.com/99designs/gqlgen/graphql.ID + - github.com/99designs/gqlgen/graphql.Int + - github.com/99designs/gqlgen/graphql.Int64 + - github.com/99designs/gqlgen/graphql.Int32 Int: model: - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int64 - - git.sr.ht/~sircmpwn/gqlgen/graphql.Int32 + - github.com/99designs/gqlgen/graphql.Int + - github.com/99designs/gqlgen/graphql.Int64 + - github.com/99designs/gqlgen/graphql.Int32 Cursor: model: - git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model.Cursor diff --git a/api/graph/api/generated.go b/api/graph/api/generated.go index be5e16e..37b2f2d 100644 --- a/api/graph/api/generated.go +++ b/api/graph/api/generated.go @@ -1,4 +1,4 @@ -// Code generated by git.sr.ht/~sircmpwn/gqlgen, DO NOT EDIT. +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. package api @@ -13,8 +13,8 @@ import ( "time" "git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model" - "git.sr.ht/~sircmpwn/gqlgen/graphql" - "git.sr.ht/~sircmpwn/gqlgen/graphql/introspection" + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -1210,7 +1210,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - &ast.Source{Name: "graph/schema.graphqls", Input: `scalar Cursor + {Name: "graph/schema.graphqls", Input: `scalar Cursor scalar Time scalar Upload @@ -1672,7 +1672,7 @@ func (ec *executionContext) field_Mutation_uploadArtifact_args(ctx context.Conte args["revspec"] = arg1 var arg2 graphql.Upload if tmp, ok := rawArgs["file"]; ok { - arg2, err = ec.unmarshalNUpload2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚐUpload(ctx, tmp) + arg2, err = ec.unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, tmp) if err != nil { return nil, err } @@ -3592,7 +3592,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { @@ -3623,7 +3623,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C } res := resTmp.(*introspection.Schema) fc.Result = res - return ec.marshalO__Schema2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } func (ec *executionContext) _Reference_name(ctx context.Context, field graphql.CollectedField, obj *model.Reference) (ret graphql.Marshaler) { @@ -5950,7 +5950,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql } res := resTmp.([]introspection.InputValue) fc.Result = res - return ec.marshalN__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { @@ -6179,7 +6179,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col } res := resTmp.([]introspection.InputValue) fc.Result = res - return ec.marshalN__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6213,7 +6213,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalN__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { @@ -6377,7 +6377,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalN__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { @@ -6442,7 +6442,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C } res := resTmp.([]introspection.Type) fc.Result = res - return ec.marshalN__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6476,7 +6476,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalN__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6507,7 +6507,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6538,7 +6538,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { @@ -6572,7 +6572,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap } res := resTmp.([]introspection.Directive) fc.Result = res - return ec.marshalN__Directive2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6706,7 +6706,7 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co } res := resTmp.([]introspection.Field) fc.Result = res - return ec.marshalO__Field2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6737,7 +6737,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq } res := resTmp.([]introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6768,7 +6768,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra } res := resTmp.([]introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6806,7 +6806,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq } res := resTmp.([]introspection.EnumValue) fc.Result = res - return ec.marshalO__EnumValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6837,7 +6837,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph } res := resTmp.([]introspection.InputValue) fc.Result = res - return ec.marshalO__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { @@ -6868,7 +6868,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co } res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalO__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } // endregion **************************** field.gotpl ***************************** @@ -8889,11 +8889,11 @@ func (ec *executionContext) marshalNTreeEntryCursor2ᚖgitᚗsrᚗhtᚋאsircmpw return ec._TreeEntryCursor(ctx, sel, v) } -func (ec *executionContext) unmarshalNUpload2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (graphql.Upload, error) { +func (ec *executionContext) unmarshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (graphql.Upload, error) { return graphql.UnmarshalUpload(v) } -func (ec *executionContext) marshalNUpload2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler { +func (ec *executionContext) marshalNUpload2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v graphql.Upload) graphql.Marshaler { res := graphql.MarshalUpload(v) if res == graphql.Null { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -8940,11 +8940,11 @@ func (ec *executionContext) marshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋgit return v } -func (ec *executionContext) marshalN__Directive2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { return ec.___Directive(ctx, sel, &v) } -func (ec *executionContext) marshalN__Directive2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -8968,7 +8968,7 @@ func (ec *executionContext) marshalN__Directive2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__Directive2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9052,19 +9052,19 @@ func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context return ret } -func (ec *executionContext) marshalN__EnumValue2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { return ec.___EnumValue(ctx, sel, &v) } -func (ec *executionContext) marshalN__Field2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { return ec.___Field(ctx, sel, &v) } -func (ec *executionContext) marshalN__InputValue2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { return ec.___InputValue(ctx, sel, &v) } -func (ec *executionContext) marshalN__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9088,7 +9088,7 @@ func (ec *executionContext) marshalN__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwn if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__InputValue2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9101,11 +9101,11 @@ func (ec *executionContext) marshalN__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwn return ret } -func (ec *executionContext) marshalN__Type2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { return ec.___Type(ctx, sel, &v) } -func (ec *executionContext) marshalN__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -9129,7 +9129,7 @@ func (ec *executionContext) marshalN__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlge if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__Type2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9142,7 +9142,7 @@ func (ec *executionContext) marshalN__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlge return ret } -func (ec *executionContext) marshalN__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "must not be null") @@ -9470,7 +9470,7 @@ func (ec *executionContext) marshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋg return v } -func (ec *executionContext) marshalO__EnumValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9497,7 +9497,7 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__EnumValue2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9510,7 +9510,7 @@ func (ec *executionContext) marshalO__EnumValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋ return ret } -func (ec *executionContext) marshalO__Field2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9537,7 +9537,7 @@ func (ec *executionContext) marshalO__Field2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlg if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__Field2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9550,7 +9550,7 @@ func (ec *executionContext) marshalO__Field2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlg return ret } -func (ec *executionContext) marshalO__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9577,7 +9577,7 @@ func (ec *executionContext) marshalO__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwn if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__InputValue2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9590,22 +9590,22 @@ func (ec *executionContext) marshalO__InputValue2ᚕgitᚗsrᚗhtᚋאsircmpwn return ret } -func (ec *executionContext) marshalO__Schema2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler { +func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler { return ec.___Schema(ctx, sel, &v) } -func (ec *executionContext) marshalO__Schema2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { if v == nil { return graphql.Null } return ec.___Schema(ctx, sel, v) } -func (ec *executionContext) marshalO__Type2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalO__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { return ec.___Type(ctx, sel, &v) } -func (ec *executionContext) marshalO__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null } @@ -9632,7 +9632,7 @@ func (ec *executionContext) marshalO__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlge if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__Type2gitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) } if isLen1 { f(i) @@ -9645,7 +9645,7 @@ func (ec *executionContext) marshalO__Type2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋgqlge return ret } -func (ec *executionContext) marshalO__Type2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/api/graph/model/models_gen.go b/api/graph/model/models_gen.go index 943d0d5..e6524e8 100644 --- a/api/graph/model/models_gen.go +++ b/api/graph/model/models_gen.go @@ -1,4 +1,4 @@ -// Code generated by git.sr.ht/~sircmpwn/gqlgen, DO NOT EDIT. +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. package model diff --git a/api/graph/resolver.go b/api/graph/resolver.go index 122730c..a975f3f 100644 --- a/api/graph/resolver.go +++ b/api/graph/resolver.go @@ -1,6 +1,6 @@ package graph -//go:generate go run git.sr.ht/~sircmpwn/gqlgen +//go:generate go run github.com/99designs/gqlgen import ( "database/sql" diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go index 88f6e50..f68f7b1 100644 --- a/api/graph/schema.resolvers.go +++ b/api/graph/schema.resolvers.go @@ -14,7 +14,7 @@ import ( "git.sr.ht/~sircmpwn/git.sr.ht/api/graph/api" "git.sr.ht/~sircmpwn/git.sr.ht/api/graph/model" "git.sr.ht/~sircmpwn/git.sr.ht/api/loaders" - "git.sr.ht/~sircmpwn/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql" git "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" diff --git a/api/server.go b/api/server.go index 300b702..e01fd3a 100644 --- a/api/server.go +++ b/api/server.go @@ -9,8 +9,8 @@ import ( "time" "git.sr.ht/~sircmpwn/getopt" - "git.sr.ht/~sircmpwn/gqlgen/handler" - "git.sr.ht/~sircmpwn/gqlgen/graphql/playground" + "github.com/99designs/gqlgen/handler" + "github.com/99designs/gqlgen/graphql/playground" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" _ "github.com/lib/pq" -- 2.38.4