You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4433 lines
130 KiB
Go
4433 lines
130 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package graph
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"embed"
|
|
"errors"
|
|
"fmt"
|
|
"strconv"
|
|
"sync"
|
|
"sync/atomic"
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
"github.com/99designs/gqlgen/plugin/federation/fedruntime"
|
|
"github.com/Dan6erbond/sitling/pets/graph/model"
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
)
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
// 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,
|
|
}
|
|
}
|
|
|
|
type Config struct {
|
|
Schema *ast.Schema
|
|
Resolvers ResolverRoot
|
|
Directives DirectiveRoot
|
|
Complexity ComplexityRoot
|
|
}
|
|
|
|
type ResolverRoot interface {
|
|
Entity() EntityResolver
|
|
Query() QueryResolver
|
|
}
|
|
|
|
type DirectiveRoot struct {
|
|
}
|
|
|
|
type ComplexityRoot struct {
|
|
Entity struct {
|
|
FindPetByID func(childComplexity int, id string) int
|
|
FindUserByID func(childComplexity int, id string) int
|
|
}
|
|
|
|
Pet struct {
|
|
ID func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
Query struct {
|
|
Pet func(childComplexity int, id string) int
|
|
__resolve__service func(childComplexity int) int
|
|
__resolve_entities func(childComplexity int, representations []map[string]interface{}) int
|
|
}
|
|
|
|
User struct {
|
|
ID func(childComplexity int) int
|
|
Pets func(childComplexity int) int
|
|
}
|
|
|
|
_Service struct {
|
|
SDL func(childComplexity int) int
|
|
}
|
|
}
|
|
|
|
type EntityResolver interface {
|
|
FindPetByID(ctx context.Context, id string) (*model.Pet, error)
|
|
FindUserByID(ctx context.Context, id string) (*model.User, error)
|
|
}
|
|
type QueryResolver interface {
|
|
Pet(ctx context.Context, id string) (*model.Pet, error)
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
ec := executionContext{nil, e, 0, 0, nil}
|
|
_ = ec
|
|
switch typeName + "." + field {
|
|
|
|
case "Entity.findPetByID":
|
|
if e.complexity.Entity.FindPetByID == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Entity_findPetByID_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Entity.FindPetByID(childComplexity, args["id"].(string)), true
|
|
|
|
case "Entity.findUserByID":
|
|
if e.complexity.Entity.FindUserByID == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Entity_findUserByID_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Entity.FindUserByID(childComplexity, args["id"].(string)), true
|
|
|
|
case "Pet.id":
|
|
if e.complexity.Pet.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Pet.ID(childComplexity), true
|
|
|
|
case "Pet.name":
|
|
if e.complexity.Pet.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Pet.Name(childComplexity), true
|
|
|
|
case "Query.pet":
|
|
if e.complexity.Query.Pet == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_pet_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Pet(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query._service":
|
|
if e.complexity.Query.__resolve__service == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.__resolve__service(childComplexity), true
|
|
|
|
case "Query._entities":
|
|
if e.complexity.Query.__resolve_entities == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query__entities_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.__resolve_entities(childComplexity, args["representations"].([]map[string]interface{})), true
|
|
|
|
case "User.id":
|
|
if e.complexity.User.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.ID(childComplexity), true
|
|
|
|
case "User.pets":
|
|
if e.complexity.User.Pets == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Pets(childComplexity), true
|
|
|
|
case "_Service.sdl":
|
|
if e.complexity._Service.SDL == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity._Service.SDL(childComplexity), true
|
|
|
|
}
|
|
return 0, false
|
|
}
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
rc := graphql.GetOperationContext(ctx)
|
|
ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)}
|
|
inputUnmarshalMap := graphql.BuildUnmarshalerMap()
|
|
first := true
|
|
|
|
switch rc.Operation.Operation {
|
|
case ast.Query:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
var response graphql.Response
|
|
var data graphql.Marshaler
|
|
if first {
|
|
first = false
|
|
ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
|
|
data = ec._Query(ctx, rc.Operation.SelectionSet)
|
|
} else {
|
|
if atomic.LoadInt32(&ec.pendingDeferred) > 0 {
|
|
result := <-ec.deferredResults
|
|
atomic.AddInt32(&ec.pendingDeferred, -1)
|
|
data = result.Result
|
|
response.Path = result.Path
|
|
response.Label = result.Label
|
|
response.Errors = result.Errors
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
response.Data = buf.Bytes()
|
|
if atomic.LoadInt32(&ec.deferred) > 0 {
|
|
hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0
|
|
response.HasNext = &hasNext
|
|
}
|
|
|
|
return &response
|
|
}
|
|
|
|
default:
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
}
|
|
}
|
|
|
|
type executionContext struct {
|
|
*graphql.OperationContext
|
|
*executableSchema
|
|
deferred int32
|
|
pendingDeferred int32
|
|
deferredResults chan graphql.DeferredResult
|
|
}
|
|
|
|
func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) {
|
|
atomic.AddInt32(&ec.pendingDeferred, 1)
|
|
go func() {
|
|
ctx := graphql.WithFreshResponseContext(dg.Context)
|
|
dg.FieldSet.Dispatch(ctx)
|
|
ds := graphql.DeferredResult{
|
|
Path: dg.Path,
|
|
Label: dg.Label,
|
|
Result: dg.FieldSet,
|
|
Errors: graphql.GetErrors(ctx),
|
|
}
|
|
// null fields should bubble up
|
|
if dg.FieldSet.Invalids > 0 {
|
|
ds.Result = graphql.Null
|
|
}
|
|
ec.deferredResults <- ds
|
|
}()
|
|
}
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
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(ec.Schema(), ec.Schema().Types[name]), nil
|
|
}
|
|
|
|
//go:embed "schema.graphqls"
|
|
var sourcesFS embed.FS
|
|
|
|
func sourceData(filename string) string {
|
|
data, err := sourcesFS.ReadFile(filename)
|
|
if err != nil {
|
|
panic(fmt.Sprintf("codegen problem: %s not available", filename))
|
|
}
|
|
return string(data)
|
|
}
|
|
|
|
var sources = []*ast.Source{
|
|
{Name: "schema.graphqls", Input: sourceData("schema.graphqls"), BuiltIn: false},
|
|
{Name: "../federation/directives.graphql", Input: `
|
|
directive @authenticated on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
|
|
directive @composeDirective(name: String!) repeatable on SCHEMA
|
|
directive @extends on OBJECT | INTERFACE
|
|
directive @external on OBJECT | FIELD_DEFINITION
|
|
directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
|
|
directive @inaccessible on
|
|
| ARGUMENT_DEFINITION
|
|
| ENUM
|
|
| ENUM_VALUE
|
|
| FIELD_DEFINITION
|
|
| INPUT_FIELD_DEFINITION
|
|
| INPUT_OBJECT
|
|
| INTERFACE
|
|
| OBJECT
|
|
| SCALAR
|
|
| UNION
|
|
directive @interfaceObject on OBJECT
|
|
directive @link(import: [String!], url: String!) repeatable on SCHEMA
|
|
directive @override(from: String!) on FIELD_DEFINITION
|
|
directive @provides(fields: FieldSet!) on FIELD_DEFINITION
|
|
directive @requires(fields: FieldSet!) on FIELD_DEFINITION
|
|
directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
|
|
| FIELD_DEFINITION
|
|
| OBJECT
|
|
| INTERFACE
|
|
| SCALAR
|
|
| ENUM
|
|
directive @shareable repeatable on FIELD_DEFINITION | OBJECT
|
|
directive @tag(name: String!) repeatable on
|
|
| ARGUMENT_DEFINITION
|
|
| ENUM
|
|
| ENUM_VALUE
|
|
| FIELD_DEFINITION
|
|
| INPUT_FIELD_DEFINITION
|
|
| INPUT_OBJECT
|
|
| INTERFACE
|
|
| OBJECT
|
|
| SCALAR
|
|
| UNION
|
|
scalar _Any
|
|
scalar FieldSet
|
|
scalar federation__Scope
|
|
`, BuiltIn: true},
|
|
{Name: "../federation/entity.graphql", Input: `
|
|
# a union of all types that use the @key directive
|
|
union _Entity = Pet | User
|
|
|
|
# fake type to build resolver interfaces for users to implement
|
|
type Entity {
|
|
findPetByID(id: ID!,): Pet!
|
|
findUserByID(id: ID!,): User!
|
|
|
|
}
|
|
|
|
type _Service {
|
|
sdl: String
|
|
}
|
|
|
|
extend type Query {
|
|
_entities(representations: [_Any!]!): [_Entity]!
|
|
_service: _Service!
|
|
}
|
|
`, BuiltIn: true},
|
|
}
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
func (ec *executionContext) field_Entity_findPetByID_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Entity_findUserByID_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query__entities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 []map[string]interface{}
|
|
if tmp, ok := rawArgs["representations"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("representations"))
|
|
arg0, err = ec.unmarshalN_Any2ᚕmapᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["representations"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_pet_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
func (ec *executionContext) _Entity_findPetByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Entity_findPetByID(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Entity().FindPetByID(rctx, fc.Args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Pet)
|
|
fc.Result = res
|
|
return ec.marshalNPet2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Entity_findPetByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Entity",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "id":
|
|
return ec.fieldContext_Pet_id(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext_Pet_name(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Entity_findPetByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Entity_findUserByID(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Entity_findUserByID(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Entity().FindUserByID(rctx, fc.Args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalNUser2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Entity_findUserByID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Entity",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "id":
|
|
return ec.fieldContext_User_id(ctx, field)
|
|
case "pets":
|
|
return ec.fieldContext_User_pets(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Entity_findUserByID_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Pet_id(ctx context.Context, field graphql.CollectedField, obj *model.Pet) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Pet_id(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Pet_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Pet",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type ID does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Pet_name(ctx context.Context, field graphql.CollectedField, obj *model.Pet) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Pet_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Pet_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Pet",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query_pet(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query_pet(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Pet(rctx, fc.Args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Pet)
|
|
fc.Result = res
|
|
return ec.marshalOPet2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query_pet(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "id":
|
|
return ec.fieldContext_Pet_id(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext_Pet_name(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query_pet_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query__entities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query__entities(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.__resolve_entities(ctx, fc.Args["representations"].([]map[string]interface{})), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]fedruntime.Entity)
|
|
fc.Result = res
|
|
return ec.marshalN_Entity2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query__entities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type _Entity does not have child fields")
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query__entities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query__service(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query__service(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.__resolve__service(ctx)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(fedruntime.Service)
|
|
fc.Result = res
|
|
return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "sdl":
|
|
return ec.fieldContext__Service_sdl(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type _Service", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectType(fc.Args["name"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_Query___schema(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectSchema()
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Schema)
|
|
fc.Result = res
|
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "description":
|
|
return ec.fieldContext___Schema_description(ctx, field)
|
|
case "types":
|
|
return ec.fieldContext___Schema_types(ctx, field)
|
|
case "queryType":
|
|
return ec.fieldContext___Schema_queryType(ctx, field)
|
|
case "mutationType":
|
|
return ec.fieldContext___Schema_mutationType(ctx, field)
|
|
case "subscriptionType":
|
|
return ec.fieldContext___Schema_subscriptionType(ctx, field)
|
|
case "directives":
|
|
return ec.fieldContext___Schema_directives(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_User_id(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type ID does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) _User_pets(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext_User_pets(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Pets, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Pet)
|
|
fc.Result = res
|
|
return ec.marshalNPet2ᚕᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPetᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext_User_pets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "id":
|
|
return ec.fieldContext_Pet_id(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext_Pet_name(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.CollectedField, obj *fedruntime.Service) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext__Service_sdl(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SDL, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "_Service",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_locations(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Locations, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]string)
|
|
fc.Result = res
|
|
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type __DirectiveLocation does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_args(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsRepeatable, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_args(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type Boolean does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_type(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DefaultValue, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_types(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Types(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_queryType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.QueryType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MutationType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SubscriptionType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Schema_directives(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Directives(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Directive)
|
|
fc.Result = res
|
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___Directive_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Directive_description(ctx, field)
|
|
case "locations":
|
|
return ec.fieldContext___Directive_locations(ctx, field)
|
|
case "args":
|
|
return ec.fieldContext___Directive_args(ctx, field)
|
|
case "isRepeatable":
|
|
return ec.fieldContext___Directive_isRepeatable(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_kind(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Kind(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type __TypeKind does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_name(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_description(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_fields(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Field)
|
|
fc.Result = res
|
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___Field_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Field_description(ctx, field)
|
|
case "args":
|
|
return ec.fieldContext___Field_args(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___Field_type(ctx, field)
|
|
case "isDeprecated":
|
|
return ec.fieldContext___Field_isDeprecated(ctx, field)
|
|
case "deprecationReason":
|
|
return ec.fieldContext___Field_deprecationReason(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_interfaces(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Interfaces(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PossibleTypes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_enumValues(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.EnumValue)
|
|
fc.Result = res
|
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___EnumValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___EnumValue_description(ctx, field)
|
|
case "isDeprecated":
|
|
return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
|
|
case "deprecationReason":
|
|
return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
|
|
},
|
|
}
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
err = ec.Recover(ctx, r)
|
|
ec.Error(ctx, err)
|
|
}
|
|
}()
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
|
ec.Error(ctx, err)
|
|
return fc, err
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_inputFields(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InputFields(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "name":
|
|
return ec.fieldContext___InputValue_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___InputValue_description(ctx, field)
|
|
case "type":
|
|
return ec.fieldContext___InputValue_type(ctx, field)
|
|
case "defaultValue":
|
|
return ec.fieldContext___InputValue_defaultValue(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_ofType(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OfType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
switch field.Name {
|
|
case "kind":
|
|
return ec.fieldContext___Type_kind(ctx, field)
|
|
case "name":
|
|
return ec.fieldContext___Type_name(ctx, field)
|
|
case "description":
|
|
return ec.fieldContext___Type_description(ctx, field)
|
|
case "fields":
|
|
return ec.fieldContext___Type_fields(ctx, field)
|
|
case "interfaces":
|
|
return ec.fieldContext___Type_interfaces(ctx, field)
|
|
case "possibleTypes":
|
|
return ec.fieldContext___Type_possibleTypes(ctx, field)
|
|
case "enumValues":
|
|
return ec.fieldContext___Type_enumValues(ctx, field)
|
|
case "inputFields":
|
|
return ec.fieldContext___Type_inputFields(ctx, field)
|
|
case "ofType":
|
|
return ec.fieldContext___Type_ofType(ctx, field)
|
|
case "specifiedByURL":
|
|
return ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
}
|
|
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
|
|
if err != nil {
|
|
return graphql.Null
|
|
}
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SpecifiedByURL(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
|
fc = &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
|
return nil, errors.New("field of type String does not have child fields")
|
|
},
|
|
}
|
|
return fc, nil
|
|
}
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
func (ec *executionContext) __Entity(ctx context.Context, sel ast.SelectionSet, obj fedruntime.Entity) graphql.Marshaler {
|
|
switch obj := (obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
case model.Pet:
|
|
return ec._Pet(ctx, sel, &obj)
|
|
case *model.Pet:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Pet(ctx, sel, obj)
|
|
case model.User:
|
|
return ec._User(ctx, sel, &obj)
|
|
case *model.User:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
var entityImplementors = []string{"Entity"}
|
|
|
|
func (ec *executionContext) _Entity(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, entityImplementors)
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Entity",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
|
Object: field.Name,
|
|
Field: field,
|
|
})
|
|
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Entity")
|
|
case "findPetByID":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Entity_findPetByID(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&fs.Invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
}
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
case "findUserByID":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Entity_findUserByID(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&fs.Invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
}
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var petImplementors = []string{"Pet", "_Entity"}
|
|
|
|
func (ec *executionContext) _Pet(ctx context.Context, sel ast.SelectionSet, obj *model.Pet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, petImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Pet")
|
|
case "id":
|
|
out.Values[i] = ec._Pet_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec._Pet_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var queryImplementors = []string{"Query"}
|
|
|
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Query",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
|
Object: field.Name,
|
|
Field: field,
|
|
})
|
|
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Query")
|
|
case "pet":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_pet(ctx, field)
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
}
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
case "_entities":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query__entities(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&fs.Invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
}
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
case "_service":
|
|
field := field
|
|
|
|
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query__service(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&fs.Invalids, 1)
|
|
}
|
|
return res
|
|
}
|
|
|
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
|
return ec.OperationContext.RootResolverMiddleware(ctx,
|
|
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
|
}
|
|
|
|
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
|
case "__type":
|
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
|
return ec._Query___type(ctx, field)
|
|
})
|
|
case "__schema":
|
|
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
|
return ec._Query___schema(ctx, field)
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var userImplementors = []string{"User", "_Entity"}
|
|
|
|
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("User")
|
|
case "id":
|
|
out.Values[i] = ec._User_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "pets":
|
|
out.Values[i] = ec._User_pets(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var _ServiceImplementors = []string{"_Service"}
|
|
|
|
func (ec *executionContext) __Service(ctx context.Context, sel ast.SelectionSet, obj *fedruntime.Service) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, _ServiceImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("_Service")
|
|
case "sdl":
|
|
out.Values[i] = ec.__Service_sdl(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __DirectiveImplementors = []string{"__Directive"}
|
|
|
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Directive")
|
|
case "name":
|
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
|
case "locations":
|
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "args":
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "isRepeatable":
|
|
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
|
|
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
|
case "name":
|
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __FieldImplementors = []string{"__Field"}
|
|
|
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Field")
|
|
case "name":
|
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
|
case "args":
|
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "type":
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __InputValueImplementors = []string{"__InputValue"}
|
|
|
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
|
case "name":
|
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
|
case "type":
|
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "defaultValue":
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __SchemaImplementors = []string{"__Schema"}
|
|
|
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
case "description":
|
|
out.Values[i] = ec.___Schema_description(ctx, field, obj)
|
|
case "types":
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "queryType":
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "mutationType":
|
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
|
case "subscriptionType":
|
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
|
case "directives":
|
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
var __TypeImplementors = []string{"__Type"}
|
|
|
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
deferred := make(map[string]*graphql.FieldSet)
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Type")
|
|
case "kind":
|
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
out.Invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
|
case "description":
|
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
|
case "fields":
|
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
|
case "interfaces":
|
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
|
case "possibleTypes":
|
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
|
case "enumValues":
|
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
|
case "inputFields":
|
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
|
case "ofType":
|
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
|
case "specifiedByURL":
|
|
out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch(ctx)
|
|
if out.Invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
|
|
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
|
|
|
for label, dfs := range deferred {
|
|
ec.processDeferredGroup(graphql.DeferredGroup{
|
|
Label: label,
|
|
Path: graphql.GetPath(ctx),
|
|
FieldSet: dfs,
|
|
Context: ctx,
|
|
})
|
|
}
|
|
|
|
return out
|
|
}
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNFieldSet2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNFieldSet2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalID(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalID(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPet2githubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx context.Context, sel ast.SelectionSet, v model.Pet) graphql.Marshaler {
|
|
return ec._Pet(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPet2ᚕᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPetᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Pet) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNPet2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPet2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx context.Context, sel ast.SelectionSet, v *model.Pet) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Pet(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2githubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler {
|
|
return ec._User(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN_Any2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
|
|
res, err := graphql.UnmarshalMap(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN_Any2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalMap(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN_Any2ᚕmapᚄ(ctx context.Context, v interface{}) ([]map[string]interface{}, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]map[string]interface{}, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN_Any2map(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN_Any2ᚕmapᚄ(ctx context.Context, sel ast.SelectionSet, v []map[string]interface{}) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalN_Any2map(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN_Entity2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx context.Context, sel ast.SelectionSet, v []fedruntime.Entity) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalO_Entity2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx context.Context, sel ast.SelectionSet, v fedruntime.Service) graphql.Marshaler {
|
|
return ec.__Service(ctx, sel, &v)
|
|
}
|
|
|
|
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ᚕ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
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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__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__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ᚕ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
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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ᚕ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
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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, "the requested element is null which the schema does not allow")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNfederation__Scope2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNfederation__Scope2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNfederation__Scope2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNfederation__Scope2string(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([][]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNfederation__Scope2ᚕstringᚄ(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNfederation__Scope2ᚕstringᚄ(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalBoolean(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPet2ᚖgithubᚗcomᚋDan6erbondᚋsitlingᚋpetsᚋgraphᚋmodelᚐPet(ctx context.Context, sel ast.SelectionSet, v *model.Pet) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Pet(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
vSlice = graphql.CoerceList(v)
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalString(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
res := graphql.MarshalString(*v)
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalO_Entity2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx context.Context, sel ast.SelectionSet, v fedruntime.Entity) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.__Entity(ctx, sel, v)
|
|
}
|
|
|
|
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
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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__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
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
// endregion ***************************** type.gotpl *****************************
|