{"id":20407826,"url":"https://github.com/restorando/simple-graphql-client","last_synced_at":"2026-05-09T08:04:11.575Z","repository":{"id":70323996,"uuid":"79156161","full_name":"restorando/simple-graphql-client","owner":"restorando","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-16T20:24:31.000Z","size":2,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-05T02:32:14.358Z","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/restorando.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":"2017-01-16T20:22:10.000Z","updated_at":"2019-01-19T16:32:48.000Z","dependencies_parsed_at":"2023-03-03T11:00:30.569Z","dependency_job_id":null,"html_url":"https://github.com/restorando/simple-graphql-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/restorando/simple-graphql-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restorando%2Fsimple-graphql-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restorando%2Fsimple-graphql-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restorando%2Fsimple-graphql-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restorando%2Fsimple-graphql-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restorando","download_url":"https://codeload.github.com/restorando/simple-graphql-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restorando%2Fsimple-graphql-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32811662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":[],"created_at":"2024-11-15T05:26:26.614Z","updated_at":"2026-05-09T08:04:11.534Z","avatar_url":"https://github.com/restorando.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple GraphQL Client\nSimple, zero dependencies GraphQL client for the Web and Node.js\n\n## How to install\n```\nnpm install --save simple-graphql-client\n```\n\n## Polyfills\nAltough `simple-graphql-client` has no dependencies, it need `fetch` and `Promise` functions in the global scope to work.\n\n## Sample usage\n\n### ES5:\n```js\nvar client = require('simple-graphql-client')\nvar query = client('http://localhost:3000/graphql')\nquery('query($id: String!) { someEntity(id: $id) { prop } }', { id: 'stuff' })\n.then(function (response) {\n  console.log(response.someEntity.prop)\n})\n```\n\n### ES2015:\n```js\nimport client from 'simple-graphql-client'\n\nconst query = client('http://localhost:3000/graphql')\nquery(`\n  query($id: String!) {\n    someEntity(id: $id) {\n      prop\n    }\n  }\n`, { id: 'stuff' })\n.then(response =\u003e console.log(response.someEntity.prop))\n```\n\n### ES7\n```js\nimport client from 'simple-graphql-client'\n\nconst query = client('http://localhost:3000/graphql')\nconst response = await query(`\n  query($id: String!) {\n    someEntity(id: $id) {\n      prop\n    }\n  }\n`, { id: 'stuff' })\n\nconsole.log(response.someEntity.prop)\n```\n\n## Syntax\n### `client`\n`client(url, [options])`\n\n* `url`: String, required. The URL of the GraphQL server.\n* `options`: Object, optional.\n  * `headers`: Object, optional. An object with the headers that will be passed to the server.\n\n### `query`\n`query(query, variables)`\n\n* `query`: String, required. A valid GraphQL query.\n* `variables`: Object, optinal. An object with the variables that will be passed in the query.\n\n## Contributing\nIf you find an error, create an issue or submit a PR with the fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestorando%2Fsimple-graphql-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestorando%2Fsimple-graphql-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestorando%2Fsimple-graphql-client/lists"}