2021-07-08 12:15:19 +00:00
|
|
|
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
|
|
|
|
package generated
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"context"
|
|
|
|
"errors"
|
2021-07-12 18:22:16 +00:00
|
|
|
"fmt"
|
2021-07-08 12:15:19 +00:00
|
|
|
"strconv"
|
|
|
|
"sync"
|
|
|
|
"sync/atomic"
|
|
|
|
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
|
|
"github.com/yauthdev/yauth/server/graph/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
|
|
|
|
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
|
|
|
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
|
|
|
return &executableSchema{
|
|
|
|
resolvers: cfg.Resolvers,
|
|
|
|
directives: cfg.Directives,
|
|
|
|
complexity: cfg.Complexity,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
Resolvers ResolverRoot
|
|
|
|
Directives DirectiveRoot
|
|
|
|
Complexity ComplexityRoot
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResolverRoot interface {
|
|
|
|
Mutation() MutationResolver
|
|
|
|
Query() QueryResolver
|
|
|
|
}
|
|
|
|
|
|
|
|
type DirectiveRoot struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type ComplexityRoot struct {
|
2021-07-12 18:22:16 +00:00
|
|
|
BasicAuthLoginResponse struct {
|
|
|
|
Errors func(childComplexity int) int
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
RefreshToken func(childComplexity int) int
|
|
|
|
StatusCode func(childComplexity int) int
|
|
|
|
Success func(childComplexity int) int
|
|
|
|
User func(childComplexity int) int
|
|
|
|
}
|
|
|
|
|
|
|
|
BasicAuthSignupResponse struct {
|
|
|
|
Errors func(childComplexity int) int
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
StatusCode func(childComplexity int) int
|
|
|
|
Success func(childComplexity int) int
|
|
|
|
User func(childComplexity int) int
|
|
|
|
}
|
|
|
|
|
|
|
|
Error struct {
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
Reason func(childComplexity int) int
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
Mutation struct {
|
2021-07-12 18:22:16 +00:00
|
|
|
BasicAuthLogin func(childComplexity int, params model.BasicAuthLoginInput) int
|
|
|
|
BasicAuthSignUp func(childComplexity int, params model.BasicAuthSignupInput) int
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Query struct {
|
2021-07-12 18:22:16 +00:00
|
|
|
Users func(childComplexity int) int
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
User struct {
|
|
|
|
CreatedAt func(childComplexity int) int
|
|
|
|
Email func(childComplexity int) int
|
|
|
|
EmailVerifiedAt func(childComplexity int) int
|
|
|
|
FirstName func(childComplexity int) int
|
|
|
|
ID func(childComplexity int) int
|
|
|
|
Image func(childComplexity int) int
|
|
|
|
LastName func(childComplexity int) int
|
|
|
|
Password func(childComplexity int) int
|
|
|
|
SignUpMethod func(childComplexity int) int
|
|
|
|
UpdatedAt func(childComplexity int) int
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
VerificationRequest struct {
|
|
|
|
CreatedAt func(childComplexity int) int
|
|
|
|
Email func(childComplexity int) int
|
|
|
|
Expires func(childComplexity int) int
|
|
|
|
ID func(childComplexity int) int
|
|
|
|
Identifier func(childComplexity int) int
|
|
|
|
Token func(childComplexity int) int
|
|
|
|
UpdatedAt func(childComplexity int) int
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type MutationResolver interface {
|
2021-07-12 18:22:16 +00:00
|
|
|
BasicAuthSignUp(ctx context.Context, params model.BasicAuthSignupInput) (*model.BasicAuthSignupResponse, error)
|
|
|
|
BasicAuthLogin(ctx context.Context, params model.BasicAuthLoginInput) (*model.BasicAuthLoginResponse, error)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
type QueryResolver interface {
|
2021-07-12 18:22:16 +00:00
|
|
|
Users(ctx context.Context) ([]*model.User, error)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type executableSchema struct {
|
|
|
|
resolvers ResolverRoot
|
|
|
|
directives DirectiveRoot
|
|
|
|
complexity ComplexityRoot
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *executableSchema) Schema() *ast.Schema {
|
|
|
|
return parsedSchema
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
|
|
ec := executionContext{nil, e}
|
|
|
|
_ = ec
|
|
|
|
switch typeName + "." + field {
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "BasicAuthLoginResponse.errors":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.Errors == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.Errors(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthLoginResponse.message":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.Message == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.Message(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthLoginResponse.refreshToken":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.RefreshToken == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.RefreshToken(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthLoginResponse.statusCode":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.StatusCode == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.StatusCode(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthLoginResponse.success":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.Success == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.Success(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthLoginResponse.user":
|
|
|
|
if e.complexity.BasicAuthLoginResponse.User == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthLoginResponse.User(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthSignupResponse.errors":
|
|
|
|
if e.complexity.BasicAuthSignupResponse.Errors == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthSignupResponse.Errors(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthSignupResponse.message":
|
|
|
|
if e.complexity.BasicAuthSignupResponse.Message == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthSignupResponse.Message(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthSignupResponse.statusCode":
|
|
|
|
if e.complexity.BasicAuthSignupResponse.StatusCode == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthSignupResponse.StatusCode(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthSignupResponse.success":
|
|
|
|
if e.complexity.BasicAuthSignupResponse.Success == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthSignupResponse.Success(childComplexity), true
|
|
|
|
|
|
|
|
case "BasicAuthSignupResponse.user":
|
|
|
|
if e.complexity.BasicAuthSignupResponse.User == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.BasicAuthSignupResponse.User(childComplexity), true
|
|
|
|
|
|
|
|
case "Error.message":
|
|
|
|
if e.complexity.Error.Message == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.Error.Message(childComplexity), true
|
|
|
|
|
|
|
|
case "Error.reason":
|
|
|
|
if e.complexity.Error.Reason == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.Error.Reason(childComplexity), true
|
|
|
|
|
|
|
|
case "Mutation.basicAuthLogin":
|
|
|
|
if e.complexity.Mutation.BasicAuthLogin == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
args, err := ec.field_Mutation_basicAuthLogin_args(context.TODO(), rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
return 0, false
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.Mutation.BasicAuthLogin(childComplexity, args["params"].(model.BasicAuthLoginInput)), true
|
|
|
|
|
|
|
|
case "Mutation.basicAuthSignUp":
|
|
|
|
if e.complexity.Mutation.BasicAuthSignUp == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
args, err := ec.field_Mutation_basicAuthSignUp_args(context.TODO(), rawArgs)
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, false
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.Mutation.BasicAuthSignUp(childComplexity, args["params"].(model.BasicAuthSignupInput)), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "Query.users":
|
|
|
|
if e.complexity.Query.Users == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.Query.Users(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "User.createdAt":
|
|
|
|
if e.complexity.User.CreatedAt == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.User.CreatedAt(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "User.email":
|
|
|
|
if e.complexity.User.Email == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.User.Email(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "User.emailVerifiedAt":
|
|
|
|
if e.complexity.User.EmailVerifiedAt == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.User.EmailVerifiedAt(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "User.firstName":
|
|
|
|
if e.complexity.User.FirstName == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.User.FirstName(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
|
|
|
case "User.id":
|
|
|
|
if e.complexity.User.ID == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.ID(childComplexity), true
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
case "User.image":
|
|
|
|
if e.complexity.User.Image == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.Image(childComplexity), true
|
|
|
|
|
|
|
|
case "User.lastName":
|
|
|
|
if e.complexity.User.LastName == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.LastName(childComplexity), true
|
|
|
|
|
|
|
|
case "User.password":
|
|
|
|
if e.complexity.User.Password == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.Password(childComplexity), true
|
|
|
|
|
|
|
|
case "User.SignUpMethod":
|
|
|
|
if e.complexity.User.SignUpMethod == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.SignUpMethod(childComplexity), true
|
|
|
|
|
|
|
|
case "User.updatedAt":
|
|
|
|
if e.complexity.User.UpdatedAt == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.User.UpdatedAt(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.createdAt":
|
|
|
|
if e.complexity.VerificationRequest.CreatedAt == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.CreatedAt(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.email":
|
|
|
|
if e.complexity.VerificationRequest.Email == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.Email(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.expires":
|
|
|
|
if e.complexity.VerificationRequest.Expires == nil {
|
2021-07-08 12:15:19 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
return e.complexity.VerificationRequest.Expires(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.id":
|
|
|
|
if e.complexity.VerificationRequest.ID == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.ID(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.identifier":
|
|
|
|
if e.complexity.VerificationRequest.Identifier == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.Identifier(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.token":
|
|
|
|
if e.complexity.VerificationRequest.Token == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.Token(childComplexity), true
|
|
|
|
|
|
|
|
case "VerificationRequest.updatedAt":
|
|
|
|
if e.complexity.VerificationRequest.UpdatedAt == nil {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.complexity.VerificationRequest.UpdatedAt(childComplexity), true
|
2021-07-08 12:15:19 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
return 0, false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
|
|
rc := graphql.GetOperationContext(ctx)
|
|
|
|
ec := executionContext{rc, e}
|
|
|
|
first := true
|
|
|
|
|
|
|
|
switch rc.Operation.Operation {
|
|
|
|
case ast.Query:
|
|
|
|
return func(ctx context.Context) *graphql.Response {
|
|
|
|
if !first {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
|
|
|
var buf bytes.Buffer
|
|
|
|
data.MarshalGQL(&buf)
|
|
|
|
|
|
|
|
return &graphql.Response{
|
|
|
|
Data: buf.Bytes(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case ast.Mutation:
|
|
|
|
return func(ctx context.Context) *graphql.Response {
|
|
|
|
if !first {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
first = false
|
|
|
|
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
|
|
|
|
var buf bytes.Buffer
|
|
|
|
data.MarshalGQL(&buf)
|
|
|
|
|
|
|
|
return &graphql.Response{
|
|
|
|
Data: buf.Bytes(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type executionContext struct {
|
|
|
|
*graphql.OperationContext
|
|
|
|
*executableSchema
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
|
|
if ec.DisableIntrospection {
|
|
|
|
return nil, errors.New("introspection disabled")
|
|
|
|
}
|
|
|
|
return introspection.WrapSchema(parsedSchema), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
|
|
|
if ec.DisableIntrospection {
|
|
|
|
return nil, errors.New("introspection disabled")
|
|
|
|
}
|
|
|
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var sources = []*ast.Source{
|
|
|
|
{Name: "graph/schema.graphqls", Input: `# GraphQL schema example
|
|
|
|
#
|
|
|
|
# https://gqlgen.com/getting-started/
|
2021-07-12 18:22:16 +00:00
|
|
|
scalar Int64
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
type User {
|
|
|
|
id: ID!
|
|
|
|
email: String!
|
|
|
|
SignUpMethod: String!
|
|
|
|
firstName: String
|
|
|
|
lastName: String
|
|
|
|
emailVerifiedAt: Int64
|
|
|
|
password: String
|
|
|
|
image: String
|
|
|
|
createdAt: Int64
|
|
|
|
updatedAt: Int64
|
|
|
|
}
|
|
|
|
|
|
|
|
type VerificationRequest {
|
2021-07-08 12:15:19 +00:00
|
|
|
id: ID!
|
2021-07-12 18:22:16 +00:00
|
|
|
identifier: String
|
|
|
|
token: String
|
|
|
|
email: String
|
|
|
|
expires: Int64
|
|
|
|
createdAt: Int64
|
|
|
|
updatedAt: Int64
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
type Error {
|
|
|
|
message: String!
|
|
|
|
reason: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Response {
|
|
|
|
success: Boolean!
|
|
|
|
message: String!
|
|
|
|
errors: [Error!]
|
|
|
|
statusCode: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
type BasicAuthLoginResponse implements Response {
|
|
|
|
success: Boolean!
|
|
|
|
message: String!
|
|
|
|
errors: [Error!]
|
|
|
|
statusCode: Int!
|
|
|
|
refreshToken: String
|
|
|
|
user: User
|
|
|
|
}
|
|
|
|
|
|
|
|
type BasicAuthSignupResponse implements Response {
|
|
|
|
success: Boolean!
|
|
|
|
message: String!
|
|
|
|
errors: [Error!]
|
|
|
|
statusCode: Int!
|
|
|
|
user: User
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
2021-07-12 18:22:16 +00:00
|
|
|
users: [User!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input BasicAuthSignupInput {
|
|
|
|
firstName: String
|
|
|
|
lastName: String
|
|
|
|
email: String!
|
|
|
|
password: String!
|
|
|
|
cofirmPassword: String!
|
|
|
|
image: String
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
input BasicAuthLoginInput {
|
|
|
|
email: String!
|
|
|
|
password: String!
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Mutation {
|
2021-07-12 18:22:16 +00:00
|
|
|
basicAuthSignUp(params: BasicAuthSignupInput!): BasicAuthSignupResponse!
|
|
|
|
basicAuthLogin(params: BasicAuthLoginInput!): BasicAuthLoginResponse!
|
|
|
|
}
|
|
|
|
`, BuiltIn: false},
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) field_Mutation_basicAuthLogin_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
|
|
var err error
|
|
|
|
args := map[string]interface{}{}
|
|
|
|
var arg0 model.BasicAuthLoginInput
|
|
|
|
if tmp, ok := rawArgs["params"]; ok {
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("params"))
|
|
|
|
arg0, err = ec.unmarshalNBasicAuthLoginInput2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthLoginInput(ctx, tmp)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
args["params"] = arg0
|
|
|
|
return args, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) field_Mutation_basicAuthSignUp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
2021-07-08 12:15:19 +00:00
|
|
|
var err error
|
|
|
|
args := map[string]interface{}{}
|
2021-07-12 18:22:16 +00:00
|
|
|
var arg0 model.BasicAuthSignupInput
|
|
|
|
if tmp, ok := rawArgs["params"]; ok {
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("params"))
|
|
|
|
arg0, err = ec.unmarshalNBasicAuthSignupInput2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthSignupInput(ctx, tmp)
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
args["params"] = arg0
|
2021-07-08 12:15:19 +00:00
|
|
|
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___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 *****************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse_success(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthLoginResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
2021-07-12 18:22:16 +00:00
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
2021-07-12 18:22:16 +00:00
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Success, nil
|
|
|
|
})
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
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) _BasicAuthLoginResponse_message(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "BasicAuthLoginResponse",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
2021-07-08 12:15:19 +00:00
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Message, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
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
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(string)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse_errors(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthLoginResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
2021-07-12 18:22:16 +00:00
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Errors, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.([]*model.Error)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalOError2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐErrorᚄ(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse_statusCode(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthLoginResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
2021-07-12 18:22:16 +00:00
|
|
|
IsMethod: false,
|
2021-07-08 12:15:19 +00:00
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
2021-07-12 18:22:16 +00:00
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.StatusCode, nil
|
|
|
|
})
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
if resTmp == nil {
|
|
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
}
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(int)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse_refreshToken(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "BasicAuthLoginResponse",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
2021-07-08 12:15:19 +00:00
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.RefreshToken, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(*string)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse_user(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthLoginResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthLoginResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
2021-07-12 18:22:16 +00:00
|
|
|
IsMethod: false,
|
2021-07-08 12:15:19 +00:00
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.User, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(*model.User)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalOUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse_success(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthSignupResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthSignupResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Success, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
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
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(bool)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse_message(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthSignupResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthSignupResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Message, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse_errors(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthSignupResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthSignupResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Errors, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.([]*model.Error)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalOError2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐErrorᚄ(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse_statusCode(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthSignupResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthSignupResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.StatusCode, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
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
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(int)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse_user(ctx context.Context, field graphql.CollectedField, obj *model.BasicAuthSignupResponse) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "BasicAuthSignupResponse",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.User, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
res := resTmp.(*model.User)
|
2021-07-08 12:15:19 +00:00
|
|
|
fc.Result = res
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalOUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _Error_message(ctx context.Context, field graphql.CollectedField, obj *model.Error) (ret graphql.Marshaler) {
|
2021-07-08 12:15:19 +00:00
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
2021-07-12 18:22:16 +00:00
|
|
|
Object: "Error",
|
2021-07-08 12:15:19 +00:00
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
2021-07-12 18:22:16 +00:00
|
|
|
return obj.Message, nil
|
2021-07-08 12:15:19 +00:00
|
|
|
})
|
|
|
|
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
|
2021-07-12 18:22:16 +00:00
|
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Error_reason(ctx context.Context, field graphql.CollectedField, obj *model.Error) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Error",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Reason, 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) _Mutation_basicAuthSignUp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Mutation",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
|
args, err := ec.field_Mutation_basicAuthSignUp_args(ctx, rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
fc.Args = args
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return ec.resolvers.Mutation().BasicAuthSignUp(rctx, args["params"].(model.BasicAuthSignupInput))
|
|
|
|
})
|
|
|
|
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.BasicAuthSignupResponse)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalNBasicAuthSignupResponse2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthSignupResponse(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Mutation_basicAuthLogin(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Mutation",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
|
args, err := ec.field_Mutation_basicAuthLogin_args(ctx, rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
fc.Args = args
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return ec.resolvers.Mutation().BasicAuthLogin(rctx, args["params"].(model.BasicAuthLoginInput))
|
|
|
|
})
|
|
|
|
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.BasicAuthLoginResponse)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalNBasicAuthLoginResponse2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthLoginResponse(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Query",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: true,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return ec.resolvers.Query().Users(rctx)
|
|
|
|
})
|
|
|
|
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ᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUserᚄ(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Query",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
|
args, err := ec.field_Query___type_args(ctx, rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
fc.Args = args
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return ec.introspectType(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) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "Query",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) _User_email(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Email, 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) _User_SignUpMethod(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.SignUpMethod, 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) _User_firstName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.FirstName, 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) _User_lastName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.LastName, 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) _User_emailVerifiedAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.EmailVerifiedAt, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _User_password(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Password, 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) _User_image(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Image, 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) _User_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.CreatedAt, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _User_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "User",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.UpdatedAt, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _VerificationRequest_id(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) _VerificationRequest_identifier(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Identifier, 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) _VerificationRequest_token(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Token, 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) _VerificationRequest_email(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Email, 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) _VerificationRequest_expires(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Expires, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _VerificationRequest_createdAt(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.CreatedAt, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) _VerificationRequest_updatedAt(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "VerificationRequest",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.UpdatedAt, nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
if resTmp == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
res := resTmp.(*int64)
|
|
|
|
fc.Result = res
|
|
|
|
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Directive",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Directive",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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.marshalOString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Directive",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Directive",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__EnumValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__EnumValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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.marshalOString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__EnumValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__EnumValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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.marshalOString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Field",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__InputValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__InputValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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.marshalOString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__InputValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__InputValue",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: false,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Schema",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Schema",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Schema",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Schema",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Schema",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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.marshalOString2string(ctx, field.Selections, res)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
|
args, err := ec.field___Type_fields_args(ctx, rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
fc.Args = args
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.Fields(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) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
|
|
args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
|
|
|
|
if err != nil {
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
fc.Args = args
|
|
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
|
|
ctx = rctx // use context from middleware stack in children
|
|
|
|
return obj.EnumValues(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) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
ret = graphql.Null
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
Object: "__Type",
|
|
|
|
Field: field,
|
|
|
|
Args: nil,
|
|
|
|
IsMethod: true,
|
|
|
|
IsResolver: false,
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) unmarshalInputBasicAuthLoginInput(ctx context.Context, obj interface{}) (model.BasicAuthLoginInput, error) {
|
|
|
|
var it model.BasicAuthLoginInput
|
|
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
|
|
|
|
for k, v := range asMap {
|
|
|
|
switch k {
|
|
|
|
case "email":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
|
|
|
|
it.Email, err = ec.unmarshalNString2string(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
case "password":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
|
|
|
|
it.Password, err = ec.unmarshalNString2string(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return it, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalInputBasicAuthSignupInput(ctx context.Context, obj interface{}) (model.BasicAuthSignupInput, error) {
|
|
|
|
var it model.BasicAuthSignupInput
|
2021-07-08 12:15:19 +00:00
|
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
|
|
|
|
for k, v := range asMap {
|
|
|
|
switch k {
|
2021-07-12 18:22:16 +00:00
|
|
|
case "firstName":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstName"))
|
|
|
|
it.FirstName, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
case "lastName":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("lastName"))
|
|
|
|
it.LastName, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
case "email":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("email"))
|
|
|
|
it.Email, err = ec.unmarshalNString2string(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
case "password":
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("password"))
|
|
|
|
it.Password, err = ec.unmarshalNString2string(ctx, v)
|
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
case "cofirmPassword":
|
2021-07-08 12:15:19 +00:00
|
|
|
var err error
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cofirmPassword"))
|
|
|
|
it.CofirmPassword, err = ec.unmarshalNString2string(ctx, v)
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
case "image":
|
2021-07-08 12:15:19 +00:00
|
|
|
var err error
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image"))
|
|
|
|
it.Image, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
2021-07-08 12:15:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return it, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return it, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _Response(ctx context.Context, sel ast.SelectionSet, obj model.Response) graphql.Marshaler {
|
|
|
|
switch obj := (obj).(type) {
|
|
|
|
case nil:
|
|
|
|
return graphql.Null
|
|
|
|
case model.BasicAuthLoginResponse:
|
|
|
|
return ec._BasicAuthLoginResponse(ctx, sel, &obj)
|
|
|
|
case *model.BasicAuthLoginResponse:
|
|
|
|
if obj == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._BasicAuthLoginResponse(ctx, sel, obj)
|
|
|
|
case model.BasicAuthSignupResponse:
|
|
|
|
return ec._BasicAuthSignupResponse(ctx, sel, &obj)
|
|
|
|
case *model.BasicAuthSignupResponse:
|
|
|
|
if obj == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._BasicAuthSignupResponse(ctx, sel, obj)
|
|
|
|
default:
|
|
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
var basicAuthLoginResponseImplementors = []string{"BasicAuthLoginResponse", "Response"}
|
|
|
|
|
|
|
|
func (ec *executionContext) _BasicAuthLoginResponse(ctx context.Context, sel ast.SelectionSet, obj *model.BasicAuthLoginResponse) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, basicAuthLoginResponseImplementors)
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("BasicAuthLoginResponse")
|
|
|
|
case "success":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_success(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "message":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_message(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "errors":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_errors(ctx, field, obj)
|
|
|
|
case "statusCode":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_statusCode(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "refreshToken":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_refreshToken(ctx, field, obj)
|
|
|
|
case "user":
|
|
|
|
out.Values[i] = ec._BasicAuthLoginResponse_user(ctx, field, obj)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
var basicAuthSignupResponseImplementors = []string{"BasicAuthSignupResponse", "Response"}
|
|
|
|
|
|
|
|
func (ec *executionContext) _BasicAuthSignupResponse(ctx context.Context, sel ast.SelectionSet, obj *model.BasicAuthSignupResponse) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, basicAuthSignupResponseImplementors)
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("BasicAuthSignupResponse")
|
|
|
|
case "success":
|
|
|
|
out.Values[i] = ec._BasicAuthSignupResponse_success(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "message":
|
|
|
|
out.Values[i] = ec._BasicAuthSignupResponse_message(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "errors":
|
|
|
|
out.Values[i] = ec._BasicAuthSignupResponse_errors(ctx, field, obj)
|
|
|
|
case "statusCode":
|
|
|
|
out.Values[i] = ec._BasicAuthSignupResponse_statusCode(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "user":
|
|
|
|
out.Values[i] = ec._BasicAuthSignupResponse_user(ctx, field, obj)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
var errorImplementors = []string{"Error"}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Error(ctx context.Context, sel ast.SelectionSet, obj *model.Error) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, errorImplementors)
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("Error")
|
|
|
|
case "message":
|
|
|
|
out.Values[i] = ec._Error_message(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "reason":
|
|
|
|
out.Values[i] = ec._Error_reason(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
var mutationImplementors = []string{"Mutation"}
|
|
|
|
|
|
|
|
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
|
|
|
|
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
|
|
Object: "Mutation",
|
|
|
|
})
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("Mutation")
|
2021-07-12 18:22:16 +00:00
|
|
|
case "basicAuthSignUp":
|
|
|
|
out.Values[i] = ec._Mutation_basicAuthSignUp(ctx, field)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "basicAuthLogin":
|
|
|
|
out.Values[i] = ec._Mutation_basicAuthLogin(ctx, field)
|
2021-07-08 12:15:19 +00:00
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("Query")
|
2021-07-12 18:22:16 +00:00
|
|
|
case "users":
|
2021-07-08 12:15:19 +00:00
|
|
|
field := field
|
|
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
|
|
defer func() {
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
}
|
|
|
|
}()
|
2021-07-12 18:22:16 +00:00
|
|
|
res = ec._Query_users(ctx, field)
|
2021-07-08 12:15:19 +00:00
|
|
|
if res == graphql.Null {
|
|
|
|
atomic.AddUint32(&invalids, 1)
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
})
|
|
|
|
case "__type":
|
|
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
|
|
case "__schema":
|
|
|
|
out.Values[i] = ec._Query___schema(ctx, field)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
var userImplementors = []string{"User"}
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
|
2021-07-08 12:15:19 +00:00
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
2021-07-12 18:22:16 +00:00
|
|
|
out.Values[i] = graphql.MarshalString("User")
|
2021-07-08 12:15:19 +00:00
|
|
|
case "id":
|
2021-07-12 18:22:16 +00:00
|
|
|
out.Values[i] = ec._User_id(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
case "email":
|
|
|
|
out.Values[i] = ec._User_email(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
case "SignUpMethod":
|
|
|
|
out.Values[i] = ec._User_SignUpMethod(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
case "firstName":
|
|
|
|
out.Values[i] = ec._User_firstName(ctx, field, obj)
|
|
|
|
case "lastName":
|
|
|
|
out.Values[i] = ec._User_lastName(ctx, field, obj)
|
|
|
|
case "emailVerifiedAt":
|
|
|
|
out.Values[i] = ec._User_emailVerifiedAt(ctx, field, obj)
|
|
|
|
case "password":
|
|
|
|
out.Values[i] = ec._User_password(ctx, field, obj)
|
|
|
|
case "image":
|
|
|
|
out.Values[i] = ec._User_image(ctx, field, obj)
|
|
|
|
case "createdAt":
|
|
|
|
out.Values[i] = ec._User_createdAt(ctx, field, obj)
|
|
|
|
case "updatedAt":
|
|
|
|
out.Values[i] = ec._User_updatedAt(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
var verificationRequestImplementors = []string{"VerificationRequest"}
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) _VerificationRequest(ctx context.Context, sel ast.SelectionSet, obj *model.VerificationRequest) graphql.Marshaler {
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, verificationRequestImplementors)
|
2021-07-08 12:15:19 +00:00
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
2021-07-12 18:22:16 +00:00
|
|
|
out.Values[i] = graphql.MarshalString("VerificationRequest")
|
2021-07-08 12:15:19 +00:00
|
|
|
case "id":
|
2021-07-12 18:22:16 +00:00
|
|
|
out.Values[i] = ec._VerificationRequest_id(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
case "identifier":
|
|
|
|
out.Values[i] = ec._VerificationRequest_identifier(ctx, field, obj)
|
|
|
|
case "token":
|
|
|
|
out.Values[i] = ec._VerificationRequest_token(ctx, field, obj)
|
|
|
|
case "email":
|
|
|
|
out.Values[i] = ec._VerificationRequest_email(ctx, field, obj)
|
|
|
|
case "expires":
|
|
|
|
out.Values[i] = ec._VerificationRequest_expires(ctx, field, obj)
|
|
|
|
case "createdAt":
|
|
|
|
out.Values[i] = ec._VerificationRequest_createdAt(ctx, field, obj)
|
|
|
|
case "updatedAt":
|
|
|
|
out.Values[i] = ec._VerificationRequest_updatedAt(ctx, field, obj)
|
2021-07-08 12:15:19 +00:00
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
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 {
|
|
|
|
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 {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "args":
|
|
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
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 {
|
|
|
|
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 {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "deprecationReason":
|
|
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
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 {
|
|
|
|
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 {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "type":
|
|
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "isDeprecated":
|
|
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "deprecationReason":
|
|
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
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 {
|
|
|
|
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 {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "defaultValue":
|
|
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
for i, field := range fields {
|
|
|
|
switch field.Name {
|
|
|
|
case "__typename":
|
|
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
|
|
case "types":
|
|
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
case "queryType":
|
|
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
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 {
|
|
|
|
invalids++
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
var invalids uint32
|
|
|
|
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 {
|
|
|
|
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)
|
|
|
|
default:
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out.Dispatch()
|
|
|
|
if invalids > 0 {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) unmarshalNBasicAuthLoginInput2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthLoginInput(ctx context.Context, v interface{}) (model.BasicAuthLoginInput, error) {
|
|
|
|
res, err := ec.unmarshalInputBasicAuthLoginInput(ctx, v)
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNBasicAuthLoginResponse2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthLoginResponse(ctx context.Context, sel ast.SelectionSet, v model.BasicAuthLoginResponse) graphql.Marshaler {
|
|
|
|
return ec._BasicAuthLoginResponse(ctx, sel, &v)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNBasicAuthLoginResponse2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthLoginResponse(ctx context.Context, sel ast.SelectionSet, v *model.BasicAuthLoginResponse) graphql.Marshaler {
|
|
|
|
if v == nil {
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
}
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._BasicAuthLoginResponse(ctx, sel, v)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalNBasicAuthSignupInput2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthSignupInput(ctx context.Context, v interface{}) (model.BasicAuthSignupInput, error) {
|
|
|
|
res, err := ec.unmarshalInputBasicAuthSignupInput(ctx, v)
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNBasicAuthSignupResponse2githubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthSignupResponse(ctx context.Context, sel ast.SelectionSet, v model.BasicAuthSignupResponse) graphql.Marshaler {
|
|
|
|
return ec._BasicAuthSignupResponse(ctx, sel, &v)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNBasicAuthSignupResponse2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐBasicAuthSignupResponse(ctx context.Context, sel ast.SelectionSet, v *model.BasicAuthSignupResponse) graphql.Marshaler {
|
|
|
|
if v == nil {
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
}
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._BasicAuthSignupResponse(ctx, sel, v)
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) marshalNError2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐError(ctx context.Context, sel ast.SelectionSet, v *model.Error) graphql.Marshaler {
|
|
|
|
if v == nil {
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
}
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._Error(ctx, sel, v)
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
|
|
|
|
res, err := graphql.UnmarshalInt(v)
|
2021-07-08 12:15:19 +00:00
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
|
|
|
res := graphql.MarshalInt(v)
|
|
|
|
if res == graphql.Null {
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler {
|
2021-07-08 12:15:19 +00:00
|
|
|
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()
|
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUser(ctx, sel, v[i])
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
if isLen1 {
|
|
|
|
f(i)
|
|
|
|
} else {
|
|
|
|
go f(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
wg.Wait()
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋ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, "must not be null")
|
|
|
|
}
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._User(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()
|
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
|
|
var vSlice []interface{}
|
|
|
|
if v != nil {
|
|
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
|
|
vSlice = tmp1
|
|
|
|
} else {
|
|
|
|
vSlice = []interface{}{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()
|
|
|
|
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()
|
|
|
|
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()
|
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
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, "must not be null")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|
|
|
|
|
|
|
|
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 {
|
|
|
|
return graphql.MarshalBoolean(v)
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
return graphql.MarshalBoolean(*v)
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐErrorᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Error) 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.marshalNError2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐError(ctx, sel, v[i])
|
|
|
|
}
|
|
|
|
if isLen1 {
|
|
|
|
f(i)
|
|
|
|
} else {
|
|
|
|
go f(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
wg.Wait()
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalOInt642ᚖint64(ctx context.Context, v interface{}) (*int64, error) {
|
|
|
|
if v == nil {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
res, err := graphql.UnmarshalInt64(v)
|
|
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalOInt642ᚖint64(ctx context.Context, sel ast.SelectionSet, v *int64) graphql.Marshaler {
|
|
|
|
if v == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return graphql.MarshalInt64(*v)
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
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 {
|
|
|
|
return graphql.MarshalString(v)
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
return graphql.MarshalString(*v)
|
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋyauthdevᚋyauthᚋserverᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
|
|
if v == nil {
|
|
|
|
return graphql.Null
|
|
|
|
}
|
|
|
|
return ec._User(ctx, sel, v)
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
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()
|
|
|
|
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()
|
|
|
|
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()
|
|
|
|
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()
|
|
|
|
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 *****************************
|