0.6.3 • Published 5 years ago

geoquery v0.6.3

Weekly downloads
92
License
-
Repository
-
Last release
5 years ago

Geoquery

Geoquery is a geographical data serving services written in Node.js and graphQL

Build Status codecov Maintainability

Intro

Geoquery serves Geographical data from static JSON files located in the geoquery/server/geo-data directory of the project. On first time of starting the server the JSON data is read into memory and subsequent request are served from the memory.

Getting Started

$ npm i geoquery
#Opens web browser to inspect request
npm run demo

Send GET request Request

const geoquery = require('geoquery');

const query = `{
  countries(continent : "Asia" ) {
    names
    countries
  },
  country(id: "Nigeria", mode: "name"){
    phone
    continent
    capital
  }
  continents
}`;

geoquery(query).then((result) => {
  console.log(result);
});

Result:

{
  data:{
    countries {
      /* countries coming in next release */
      names    : ["China", "Iraq", "Japan", ...],
      countries: []
    },
    country {
      phone    : 234,
      continent: "Africa",
      capital  : "Abuja"
  }
   countinents:[ Africa, Europe, Asia, North_America,
                 South_America, Australia, Antarctica ]
}
}

About

Authors

Technology

Credit

  • @rancheta Hosted original Geographical JSON data

Changelog