{"id":19440369,"url":"https://github.com/devinit/datahub-api","last_synced_at":"2025-08-19T03:05:06.398Z","repository":{"id":39096249,"uuid":"92938278","full_name":"devinit/datahub-api","owner":"devinit","description":"Graphql server for data-hub v2 application","archived":false,"fork":false,"pushed_at":"2025-08-13T13:44:06.000Z","size":19166,"stargazers_count":2,"open_issues_count":47,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-13T15:41:49.968Z","etag":null,"topics":["apollo","expressjs","graphql","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devinit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-31T11:14:00.000Z","updated_at":"2018-10-23T19:21:49.000Z","dependencies_parsed_at":"2024-03-02T21:20:34.090Z","dependency_job_id":"dbfc2abc-256a-4907-9e5b-495c1264f224","html_url":"https://github.com/devinit/datahub-api","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/devinit/datahub-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fdatahub-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fdatahub-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fdatahub-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fdatahub-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devinit","download_url":"https://codeload.github.com/devinit/datahub-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devinit%2Fdatahub-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271092978,"owners_count":24697915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo","expressjs","graphql","nodejs","typescript"],"created_at":"2024-11-10T15:29:05.089Z","updated_at":"2025-08-19T03:05:06.372Z","avatar_url":"https://github.com/devinit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data hub graphql-server\n\n[![Build Status](https://travis-ci.org/devinit/datahub-api.svg?branch=master)](https://travis-ci.org/devinit/datahub-api)\n[![codecov](https://codecov.io/gh/devinit/datahub-api/branch/master/graph/badge.svg)](https://codecov.io/gh/devinit/datahub-api)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e501f77141774b74979c60d5cfd219ac)](https://www.codacy.com/app/epicallan/datahub-api?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=devinit/datahub-api\u0026amp;utm_campaign=Badge_Grade)\n[![Dependency Status](https://gemnasium.com/badges/github.com/devinit/datahub-api.svg)](https://gemnasium.com/github.com/devinit/datahub-api)\n[![npm version](https://badge.fury.io/js/%40devinit%2Fdatahub-api.svg)](https://badge.fury.io/js/%40devinit%2Fdatahub-api)\n### Graphql server for the data-hub application.\n\nDataware house \u0026 Github CMS integration\n-----\nThis project has a dataware house module thats responsible for getting data from the datawarehouse and merge it with refrence data from a github repo acting as a CMS. \nThe github repo (cms) contains refrence files such as colors, country names etc.\n\nThis data is served over a graphql API.\n\n\nUseful commands:\n----\n    npm run build       - build the library files (Required for start:watch)\n    npm start           - Start the server\n    npm run dev         - Start the server in watchmode (Useful for development)\n    npm test            - run tests once\n    npm run deploy      - will deploy app to now.sh make sure you have the DB access credentials in your system env file eg .bash_profile\n\nHow to run it:\n----\n```bash\n    npm install -g yarn # if you dont have yarn installed\n    yarn # install dependencies\n    ## development mode\n    npm run dev\n    ## run in production\n    npm start\n```\n\n\n\nDevelopment guidelines\n------\n- When you install a new dependency add its types from definetly typed typescript incase it doesnt come with any\n\neg ```  yarn add --dev @types/ramda ```\n- Whenever you change the .gql files run ```npm run gqlToTs``` so that resolvers and type definitions are generated for use in graphql\n\n\nOn data caching\n-----\n\nEvery new instance of this node app starts with a fresh LRUcache which will be populated by items that get requested through the lifecycle of the application.\n\nThe app also persists queries on each data requests and does pre-caching of these queries on app boot.\n\nDuring development; inorder to keep having fresh data, every data request is added to a queue as it gets served from the cache. This queue is ran in the background and updates after an hour of the request with new data if any.\n\n```.cache```  file contains all the queries occuring in the life time of the app. Its in git history so that we can precache those queries on app boot. (TODO: Make this run in another process)\n\nDeployment\n---------\nWe are currently test deploying with now and they freeze inactive normal deployments. In order to create a deployment that's always active consider scaling your deploy\n\n```now scale my-deployment-ntahoeato.now.sh 1```\n\nNotes\n-------\n\n- This repo is published to npm so that we can reuse its types\n- for database access look in the @devinit/graphql/next package\n\n\nTODO\n----------\n\n- [ ] remove console.info \u0026 console.error and replace with function that logs to an info \u0026 error file\n- [ ] fix testing on travis\n- [ ] Make uid immutable for testing purposes\n- [ ] pull in di_id as id in sql queries\n- [ ] Perf: breakdown tabs data fetching function into individual functions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinit%2Fdatahub-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevinit%2Fdatahub-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevinit%2Fdatahub-api/lists"}