From 556820959f87d92089f857be7bcf44e4e5bcb75d Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Thu, 11 Apr 2019 00:09:03 +0200
Subject: [PATCH] [feat] rfc gva: add network documents to schema

---
 appendices/0003_RFC/schema.gql | 56 +++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 7 deletions(-)

diff --git a/appendices/0003_RFC/schema.gql b/appendices/0003_RFC/schema.gql
index 3355b14..4e1b169 100644
--- a/appendices/0003_RFC/schema.gql
+++ b/appendices/0003_RFC/schema.gql
@@ -7,6 +7,8 @@
 type Query {
   node: Node
   current: Block
+  peers: Peers
+  heads: Heads
   block(number: Int!): Block
   blocks(
     paging: Paging!
@@ -51,6 +53,23 @@ type Query {
 # Queries return types
 #################################
 
+type Counters {
+  # Nombre total d'éléments
+  elements: Int!
+  # Total number of pages
+ 	pages: Int!
+}
+
+type Peers {
+  counters: Counters!
+  peers: [Peer!]!
+}
+
+type Heads {
+  counters: Counters!
+  peers: [Head!]!
+}
+
 type Identities {
   counters: Counters!
   identities: [Identity!]!
@@ -76,13 +95,6 @@ type Transactions {
   transactions: [Transaction!]!
 }
 
-type Counters {
-  # Nombre total d'éléments
-  elements: Int!
-  # Total number of pages
- 	pages: Int!
-}
-
 #################################
 # Inputs
 #################################
@@ -149,9 +161,39 @@ type Sandboxes {
 
 type Node {
   summary: Summary
+  peer: Peer,
+  head: Head,
   sandboxes: Sandboxes
 }
 
+#################################
+# NETWORK types
+#################################
+
+type Peer {
+  issuer: String!,
+  nodeId: Int!,
+  blockNumberAndHash: BlockNumberAndHash!,
+  endpoints: [String!]!,
+  signature: String!,
+}
+
+type Head {
+  version: Int!,
+  currency: String!,
+  outgoingConf: Int!,
+  incomingConf: Int!,
+  freeMirrorRooms: Int!,
+  freeMemberRooms: Int!,
+  nodeID: Int!,
+  pubkey: String!,
+  blockNumberAndHash: BlockNumberAndHash!,
+  software: String!,
+  softVersion: String!,
+  signature: String!,
+  step: Int!,
+}
+
 #################################
 # WOT types
 #################################
-- 
GitLab