This api provides data like code, isocode, area, population and GDP,though the data is collected from a reliable source its accuracy is not gauranteed.So, watch out and make contribute if neccessary with uptodate data by following the Code Of Conduct.Also, read the to-do to know what are the tasks remaining in the project.
npm install
npm install nodemon --save-dev
npm run start
npm run devStart
"start": "node server.js"
"devStart": "nodemon server.js"
{
getcountries {
id
CountryName
CountryCode
IsoCode
Population
AreaKmSq
GDPUSD
}
}
{
getcountrywid(id: ID) {
id
CountryName
CountryCode
IsoCode
Population
AreaKmSq
GDPUSD
}
}
{
getcountrywname(CountryName:"India") {
id
CountryName
CountryCode
IsoCode
Population
AreaKmSq
GDPUSD
}
}
There are more query types to retrieve different datas, checkout the project or the GraphQL playground for schema and docs.
- Update the project readme
- Switch to GraphiQL Playground
- Change the query by ID to query by country name (Both available)
- Themes (once made available by Graphiql)
If you want to contribute the project,please follow the Contribution Guide and make PR's if necessary
MIT License Copyright (c) 2022 jayantur13
Permission is hereby granted, free of
charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice
(including the next paragraph) shall be included in all copies or substantial
portions of the Software.
** Important - If you are going to use this project, please mention me or the source url. Use this project as reference only **
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.