{"id":41857289,"url":"https://github.com/jesshmusic/grafana-example-api","last_synced_at":"2026-01-25T11:03:39.522Z","repository":{"id":305933374,"uuid":"1024421125","full_name":"jesshmusic/grafana-example-api","owner":"jesshmusic","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-22T17:55:44.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-22T19:28:06.515Z","etag":null,"topics":["expressjs","graphql","nodejs","rest-api"],"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/jesshmusic.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":"2025-07-22T17:09:07.000Z","updated_at":"2025-07-22T17:55:47.000Z","dependencies_parsed_at":"2025-07-22T19:28:10.395Z","dependency_job_id":"61db9e85-737a-4557-b753-bb8ceb9ef9aa","html_url":"https://github.com/jesshmusic/grafana-example-api","commit_stats":null,"previous_names":["jesshmusic/grafana-example-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jesshmusic/grafana-example-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesshmusic%2Fgrafana-example-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesshmusic%2Fgrafana-example-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesshmusic%2Fgrafana-example-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesshmusic%2Fgrafana-example-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesshmusic","download_url":"https://codeload.github.com/jesshmusic/grafana-example-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesshmusic%2Fgrafana-example-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["expressjs","graphql","nodejs","rest-api"],"created_at":"2026-01-25T11:03:38.923Z","updated_at":"2026-01-25T11:03:39.515Z","avatar_url":"https://github.com/jesshmusic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product API – GraphQL Example\n\n![GraphQL](https://img.shields.io/badge/API-GraphQL-blueviolet)\n![TypeScript](https://img.shields.io/badge/Language-TypeScript-3178c6?logo=typescript)\n![Node.js](https://img.shields.io/badge/Runtime-Node.js-339933?logo=node.js)\n\nThis is a sample API project built with [Apollo Server](https://www.apollographql.com/docs/apollo-server/) and [GraphQL](https://graphql.org/).\nIt provides a simple `products` API for querying and exploring a product catalog using GraphQL.\n\n\n## Features\n\n* **GraphQL API** for products (query all, query by ID)\n* Built with Apollo Server\n* Sample product data in memory, including:\n   * 30-day `historicalPrices` field on each product for realistic time series testing\n* Ready to use with Apollo Studio, GraphQL Playground, or similar tools\n\n## Data Structure\n\nEach product includes standard metadata (id, title, brand, price, etc.) and a `historicalPrices` field containing 30 daily `{ date, price }` points with randomized variations.\n\n## Getting Started\n\n### Prerequisites\n\n* [Node.js](https://nodejs.org/) (v16 or later recommended)\n* [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/)\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/yourusername/product-api-graphql-example.git\n   cd product-api-graphql-example\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. **Start the server**\n\n   ```bash\n   npm start\n   # or\n   yarn start\n   ```\n\nThe server will start on [http://localhost:8081/](http://localhost:8081/)\n\n### Usage\n\nOnce running, you can open the Apollo Studio sandbox or any GraphQL Playground at [http://localhost:8081/](http://localhost:8081/) to interact with the API.\n\n#### Example GraphQL Query\n\n```graphql\nquery {\n  products {\n    id\n    title\n    price\n    category\n  }\n}\n```\n\n#### Example Response\n\n```json\n{\n  \"data\": {\n    \"products\": [\n      {\n        \"id\": 1,\n        \"title\": \"Test Product\",\n        \"price\": 99.99,\n        \"category\": \"TestCategory\"\n      }\n    ]\n  }\n}\n```\n\n## Scripts\n\n* `npm start` – Start the server\n* `npm run dev` – Start with nodemon for development (if configured)\n\n## Project Structure\n\n* `index.js` or `server.js` – Main entry point\n* `products.js` – Product data\n* `schema.js` – GraphQL schema (if separated)\n\n## 🧪 Testing\n\nThis project uses **Jest** and **ts-jest** for unit and integration testing, with test coverage enforced at the project level.\n\n### Running Tests\n\nInstall all dependencies (including dev dependencies):\n\n```bash\nyarn install\n# or\nnpm install\n```\n\nRun the test suite:\n\n```bash\nyarn test\n# or\nnpm test\n```\n\n### Test Coverage\n\nTo check test coverage and see a detailed report:\n\n```bash\nyarn test:coverage\n# or\nnpm run test:coverage\n```\n\nThe coverage report will be displayed in your terminal and saved to the `coverage/` directory (including HTML format).\n\n\u003e **Note:**  \n\u003e This project maintains high coverage for statements, functions, and lines (80%+), with a slightly lower threshold for branches (55%+) due to some non-critical server and configuration code that is difficult to test.\n\n### Coverage Thresholds\n\nEnforced in `jest.config.js`:\n- **Statements:** 80%\n- **Lines:** 80%\n- **Functions:** 75%\n- **Branches:** 55%\n\nYou can adjust these thresholds to be stricter or more lenient as your project requirements evolve.\n\n### Test Locations\n\nAll test files are located in `src/__tests__/` and follow the pattern `*.test.ts`.\n\n### How to Interpret Results\n\n- **PASS** means all tests in a suite ran successfully.\n- **FAIL** indicates one or more tests need attention.\n- Coverage metrics (`statements`, `branches`, etc.) help track the health of your codebase.\n- For coverage details, see the output in your terminal or open `coverage/lcov-report/index.html` in your browser.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesshmusic%2Fgrafana-example-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesshmusic%2Fgrafana-example-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesshmusic%2Fgrafana-example-api/lists"}