graphql-query-mapper
This library is a client graphql for typescript.
Intall
npm install graphql-query-mapper --save
Usage
Import dependecy
//Import ;
Create the model
//The model
Create the repository
//The repository mapping
Run
//Run PokemonGraphQlRespository.pokemon'Charmander' .subscribe /* Query {pokemon(name: "Charmander") { id number name image evolutions { id number name } evolutionRequirements { name }}}*/ /*RESPONSE{ "id": "UG9rZW1vbjowMDQ=", "number": "004", "name": "Charmander", "image": "https://img.pokemondb.net/artwork/charmander.jpg", "evolutions": [ { "id": "UG9rZW1vbjowMDU=", "number": "005", "name": "Charmeleon" }, { "id": "UG9rZW1vbjowMDY=", "number": "006", "name": "Charizard" } ], "evolutionRequirements": { "name": "Charmander candies" } }*/
Contributors
Carlos Andrés Marriaga Franco @andres07franco
Feel free to send your pull requests and contribute to this project
License
MIT