From aa4ddc2615a132187aa06cb70256c68c35ca8f83 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Fri, 27 Mar 2020 19:22:36 +0100
Subject: [PATCH] [enh] Add README

---
 README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ba861b7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,81 @@
+# Setup
+
+## Prérequis
+
+* NodeJS 9
+
+## Installation
+
+### Dépendances
+
+    yarn
+    
+### Synchronisation Ğ1
+
+    node index.js sync g1.duniter.org
+    
+## Usage
+
+    node index.js gva
+    
+L'IHM est alors consultable à l'adresse http://localhost:15000/graphql
+
+## Exemples de requêtes
+
+### hello
+
+```json
+{
+  hello
+}
+```
+
+```json
+{
+  "data": {
+    "hello": "Welcome to Duniter GVA API."
+  }
+}
+```
+
+### block(number)
+
+```json
+{
+  block(number: 0) {
+    number
+    currency
+    membersCount
+  }
+}
+```
+
+```json
+{
+  "data": {
+    "block": {
+      "number": 0,
+      "currency": "g1",
+      "membersCount": 59
+    }
+  }
+}
+```
+
+## API
+
+Dans GraphQLi, dans le menu en haut à droite "Docs > Query" se situe la liste des opérations possibles actuelles.
+
+```
+hello: String
+currency: String!
+block(number: Int): Block
+member(uid: Stringpub: String): Identity
+pendingIdentities(search: String): [PendingIdentity!]!
+pendingIdentityByHash(hash: String!): PendingIdentity
+pendingTransactions: [Transaction!]!
+transactionByHash(hash: String!): Transaction
+transactionsOfIssuer(issuer: String!): [Transaction!]!
+transactionsOfReceiver(receiver: String!): [Transaction!]!
+sourcesOfPubkey(pub: String!): [Source!]!
+``` 
-- 
GitLab