mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
chore: fix dependabot alerts (#1911)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
044ea85279
commit
ed775914df
@@ -23,6 +23,7 @@ import (
|
||||
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
||||
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
||||
return &executableSchema{
|
||||
schema: cfg.Schema,
|
||||
resolvers: cfg.Resolvers,
|
||||
directives: cfg.Directives,
|
||||
complexity: cfg.Complexity,
|
||||
@@ -30,6 +31,7 @@ func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Schema *ast.Schema
|
||||
Resolvers ResolverRoot
|
||||
Directives DirectiveRoot
|
||||
Complexity ComplexityRoot
|
||||
@@ -226,12 +228,16 @@ type QueryResolver interface {
|
||||
}
|
||||
|
||||
type executableSchema struct {
|
||||
schema *ast.Schema
|
||||
resolvers ResolverRoot
|
||||
directives DirectiveRoot
|
||||
complexity ComplexityRoot
|
||||
}
|
||||
|
||||
func (e *executableSchema) Schema() *ast.Schema {
|
||||
if e.schema != nil {
|
||||
return e.schema
|
||||
}
|
||||
return parsedSchema
|
||||
}
|
||||
|
||||
@@ -1119,14 +1125,14 @@ func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
||||
if ec.DisableIntrospection {
|
||||
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) {
|
||||
if ec.DisableIntrospection {
|
||||
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{
|
||||
|
||||
@@ -2,7 +2,7 @@ package search
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.38
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.39
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
Reference in New Issue
Block a user