summaryrefslogtreecommitdiffstatshomepage
path: root/api/graphql/graph/root_.generated.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/graphql/graph/root_.generated.go')
-rw-r--r--api/graphql/graph/root_.generated.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/api/graphql/graph/root_.generated.go b/api/graphql/graph/root_.generated.go
index db7dc82b4..37789d5cf 100644
--- a/api/graphql/graph/root_.generated.go
+++ b/api/graphql/graph/root_.generated.go
@@ -18,6 +18,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,
@@ -25,6 +26,7 @@ func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
}
type Config struct {
+ Schema *ast.Schema
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
@@ -372,12 +374,16 @@ type ComplexityRoot struct {
}
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
}
@@ -1877,14 +1883,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{