2021-07-08 12:15:19 +00:00
|
|
|
package graph
|
|
|
|
|
|
|
|
// This file will be automatically regenerated based on the schema, any resolver implementations
|
|
|
|
// will be copied through when generating and any unknown code will be moved to the end.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-07-23 16:27:44 +00:00
|
|
|
"github.com/authorizerdev/authorizer/server/graph/generated"
|
|
|
|
"github.com/authorizerdev/authorizer/server/graph/model"
|
|
|
|
"github.com/authorizerdev/authorizer/server/resolvers"
|
2021-07-08 12:15:19 +00:00
|
|
|
)
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Signup is the resolver for the signup field.
|
2021-07-28 10:13:08 +00:00
|
|
|
func (r *mutationResolver) Signup(ctx context.Context, params model.SignUpInput) (*model.AuthResponse, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.SignupResolver(ctx, params)
|
2021-07-17 16:29:50 +00:00
|
|
|
}
|
2021-07-12 18:22:16 +00:00
|
|
|
|
2022-12-21 17:44:24 +00:00
|
|
|
// MobileBasicAuthSignup is the resolver for the mobile_basic_auth_signup field.
|
|
|
|
func (r *mutationResolver) MobileBasicAuthSignup(ctx context.Context, params *model.MobileBasicAuthSignUpUpInput) (*model.AuthResponse, error) {
|
|
|
|
return resolvers.MobileBasicAuthSignupResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Login is the resolver for the login field.
|
2021-07-28 10:13:08 +00:00
|
|
|
func (r *mutationResolver) Login(ctx context.Context, params model.LoginInput) (*model.AuthResponse, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.LoginResolver(ctx, params)
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// MagicLinkLogin is the resolver for the magic_link_login field.
|
2021-12-22 05:21:12 +00:00
|
|
|
func (r *mutationResolver) MagicLinkLogin(ctx context.Context, params model.MagicLinkLoginInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.MagicLinkLoginResolver(ctx, params)
|
2021-11-11 23:52:03 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Logout is the resolver for the logout field.
|
2021-07-15 09:43:00 +00:00
|
|
|
func (r *mutationResolver) Logout(ctx context.Context) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.LogoutResolver(ctx)
|
2021-07-15 09:43:00 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// UpdateProfile is the resolver for the update_profile field.
|
2021-07-18 03:55:20 +00:00
|
|
|
func (r *mutationResolver) UpdateProfile(ctx context.Context, params model.UpdateProfileInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.UpdateProfileResolver(ctx, params)
|
2021-07-18 03:55:20 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// VerifyEmail is the resolver for the verify_email field.
|
2021-07-28 10:13:08 +00:00
|
|
|
func (r *mutationResolver) VerifyEmail(ctx context.Context, params model.VerifyEmailInput) (*model.AuthResponse, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.VerifyEmailResolver(ctx, params)
|
2021-07-18 03:55:20 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// ResendVerifyEmail is the resolver for the resend_verify_email field.
|
2021-07-18 07:26:17 +00:00
|
|
|
func (r *mutationResolver) ResendVerifyEmail(ctx context.Context, params model.ResendVerifyEmailInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.ResendVerifyEmailResolver(ctx, params)
|
2021-07-18 07:26:17 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// ForgotPassword is the resolver for the forgot_password field.
|
2021-07-18 09:56:29 +00:00
|
|
|
func (r *mutationResolver) ForgotPassword(ctx context.Context, params model.ForgotPasswordInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.ForgotPasswordResolver(ctx, params)
|
2021-07-18 09:56:29 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// ResetPassword is the resolver for the reset_password field.
|
2021-08-07 08:41:26 +00:00
|
|
|
func (r *mutationResolver) ResetPassword(ctx context.Context, params model.ResetPasswordInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.ResetPasswordResolver(ctx, params)
|
2021-07-21 08:06:26 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Revoke is the resolver for the revoke field.
|
2022-03-08 13:19:42 +00:00
|
|
|
func (r *mutationResolver) Revoke(ctx context.Context, params model.OAuthRevokeInput) (*model.Response, error) {
|
|
|
|
return resolvers.RevokeResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// VerifyOtp is the resolver for the verify_otp field.
|
2022-07-23 11:14:39 +00:00
|
|
|
func (r *mutationResolver) VerifyOtp(ctx context.Context, params model.VerifyOTPRequest) (*model.AuthResponse, error) {
|
|
|
|
return resolvers.VerifyOtpResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// ResendOtp is the resolver for the resend_otp field.
|
2022-07-29 08:19:46 +00:00
|
|
|
func (r *mutationResolver) ResendOtp(ctx context.Context, params model.ResendOTPRequest) (*model.Response, error) {
|
|
|
|
return resolvers.ResendOTPResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// DeleteUser is the resolver for the _delete_user field.
|
2021-08-06 13:47:52 +00:00
|
|
|
func (r *mutationResolver) DeleteUser(ctx context.Context, params model.DeleteUserInput) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.DeleteUserResolver(ctx, params)
|
2021-08-06 13:47:52 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// UpdateUser is the resolver for the _update_user field.
|
2021-12-22 05:21:12 +00:00
|
|
|
func (r *mutationResolver) UpdateUser(ctx context.Context, params model.UpdateUserInput) (*model.User, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.UpdateUserResolver(ctx, params)
|
2021-07-28 07:55:52 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AdminSignup is the resolver for the _admin_signup field.
|
2022-01-09 13:10:30 +00:00
|
|
|
func (r *mutationResolver) AdminSignup(ctx context.Context, params model.AdminSignupInput) (*model.Response, error) {
|
2022-01-09 12:05:37 +00:00
|
|
|
return resolvers.AdminSignupResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AdminLogin is the resolver for the _admin_login field.
|
2022-01-09 13:10:30 +00:00
|
|
|
func (r *mutationResolver) AdminLogin(ctx context.Context, params model.AdminLoginInput) (*model.Response, error) {
|
2021-12-30 04:31:51 +00:00
|
|
|
return resolvers.AdminLoginResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AdminLogout is the resolver for the _admin_logout field.
|
2021-12-31 17:36:06 +00:00
|
|
|
func (r *mutationResolver) AdminLogout(ctx context.Context) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.AdminLogoutResolver(ctx)
|
2021-12-31 17:36:06 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// UpdateEnv is the resolver for the _update_env field.
|
2022-01-17 07:42:46 +00:00
|
|
|
func (r *mutationResolver) UpdateEnv(ctx context.Context, params model.UpdateEnvInput) (*model.Response, error) {
|
|
|
|
return resolvers.UpdateEnvResolver(ctx, params)
|
2021-12-31 11:33:37 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// InviteMembers is the resolver for the _invite_members field.
|
2022-03-15 03:23:48 +00:00
|
|
|
func (r *mutationResolver) InviteMembers(ctx context.Context, params model.InviteMemberInput) (*model.Response, error) {
|
|
|
|
return resolvers.InviteMembersResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// RevokeAccess is the resolver for the _revoke_access field.
|
2022-03-24 08:43:55 +00:00
|
|
|
func (r *mutationResolver) RevokeAccess(ctx context.Context, param model.UpdateAccessInput) (*model.Response, error) {
|
|
|
|
return resolvers.RevokeAccessResolver(ctx, param)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// EnableAccess is the resolver for the _enable_access field.
|
2022-03-24 08:43:55 +00:00
|
|
|
func (r *mutationResolver) EnableAccess(ctx context.Context, param model.UpdateAccessInput) (*model.Response, error) {
|
|
|
|
return resolvers.EnableAccessResolver(ctx, param)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// GenerateJwtKeys is the resolver for the _generate_jwt_keys field.
|
2022-03-24 13:51:52 +00:00
|
|
|
func (r *mutationResolver) GenerateJwtKeys(ctx context.Context, params model.GenerateJWTKeysInput) (*model.GenerateJWTKeysResponse, error) {
|
|
|
|
return resolvers.GenerateJWTKeysResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AddWebhook is the resolver for the _add_webhook field.
|
2022-07-10 16:19:33 +00:00
|
|
|
func (r *mutationResolver) AddWebhook(ctx context.Context, params model.AddWebhookRequest) (*model.Response, error) {
|
|
|
|
return resolvers.AddWebhookResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// UpdateWebhook is the resolver for the _update_webhook field.
|
2022-07-10 16:19:33 +00:00
|
|
|
func (r *mutationResolver) UpdateWebhook(ctx context.Context, params model.UpdateWebhookRequest) (*model.Response, error) {
|
|
|
|
return resolvers.UpdateWebhookResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// DeleteWebhook is the resolver for the _delete_webhook field.
|
2022-07-10 16:19:33 +00:00
|
|
|
func (r *mutationResolver) DeleteWebhook(ctx context.Context, params model.WebhookRequest) (*model.Response, error) {
|
|
|
|
return resolvers.DeleteWebhookResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// TestEndpoint is the resolver for the _test_endpoint field.
|
2022-07-10 16:19:33 +00:00
|
|
|
func (r *mutationResolver) TestEndpoint(ctx context.Context, params model.TestEndpointRequest) (*model.TestEndpointResponse, error) {
|
|
|
|
return resolvers.TestEndpointResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AddEmailTemplate is the resolver for the _add_email_template field.
|
2022-07-17 06:37:17 +00:00
|
|
|
func (r *mutationResolver) AddEmailTemplate(ctx context.Context, params model.AddEmailTemplateRequest) (*model.Response, error) {
|
2022-07-17 07:02:01 +00:00
|
|
|
return resolvers.AddEmailTemplateResolver(ctx, params)
|
2022-07-17 06:37:17 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// UpdateEmailTemplate is the resolver for the _update_email_template field.
|
2022-07-17 06:37:17 +00:00
|
|
|
func (r *mutationResolver) UpdateEmailTemplate(ctx context.Context, params model.UpdateEmailTemplateRequest) (*model.Response, error) {
|
2022-07-17 07:02:01 +00:00
|
|
|
return resolvers.UpdateEmailTemplateResolver(ctx, params)
|
2022-07-17 06:37:17 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// DeleteEmailTemplate is the resolver for the _delete_email_template field.
|
2022-07-17 06:37:17 +00:00
|
|
|
func (r *mutationResolver) DeleteEmailTemplate(ctx context.Context, params model.DeleteEmailTemplateRequest) (*model.Response, error) {
|
2022-07-17 07:02:01 +00:00
|
|
|
return resolvers.DeleteEmailTemplateResolver(ctx, params)
|
2022-07-17 06:37:17 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Meta is the resolver for the meta field.
|
2021-12-22 05:21:12 +00:00
|
|
|
func (r *queryResolver) Meta(ctx context.Context) (*model.Meta, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.MetaResolver(ctx)
|
2021-07-12 18:22:16 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Session is the resolver for the session field.
|
2022-01-23 19:02:06 +00:00
|
|
|
func (r *queryResolver) Session(ctx context.Context, params *model.SessionQueryInput) (*model.AuthResponse, error) {
|
|
|
|
return resolvers.SessionResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Profile is the resolver for the profile field.
|
2021-07-17 23:26:34 +00:00
|
|
|
func (r *queryResolver) Profile(ctx context.Context) (*model.User, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.ProfileResolver(ctx)
|
2021-07-17 23:26:34 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// ValidateJwtToken is the resolver for the validate_jwt_token field.
|
2022-03-24 08:01:56 +00:00
|
|
|
func (r *queryResolver) ValidateJwtToken(ctx context.Context, params model.ValidateJWTTokenInput) (*model.ValidateJWTTokenResponse, error) {
|
|
|
|
return resolvers.ValidateJwtTokenResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Users is the resolver for the _users field.
|
2022-01-25 05:27:40 +00:00
|
|
|
func (r *queryResolver) Users(ctx context.Context, params *model.PaginatedInput) (*model.Users, error) {
|
|
|
|
return resolvers.UsersResolver(ctx, params)
|
2021-12-22 05:21:12 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// VerificationRequests is the resolver for the _verification_requests field.
|
2022-01-25 05:27:40 +00:00
|
|
|
func (r *queryResolver) VerificationRequests(ctx context.Context, params *model.PaginatedInput) (*model.VerificationRequests, error) {
|
|
|
|
return resolvers.VerificationRequestsResolver(ctx, params)
|
2021-07-18 04:22:54 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// AdminSession is the resolver for the _admin_session field.
|
2022-01-09 13:10:30 +00:00
|
|
|
func (r *queryResolver) AdminSession(ctx context.Context) (*model.Response, error) {
|
2022-01-17 06:02:13 +00:00
|
|
|
return resolvers.AdminSessionResolver(ctx)
|
2021-12-30 04:31:51 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Env is the resolver for the _env field.
|
2022-01-17 07:42:46 +00:00
|
|
|
func (r *queryResolver) Env(ctx context.Context) (*model.Env, error) {
|
|
|
|
return resolvers.EnvResolver(ctx)
|
2021-12-31 11:33:37 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Webhook is the resolver for the _webhook field.
|
2022-07-10 16:19:33 +00:00
|
|
|
func (r *queryResolver) Webhook(ctx context.Context, params model.WebhookRequest) (*model.Webhook, error) {
|
|
|
|
return resolvers.WebhookResolver(ctx, params)
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// Webhooks is the resolver for the _webhooks field.
|
2022-07-06 05:08:21 +00:00
|
|
|
func (r *queryResolver) Webhooks(ctx context.Context, params *model.PaginatedInput) (*model.Webhooks, error) {
|
2022-07-10 16:19:33 +00:00
|
|
|
return resolvers.WebhooksResolver(ctx, params)
|
2022-07-06 05:08:21 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// WebhookLogs is the resolver for the _webhook_logs field.
|
2022-07-11 16:35:44 +00:00
|
|
|
func (r *queryResolver) WebhookLogs(ctx context.Context, params *model.ListWebhookLogRequest) (*model.WebhookLogs, error) {
|
2022-07-10 16:19:33 +00:00
|
|
|
return resolvers.WebhookLogsResolver(ctx, params)
|
2022-07-06 05:08:21 +00:00
|
|
|
}
|
|
|
|
|
2022-09-30 10:07:59 +00:00
|
|
|
// EmailTemplates is the resolver for the _email_templates field.
|
2022-07-17 06:37:17 +00:00
|
|
|
func (r *queryResolver) EmailTemplates(ctx context.Context, params *model.PaginatedInput) (*model.EmailTemplates, error) {
|
2022-07-17 07:02:01 +00:00
|
|
|
return resolvers.EmailTemplatesResolver(ctx, params)
|
2022-07-17 06:37:17 +00:00
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
// Mutation returns generated.MutationResolver implementation.
|
|
|
|
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
|
|
|
|
|
|
|
|
// Query returns generated.QueryResolver implementation.
|
|
|
|
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
|
|
|
|
|
2022-07-28 05:48:06 +00:00
|
|
|
type mutationResolver struct{ *Resolver }
|
|
|
|
type queryResolver struct{ *Resolver }
|