EasyGraphQL / easygraphql-tester

Test GraphQL queries, mutations and schemas on an easy way! 🚀
https://easygraphql.com/docs/easygraphql-tester/overview
MIT License
313 stars 34 forks source link

Run Command and set up #126

Open ravimantra opened 4 years ago

ravimantra commented 4 years ago

I am writing it very first time, having a resolver like

const getCountries = (context) => { const { cookies = {}, traceId } = context; const httpClient = new HttpClient( cookies[OAUTH_ACCESS_TOKEN], true, { TraceId: traceId } );

const url = URL.RESOURCES.SERVICE_URL.GET_COUNTRIES_URL; return httpClient.restService('get', url) .then((response) => { logger.info(response.body) return response.body; }) .catch((error) => { logger.info("Error in getting issue suggestions", JSON.stringify(error)); const { httpDetails:{ statusCode } } = error return { statusCode }; }); };

module.exports = getCountries;

Could you please let me know, what would be best way to write it. I am not able to see the commands in the document to run the test cases.