-
Stand up a mongo instance
Docker:-
docker run -d -p 27017:27017 --name mongoDB -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo:latest
-
Clone this repository
https://github.com/sreehari-aot/falcon-graphene.git
-
Create virtual environment and activate
-
Install dependencies
pip install -r requirements.txt
-
Rename
sample.env
to.env
-
run
python script.py
data should be saved to the database if all the steps are followed as mentioned
-
Starting the application server
- check into
/api
directory - run
python app.py
application server should be up and running by now
- check into
-
Query data with Grapghql
-
countriesQuery - return a list of countries
query { countries { name currencies capital language latlng maps population continents flags postalCode } }
-
countryQuery - take country id as an argument and return details of single country raise error if id is invalid
query { country (id: "{country id}") { name ... } }
-
countriesNearby - take location cocordinates and return list of nearest countries
query { nearby (coordinates: [{lat}, {lng}]) { name ... } }
-
countriesByLanguage - take a language string and return a list of countries speaking that language
query { lang (language: "English") { name ... } }
-
-
Notifications
You must be signed in to change notification settings - Fork 0
sreehari-aot/falcon-graphene
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
imports list of country data from external API and populate mongoDB database. Supports falcon graphql APIs for query
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published