From b8207160fa5cf7ec9fa5e6264e62661cec083192 Mon Sep 17 00:00:00 2001
From: Jean-Marie PEDURAND <jm81@hotmail.fr>
Date: Sun, 17 Nov 2019 09:57:38 +0100
Subject: [PATCH] [ref] gva: remove mutation

---
 lib/modules/gva/resources/schema.gql | 3 ---
 lib/modules/gva/src/schema.rs        | 9 ++-------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/lib/modules/gva/resources/schema.gql b/lib/modules/gva/resources/schema.gql
index c3031bfa..0d521aec 100644
--- a/lib/modules/gva/resources/schema.gql
+++ b/lib/modules/gva/resources/schema.gql
@@ -1,15 +1,12 @@
 
 schema {
   query: Query
-  mutation: Mutation
 }
 
 type Query {
   current: Block @juniper(ownership: "owned")
 }
 
-type Mutation 
-
 type Block {
   version: Int!
   currency: String!
diff --git a/lib/modules/gva/src/schema.rs b/lib/modules/gva/src/schema.rs
index 873b1ce2..d1826f42 100644
--- a/lib/modules/gva/src/schema.rs
+++ b/lib/modules/gva/src/schema.rs
@@ -19,6 +19,7 @@ use crate::context::Context;
 use dubp_block_doc::block::BlockDocumentTrait;
 use dubp_common_doc::traits::Document;
 use durs_bc_db_reader::BcDbRo;
+use juniper::EmptyMutation;
 use juniper::Executor;
 use juniper::FieldResult;
 use juniper_from_schema::graphql_schema_from_file;
@@ -86,12 +87,6 @@ impl BlockFields for Block {
     }
 }
 
-pub struct Mutation;
-
-impl MutationFields for Mutation {
-
-}
-
 pub fn create_schema() -> Schema {
-    Schema::new(Query {}, Mutation {})
+    Schema::new(Query {}, EmptyMutation::new())
 }
-- 
GitLab