diff --git a/rfc/0003 RFC GraphQL API for Duniter Client.md b/rfc/0003 RFC GraphQL API for Duniter Client.md new file mode 100644 index 0000000000000000000000000000000000000000..3d6d0c8eee13ced726785341e99b1930369059ff --- /dev/null +++ b/rfc/0003 RFC GraphQL API for Duniter Client.md @@ -0,0 +1,80 @@ +# GraphQL API for Duniter Client + +```txt +RFC: 3 +Title: GraphQL API for Duniter Client +Type: New API module dedicated for client needs +Parent: +Status: WIP +Author: vtexier <vit@free.fr> +Created: 2018-01-19 +Last edited: 2018-01-19 +License: AGPL-3 +``` + +> This document is currently being written and thus it's not complete. Specifications may change in the future. + +## Abstract + +In the current Duniter server, the old BMA api is deprecated and will be removed. +The WS2P API is dedicated for the inter-node communication. + +We propose here a new API Module dedicated to client software. +It should deliver efficiently all information needed without slowing down the Duniter node. + +## API standard + +It is important that we use an already known standard to avoid difficulty in contribution. And to get all the evolution and ideas coming from the community supporting the standard. + +The proposed standard is [GraphQL](http://graphql.org/). Created by Facebook, it is used by many companies around the world. + +The PRO: https://blog.risingstack.com/graphql-overview-getting-started-with-graphql-and-nodejs/ +The CON: https://blog.hitchhq.com/graphql-3-reasons-not-to-use-it-7715f60cb934 + +### Specifications + +http://facebook.github.io/graphql + +### GraphQL License + +The specification of the API is licensed under the Open Web Fundation: + +The various implementation, for example the javascript one, are under the MIT license. + +https://code.facebook.com/posts/121714468491809/relicensing-the-graphql-specification/ + +## Librairies + +GraphQl use queries that need to be parsed by the server implementation. So the use of a library avoid to write ourselves the base code. + +### Javascript library + +Facebook Javascript is available [here](https://github.com/graphql/graphql-js) + +### Rust Library + +Rust library is available [here](https://github.com/graphql-rust/juniper) + +### Other languages + +http://graphql.org/code/#server-libraries + +## GraphQL Verification API + +This is the name proposed for this API implementation. + +Why ? + +- We use **GraphQL** +- We make data changes **Verification** +- This is an **API** ;-) + +## Merckle Tree verification system + +To speed up the queries, we need to use intensively the Merckle Tree comparison system. + +To do + +## The server GraphQL Schema + +To do