|
|
|
@ -43,18 +43,18 @@ type DirectiveRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ComplexityRoot struct {
|
|
|
|
|
Error struct {
|
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
|
Reason func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LoginResponse struct {
|
|
|
|
|
AuthResponse struct {
|
|
|
|
|
AccessToken func(childComplexity int) int
|
|
|
|
|
AccessTokenExpiresAt func(childComplexity int) int
|
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
|
User func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Error struct {
|
|
|
|
|
Message func(childComplexity int) int
|
|
|
|
|
Reason func(childComplexity int) int
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Meta struct {
|
|
|
|
|
IsBasicAuthenticationEnabled func(childComplexity int) int
|
|
|
|
|
IsEmailVerificationEnabled func(childComplexity int) int
|
|
|
|
@ -112,11 +112,11 @@ type ComplexityRoot struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MutationResolver interface {
|
|
|
|
|
Signup(ctx context.Context, params model.SignUpInput) (*model.Response, error)
|
|
|
|
|
Login(ctx context.Context, params model.LoginInput) (*model.LoginResponse, error)
|
|
|
|
|
Signup(ctx context.Context, params model.SignUpInput) (*model.AuthResponse, error)
|
|
|
|
|
Login(ctx context.Context, params model.LoginInput) (*model.AuthResponse, error)
|
|
|
|
|
Logout(ctx context.Context) (*model.Response, error)
|
|
|
|
|
UpdateProfile(ctx context.Context, params model.UpdateProfileInput) (*model.Response, error)
|
|
|
|
|
VerifyEmail(ctx context.Context, params model.VerifyEmailInput) (*model.LoginResponse, error)
|
|
|
|
|
VerifyEmail(ctx context.Context, params model.VerifyEmailInput) (*model.AuthResponse, error)
|
|
|
|
|
ResendVerifyEmail(ctx context.Context, params model.ResendVerifyEmailInput) (*model.Response, error)
|
|
|
|
|
ForgotPassword(ctx context.Context, params model.ForgotPasswordInput) (*model.Response, error)
|
|
|
|
|
ResetPassword(ctx context.Context, params model.ResetPassowrdInput) (*model.Response, error)
|
|
|
|
@ -124,7 +124,7 @@ type MutationResolver interface {
|
|
|
|
|
type QueryResolver interface {
|
|
|
|
|
Meta(ctx context.Context) (*model.Meta, error)
|
|
|
|
|
Users(ctx context.Context) ([]*model.User, error)
|
|
|
|
|
Token(ctx context.Context) (*model.LoginResponse, error)
|
|
|
|
|
Token(ctx context.Context) (*model.AuthResponse, error)
|
|
|
|
|
Profile(ctx context.Context) (*model.User, error)
|
|
|
|
|
VerificationRequests(ctx context.Context) ([]*model.VerificationRequest, error)
|
|
|
|
|
}
|
|
|
|
@ -144,6 +144,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
_ = ec
|
|
|
|
|
switch typeName + "." + field {
|
|
|
|
|
|
|
|
|
|
case "AuthResponse.accessToken":
|
|
|
|
|
if e.complexity.AuthResponse.AccessToken == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.AuthResponse.AccessToken(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "AuthResponse.accessTokenExpiresAt":
|
|
|
|
|
if e.complexity.AuthResponse.AccessTokenExpiresAt == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.AuthResponse.AccessTokenExpiresAt(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "AuthResponse.message":
|
|
|
|
|
if e.complexity.AuthResponse.Message == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.AuthResponse.Message(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "AuthResponse.user":
|
|
|
|
|
if e.complexity.AuthResponse.User == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.AuthResponse.User(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Error.message":
|
|
|
|
|
if e.complexity.Error.Message == nil {
|
|
|
|
|
break
|
|
|
|
@ -158,34 +186,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|
|
|
|
|
|
|
|
|
return e.complexity.Error.Reason(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "LoginResponse.accessToken":
|
|
|
|
|
if e.complexity.LoginResponse.AccessToken == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.LoginResponse.AccessToken(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "LoginResponse.accessTokenExpiresAt":
|
|
|
|
|
if e.complexity.LoginResponse.AccessTokenExpiresAt == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.LoginResponse.AccessTokenExpiresAt(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "LoginResponse.message":
|
|
|
|
|
if e.complexity.LoginResponse.Message == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.LoginResponse.Message(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "LoginResponse.user":
|
|
|
|
|
if e.complexity.LoginResponse.User == nil {
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return e.complexity.LoginResponse.User(childComplexity), true
|
|
|
|
|
|
|
|
|
|
case "Meta.isBasicAuthenticationEnabled":
|
|
|
|
|
if e.complexity.Meta.IsBasicAuthenticationEnabled == nil {
|
|
|
|
|
break
|
|
|
|
@ -586,7 +586,7 @@ type Error {
|
|
|
|
|
reason: String!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LoginResponse {
|
|
|
|
|
type AuthResponse {
|
|
|
|
|
message: String!
|
|
|
|
|
accessToken: String
|
|
|
|
|
accessTokenExpiresAt: Int64
|
|
|
|
@ -640,11 +640,11 @@ input ResetPassowrdInput {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Mutation {
|
|
|
|
|
signup(params: SignUpInput!): Response!
|
|
|
|
|
login(params: LoginInput!): LoginResponse!
|
|
|
|
|
signup(params: SignUpInput!): AuthResponse!
|
|
|
|
|
login(params: LoginInput!): AuthResponse!
|
|
|
|
|
logout: Response!
|
|
|
|
|
updateProfile(params: UpdateProfileInput!): Response!
|
|
|
|
|
verifyEmail(params: VerifyEmailInput!): LoginResponse!
|
|
|
|
|
verifyEmail(params: VerifyEmailInput!): AuthResponse!
|
|
|
|
|
resendVerifyEmail(params: ResendVerifyEmailInput!): Response!
|
|
|
|
|
forgotPassword(params: ForgotPasswordInput!): Response!
|
|
|
|
|
resetPassword(params: ResetPassowrdInput!): Response!
|
|
|
|
@ -653,7 +653,7 @@ type Mutation {
|
|
|
|
|
type Query {
|
|
|
|
|
meta: Meta!
|
|
|
|
|
users: [User!]!
|
|
|
|
|
token: LoginResponse
|
|
|
|
|
token: AuthResponse
|
|
|
|
|
profile: User!
|
|
|
|
|
verificationRequests: [VerificationRequest!]!
|
|
|
|
|
}
|
|
|
|
@ -823,6 +823,137 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
|
|
|
|
|
|
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _AuthResponse_message(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "AuthResponse",
|
|
|
|
|
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.Message, 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) _AuthResponse_accessToken(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "AuthResponse",
|
|
|
|
|
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.AccessToken, 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) _AuthResponse_accessTokenExpiresAt(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "AuthResponse",
|
|
|
|
|
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.AccessTokenExpiresAt, 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) _AuthResponse_user(ctx context.Context, field graphql.CollectedField, obj *model.AuthResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "AuthResponse",
|
|
|
|
|
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.User, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.User)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOUser2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Error_message(ctx context.Context, field graphql.CollectedField, obj *model.Error) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
@ -893,137 +1024,6 @@ func (ec *executionContext) _Error_reason(ctx context.Context, field graphql.Col
|
|
|
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _LoginResponse_message(ctx context.Context, field graphql.CollectedField, obj *model.LoginResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "LoginResponse",
|
|
|
|
|
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.Message, 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) _LoginResponse_accessToken(ctx context.Context, field graphql.CollectedField, obj *model.LoginResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "LoginResponse",
|
|
|
|
|
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.AccessToken, 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) _LoginResponse_accessTokenExpiresAt(ctx context.Context, field graphql.CollectedField, obj *model.LoginResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "LoginResponse",
|
|
|
|
|
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.AccessTokenExpiresAt, 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) _LoginResponse_user(ctx context.Context, field graphql.CollectedField, obj *model.LoginResponse) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
|
|
|
ret = graphql.Null
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
fc := &graphql.FieldContext{
|
|
|
|
|
Object: "LoginResponse",
|
|
|
|
|
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.User, nil
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
ec.Error(ctx, err)
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.User)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOUser2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Meta_version(ctx context.Context, field graphql.CollectedField, obj *model.Meta) (ret graphql.Marshaler) {
|
|
|
|
|
defer func() {
|
|
|
|
|
if r := recover(); r != nil {
|
|
|
|
@ -1306,9 +1306,9 @@ func (ec *executionContext) _Mutation_signup(ctx context.Context, field graphql.
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.Response)
|
|
|
|
|
res := resTmp.(*model.AuthResponse)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐResponse(ctx, field.Selections, res)
|
|
|
|
|
return ec.marshalNAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Mutation_login(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
@ -1348,9 +1348,9 @@ func (ec *executionContext) _Mutation_login(ctx context.Context, field graphql.C
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.LoginResponse)
|
|
|
|
|
res := resTmp.(*model.AuthResponse)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNLoginResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx, field.Selections, res)
|
|
|
|
|
return ec.marshalNAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Mutation_logout(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
@ -1467,9 +1467,9 @@ func (ec *executionContext) _Mutation_verifyEmail(ctx context.Context, field gra
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.LoginResponse)
|
|
|
|
|
res := resTmp.(*model.AuthResponse)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalNLoginResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx, field.Selections, res)
|
|
|
|
|
return ec.marshalNAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Mutation_resendVerifyEmail(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
@ -1695,9 +1695,9 @@ func (ec *executionContext) _Query_token(ctx context.Context, field graphql.Coll
|
|
|
|
|
if resTmp == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
res := resTmp.(*model.LoginResponse)
|
|
|
|
|
res := resTmp.(*model.AuthResponse)
|
|
|
|
|
fc.Result = res
|
|
|
|
|
return ec.marshalOLoginResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx, field.Selections, res)
|
|
|
|
|
return ec.marshalOAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx, field.Selections, res)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Query_profile(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
|
|
@ -3747,6 +3747,39 @@ func (ec *executionContext) unmarshalInputVerifyEmailInput(ctx context.Context,
|
|
|
|
|
|
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
|
|
|
|
|
|
var authResponseImplementors = []string{"AuthResponse"}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _AuthResponse(ctx context.Context, sel ast.SelectionSet, obj *model.AuthResponse) graphql.Marshaler {
|
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, authResponseImplementors)
|
|
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
|
var invalids uint32
|
|
|
|
|
for i, field := range fields {
|
|
|
|
|
switch field.Name {
|
|
|
|
|
case "__typename":
|
|
|
|
|
out.Values[i] = graphql.MarshalString("AuthResponse")
|
|
|
|
|
case "message":
|
|
|
|
|
out.Values[i] = ec._AuthResponse_message(ctx, field, obj)
|
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
|
invalids++
|
|
|
|
|
}
|
|
|
|
|
case "accessToken":
|
|
|
|
|
out.Values[i] = ec._AuthResponse_accessToken(ctx, field, obj)
|
|
|
|
|
case "accessTokenExpiresAt":
|
|
|
|
|
out.Values[i] = ec._AuthResponse_accessTokenExpiresAt(ctx, field, obj)
|
|
|
|
|
case "user":
|
|
|
|
|
out.Values[i] = ec._AuthResponse_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 {
|
|
|
|
@ -3779,39 +3812,6 @@ func (ec *executionContext) _Error(ctx context.Context, sel ast.SelectionSet, ob
|
|
|
|
|
return out
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var loginResponseImplementors = []string{"LoginResponse"}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _LoginResponse(ctx context.Context, sel ast.SelectionSet, obj *model.LoginResponse) graphql.Marshaler {
|
|
|
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, loginResponseImplementors)
|
|
|
|
|
|
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
|
|
|
var invalids uint32
|
|
|
|
|
for i, field := range fields {
|
|
|
|
|
switch field.Name {
|
|
|
|
|
case "__typename":
|
|
|
|
|
out.Values[i] = graphql.MarshalString("LoginResponse")
|
|
|
|
|
case "message":
|
|
|
|
|
out.Values[i] = ec._LoginResponse_message(ctx, field, obj)
|
|
|
|
|
if out.Values[i] == graphql.Null {
|
|
|
|
|
invalids++
|
|
|
|
|
}
|
|
|
|
|
case "accessToken":
|
|
|
|
|
out.Values[i] = ec._LoginResponse_accessToken(ctx, field, obj)
|
|
|
|
|
case "accessTokenExpiresAt":
|
|
|
|
|
out.Values[i] = ec._LoginResponse_accessTokenExpiresAt(ctx, field, obj)
|
|
|
|
|
case "user":
|
|
|
|
|
out.Values[i] = ec._LoginResponse_user(ctx, field, obj)
|
|
|
|
|
default:
|
|
|
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
out.Dispatch()
|
|
|
|
|
if invalids > 0 {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return out
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var metaImplementors = []string{"Meta"}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) _Meta(ctx context.Context, sel ast.SelectionSet, obj *model.Meta) graphql.Marshaler {
|
|
|
|
@ -4392,6 +4392,20 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
|
|
|
|
|
|
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNAuthResponse2githubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx context.Context, sel ast.SelectionSet, v model.AuthResponse) graphql.Marshaler {
|
|
|
|
|
return ec._AuthResponse(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx context.Context, sel ast.SelectionSet, v *model.AuthResponse) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._AuthResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
|
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
@ -4432,20 +4446,6 @@ func (ec *executionContext) unmarshalNLoginInput2githubᚗcomᚋauthorizerdevᚋ
|
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNLoginResponse2githubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx context.Context, sel ast.SelectionSet, v model.LoginResponse) graphql.Marshaler {
|
|
|
|
|
return ec._LoginResponse(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNLoginResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx context.Context, sel ast.SelectionSet, v *model.LoginResponse) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
|
|
|
ec.Errorf(ctx, "must not be null")
|
|
|
|
|
}
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._LoginResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalNMeta2githubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐMeta(ctx context.Context, sel ast.SelectionSet, v model.Meta) graphql.Marshaler {
|
|
|
|
|
return ec._Meta(ctx, sel, &v)
|
|
|
|
|
}
|
|
|
|
@ -4841,6 +4841,13 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a
|
|
|
|
|
return res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalOAuthResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐAuthResponse(ctx context.Context, sel ast.SelectionSet, v *model.AuthResponse) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._AuthResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
|
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
@ -4880,13 +4887,6 @@ func (ec *executionContext) marshalOInt642ᚖint64(ctx context.Context, sel ast.
|
|
|
|
|
return graphql.MarshalInt64(*v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) marshalOLoginResponse2ᚖgithubᚗcomᚋauthorizerdevᚋauthorizerᚋserverᚋgraphᚋmodelᚐLoginResponse(ctx context.Context, sel ast.SelectionSet, v *model.LoginResponse) graphql.Marshaler {
|
|
|
|
|
if v == nil {
|
|
|
|
|
return graphql.Null
|
|
|
|
|
}
|
|
|
|
|
return ec._LoginResponse(ctx, sel, v)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
|
|
|
|
res, err := graphql.UnmarshalString(v)
|
|
|
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
|
|
|