aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/resolvers/mutation.go
diff options
context:
space:
mode:
Diffstat (limited to 'graphql/resolvers/mutation.go')
-rw-r--r--graphql/resolvers/mutation.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/graphql/resolvers/mutation.go b/graphql/resolvers/mutation.go
index 850645f4..80d6fb1a 100644
--- a/graphql/resolvers/mutation.go
+++ b/graphql/resolvers/mutation.go
@@ -7,8 +7,32 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/graphql/graph"
"github.com/MichaelMure/git-bug/graphql/models"
+ "github.com/vektah/gqlparser/gqlerror"
)
+var _ graph.MutationResolver = &readonlyMutationResolver{}
+
+type readonlyMutationResolver struct{}
+
+func (readonlyMutationResolver) NewBug(_ context.Context, _ models.NewBugInput) (*models.NewBugPayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+func (readonlyMutationResolver) AddComment(_ context.Context, input models.AddCommentInput) (*models.AddCommentPayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+func (readonlyMutationResolver) ChangeLabels(_ context.Context, input *models.ChangeLabelInput) (*models.ChangeLabelPayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+func (readonlyMutationResolver) OpenBug(_ context.Context, input models.OpenBugInput) (*models.OpenBugPayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+func (readonlyMutationResolver) CloseBug(_ context.Context, input models.CloseBugInput) (*models.CloseBugPayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+func (readonlyMutationResolver) SetTitle(_ context.Context, input models.SetTitleInput) (*models.SetTitlePayload, error) {
+ return nil, gqlerror.Errorf("readonly mode")
+}
+
var _ graph.MutationResolver = &mutationResolver{}
type mutationResolver struct {