chore(deps): bump github.com/99designs/gqlgen from 0.17.38 to 0.17.39

Bumps [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) from 0.17.38 to 0.17.39.
- [Release notes](https://github.com/99designs/gqlgen/releases)
- [Changelog](https://github.com/99designs/gqlgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/99designs/gqlgen/compare/v0.17.38...v0.17.39)
This commit is contained in:
2023-10-06 06:24:54 +00:00
parent 3fd15e414e
commit 873aaec785
5 changed files with 39 additions and 28 deletions
+1 -1
View File
@@ -40,4 +40,4 @@ repos:
rev: v1.54.2 rev: v1.54.2
hooks: hooks:
- id: golangci-lint - id: golangci-lint
exclude: '^graph/generated/.*$|^graph/model/models_gen.go|^tools/.*$$' exclude: '^ctl/generated.go|graph/generated/.*$|^graph/model/models_gen.go|^tools/.*$$'
+24 -22
View File
@@ -43,6 +43,7 @@ type SubGraphsResponse struct {
func (v *SubGraphsResponse) GetSupergraph() SubGraphsSupergraph { return v.Supergraph } func (v *SubGraphsResponse) GetSupergraph() SubGraphsSupergraph { return v.Supergraph }
func (v *SubGraphsResponse) UnmarshalJSON(b []byte) error { func (v *SubGraphsResponse) UnmarshalJSON(b []byte) error {
if string(b) == "null" { if string(b) == "null" {
return nil return nil
} }
@@ -148,6 +149,7 @@ func __unmarshalSubGraphsSupergraph(b []byte, v *SubGraphsSupergraph) error {
} }
func __marshalSubGraphsSupergraph(v *SubGraphsSupergraph) ([]byte, error) { func __marshalSubGraphsSupergraph(v *SubGraphsSupergraph) ([]byte, error) {
var typename string var typename string
switch v := (*v).(type) { switch v := (*v).(type) {
case *SubGraphsSupergraphSubGraphs: case *SubGraphsSupergraphSubGraphs:
@@ -289,29 +291,29 @@ query SubGraphs ($ref: String!) {
` `
func SubGraphs( func SubGraphs(
ctx context.Context, ctx_ context.Context,
client graphql.Client, client_ graphql.Client,
ref string, ref string,
) (*SubGraphsResponse, error) { ) (*SubGraphsResponse, error) {
req := &graphql.Request{ req_ := &graphql.Request{
OpName: "SubGraphs", OpName: "SubGraphs",
Query: SubGraphs_Operation, Query: SubGraphs_Operation,
Variables: &__SubGraphsInput{ Variables: &__SubGraphsInput{
Ref: ref, Ref: ref,
}, },
} }
var err error var err_ error
var data SubGraphsResponse var data_ SubGraphsResponse
resp := &graphql.Response{Data: &data} resp_ := &graphql.Response{Data: &data_}
err = client.MakeRequest( err_ = client_.MakeRequest(
ctx, ctx_,
req, req_,
resp, resp_,
) )
return &data, err return &data_, err_
} }
// The query or mutation executed by UpdateSubGraph. // The query or mutation executed by UpdateSubGraph.
@@ -328,27 +330,27 @@ mutation UpdateSubGraph ($input: InputSubGraph!) {
` `
func UpdateSubGraph( func UpdateSubGraph(
ctx context.Context, ctx_ context.Context,
client graphql.Client, client_ graphql.Client,
input *InputSubGraph, input *InputSubGraph,
) (*UpdateSubGraphResponse, error) { ) (*UpdateSubGraphResponse, error) {
req := &graphql.Request{ req_ := &graphql.Request{
OpName: "UpdateSubGraph", OpName: "UpdateSubGraph",
Query: UpdateSubGraph_Operation, Query: UpdateSubGraph_Operation,
Variables: &__UpdateSubGraphInput{ Variables: &__UpdateSubGraphInput{
Input: input, Input: input,
}, },
} }
var err error var err_ error
var data UpdateSubGraphResponse var data_ UpdateSubGraphResponse
resp := &graphql.Response{Data: &data} resp_ := &graphql.Response{Data: &data_}
err = client.MakeRequest( err_ = client_.MakeRequest(
ctx, ctx_,
req, req_,
resp, resp_,
) )
return &data, err return &data_, err_
} }
+2 -1
View File
@@ -3,7 +3,7 @@ module gitlab.com/unboundsoftware/schemas
go 1.19 go 1.19
require ( require (
github.com/99designs/gqlgen v0.17.38 github.com/99designs/gqlgen v0.17.39
github.com/Khan/genqlient v0.6.0 github.com/Khan/genqlient v0.6.0
github.com/alecthomas/kong v0.8.0 github.com/alecthomas/kong v0.8.0
github.com/apex/log v1.9.0 github.com/apex/log v1.9.0
@@ -40,6 +40,7 @@ require (
github.com/rabbitmq/amqp091-go v1.9.0 // indirect github.com/rabbitmq/amqp091-go v1.9.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.0 // indirect
github.com/sosodev/duration v1.1.0 // indirect
github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/gjson v1.14.3 // indirect
github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect
+4 -2
View File
@@ -1,5 +1,5 @@
github.com/99designs/gqlgen v0.17.38 h1:3r7G7i8UAdY0iYreNiBAA55auVsrowO0+ZhMl5g4GYU= github.com/99designs/gqlgen v0.17.39 h1:wPTAyc2fqVjAWT5DsJ21k/lLudgnXzURwbsjVNegFpU=
github.com/99designs/gqlgen v0.17.38/go.mod h1:2v+dKtpI8mIzYeW9dYN8mO69tMmjszW2xKLNcWR/5wQ= github.com/99designs/gqlgen v0.17.39/go.mod h1:b62q1USk82GYIVjC60h02YguAZLqYZtvWml8KkhJps4=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk=
@@ -120,6 +120,8 @@ github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=
github.com/sosodev/duration v1.1.0 h1:kQcaiGbJaIsRqgQy7VGlZrVw1giWO+lDoX3MCPnpVO4=
github.com/sosodev/duration v1.1.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
github.com/sparetimecoders/goamqp v0.1.3/go.mod h1:BKUl32yHsxpKEZEn7oEgyKB8Y0C4dk5n+17FModO6iM= github.com/sparetimecoders/goamqp v0.1.3/go.mod h1:BKUl32yHsxpKEZEn7oEgyKB8Y0C4dk5n+17FModO6iM=
github.com/sparetimecoders/goamqp v0.2.0 h1:S1oJ2NUJxoTBSfRx5BsKb1eKRaNninm301neym5bzrs= github.com/sparetimecoders/goamqp v0.2.0 h1:S1oJ2NUJxoTBSfRx5BsKb1eKRaNninm301neym5bzrs=
github.com/sparetimecoders/goamqp v0.2.0/go.mod h1:TWWNPccknku8b6xA8nLb76ll882zQw6TXzophis3+2k= github.com/sparetimecoders/goamqp v0.2.0/go.mod h1:TWWNPccknku8b6xA8nLb76ll882zQw6TXzophis3+2k=
+8 -2
View File
@@ -24,6 +24,7 @@ import (
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
return &executableSchema{ return &executableSchema{
schema: cfg.Schema,
resolvers: cfg.Resolvers, resolvers: cfg.Resolvers,
directives: cfg.Directives, directives: cfg.Directives,
complexity: cfg.Complexity, complexity: cfg.Complexity,
@@ -31,6 +32,7 @@ func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
} }
type Config struct { type Config struct {
Schema *ast.Schema
Resolvers ResolverRoot Resolvers ResolverRoot
Directives DirectiveRoot Directives DirectiveRoot
Complexity ComplexityRoot Complexity ComplexityRoot
@@ -111,12 +113,16 @@ type QueryResolver interface {
} }
type executableSchema struct { type executableSchema struct {
schema *ast.Schema
resolvers ResolverRoot resolvers ResolverRoot
directives DirectiveRoot directives DirectiveRoot
complexity ComplexityRoot complexity ComplexityRoot
} }
func (e *executableSchema) Schema() *ast.Schema { func (e *executableSchema) Schema() *ast.Schema {
if e.schema != nil {
return e.schema
}
return parsedSchema return parsedSchema
} }
@@ -444,14 +450,14 @@ func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
if ec.DisableIntrospection { if ec.DisableIntrospection {
return nil, errors.New("introspection disabled") return nil, errors.New("introspection disabled")
} }
return introspection.WrapSchema(parsedSchema), nil return introspection.WrapSchema(ec.Schema()), nil
} }
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
if ec.DisableIntrospection { if ec.DisableIntrospection {
return nil, errors.New("introspection disabled") return nil, errors.New("introspection disabled")
} }
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil
} }
var sources = []*ast.Source{ var sources = []*ast.Source{