2020-07-16 09:28:27 +02: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"
|
|
|
|
|
|
|
|
"forge.cadoles.com/Cadoles/daddy/internal/graph/generated"
|
|
|
|
"forge.cadoles.com/Cadoles/daddy/internal/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (r *mutationResolver) UpdateProfile(ctx context.Context, changes model.ProfileChanges) (*model.User, error) {
|
|
|
|
return handleUpdateUserProfile(ctx, changes)
|
|
|
|
}
|
|
|
|
|
2020-07-21 18:10:03 +02:00
|
|
|
func (r *mutationResolver) JoinWorkgroup(ctx context.Context, workgroupID string) (*model.Workgroup, error) {
|
|
|
|
return handleJoinWorkgroup(ctx, workgroupID)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *mutationResolver) LeaveWorkgroup(ctx context.Context, workgroupID string) (*model.Workgroup, error) {
|
|
|
|
return handleLeaveWorkgroup(ctx, workgroupID)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *mutationResolver) CreateWorkgroup(ctx context.Context, changes model.WorkgroupChanges) (*model.Workgroup, error) {
|
|
|
|
return handleCreateWorkgroup(ctx, changes)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *mutationResolver) CloseWorkgroup(ctx context.Context, workgroupID string) (*model.Workgroup, error) {
|
|
|
|
return handleCloseWorkgroup(ctx, workgroupID)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *mutationResolver) UpdateWorkgroup(ctx context.Context, workgroupID string, changes model.WorkgroupChanges) (*model.Workgroup, error) {
|
|
|
|
return handleUpdateWorkgroup(ctx, workgroupID, changes)
|
|
|
|
}
|
|
|
|
|
2020-07-16 09:28:27 +02:00
|
|
|
// Mutation returns generated.MutationResolver implementation.
|
|
|
|
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
|
|
|
|
|
|
|
|
type mutationResolver struct{ *Resolver }
|