{"id":22533541,"url":"https://github.com/vectormike/graphql_calculator","last_synced_at":"2025-03-28T05:43:13.153Z","repository":{"id":101868343,"uuid":"581768922","full_name":"Vectormike/graphql_calculator","owner":"Vectormike","description":"A GraphQL Calculator","archived":false,"fork":false,"pushed_at":"2022-12-24T12:43:25.000Z","size":525,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T06:41:28.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Vectormike.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}},"created_at":"2022-12-24T08:59:40.000Z","updated_at":"2023-03-17T13:34:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"130d2f82-9741-478c-ab04-bd7c4b3208b5","html_url":"https://github.com/Vectormike/graphql_calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectormike%2Fgraphql_calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectormike%2Fgraphql_calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectormike%2Fgraphql_calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vectormike%2Fgraphql_calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vectormike","download_url":"https://codeload.github.com/Vectormike/graphql_calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978231,"owners_count":20703677,"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","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":[],"created_at":"2024-12-07T09:08:39.156Z","updated_at":"2025-03-28T05:43:13.147Z","avatar_url":"https://github.com/Vectormike.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GraphQL Calculator Service\n\nThis service provides a GraphQL API for performing mathematical operations.\n\nRequirements\n\n- Node.js 10+\n- npm 6+\n\n### Installation\n\nClone this repository and install the dependencies:\n\n```bash\ngit clone https://github.com/Vectormike/graphql_calculator.git calculator-service\ncd calculator-service\nnpm install\n```\n\n### Running the server\n\n```\ncp .env.example .env\n\n# open .env and modify the environment variables (if needed)\n```\n\n```\nnpm start\n```\n\nTo run in development:\n\n```\nnpm run dev\n```\n\nThe server will be running at http://localhost:9000/\n\nSandbox: [http://localhost:9000/graphql]()\n\n### Usage\n\nTo use the service, you can send GraphQL queries and mutations to the /graphql endpoint using a tool like cURL or the [GraphQL Playground](https://github.com/graphql/graphql-playground).\n\nAPI\nThe API exposes the following GraphQL queries:\n\n- `addition(a: Float!, b: Float!): Float!`: Performs the addition of two numbers.\n\n- `subtraction(a: Float!, b: Int!): Float!`: Performs the subtraction of two numbers.\n\n- `multiplication(a: Float!, b: Float!): Float!`: Performs the multiplication of two numbers.\n\n- `division(a: Float!, b: Float!): Float!`: Performs the division of two numbers.\n\n### Examples\n\n```\nquery {\n  addition(a: 2, b: 3)\n}\n```\n\n```\n{\n  \"data\": {\n    \"addition\": 5\n  }\n}\n```\n\n```\nquery {\n  subtraction(a: 5, b: 3)\n}\n```\n\n```\n{\n  \"data\": {\n    \"subtraction\": 2\n  }\n}\n```\n\n```\nquery {\n  multiplication(a: 5, b: 3)\n}\n```\n\n```\n{\n  \"data\": {\n    \"multiplication\": 15\n  }\n}\n```\n\n```\nquery {\n  division(a: 6, b: 3)\n}\n```\n\n```\n{\n  \"data\": {\n    \"division\": 2\n  }\n}\n```\n\n### Testing\n\nTo run the tests:\n\n```\nnpm test\n```\n\n### Sample Query\n\nBelow is a sample query from sandbox\n\n![](./sample.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectormike%2Fgraphql_calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectormike%2Fgraphql_calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectormike%2Fgraphql_calculator/lists"}