{"id":15646432,"url":"https://github.com/martinheidegger/egraphql-fetch","last_synced_at":"2025-03-29T23:17:07.684Z","repository":{"id":57220962,"uuid":"78081550","full_name":"martinheidegger/egraphql-fetch","owner":"martinheidegger","description":"Symmetrically encrypted graphql fetch requests","archived":false,"fork":false,"pushed_at":"2017-01-18T16:51:47.000Z","size":2235,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T17:06:33.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinheidegger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-05T05:12:22.000Z","updated_at":"2018-10-29T13:48:07.000Z","dependencies_parsed_at":"2022-08-29T01:50:52.724Z","dependency_job_id":null,"html_url":"https://github.com/martinheidegger/egraphql-fetch","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fegraphql-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fegraphql-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fegraphql-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fegraphql-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinheidegger","download_url":"https://codeload.github.com/martinheidegger/egraphql-fetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254149,"owners_count":20747949,"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-10-03T12:12:51.397Z","updated_at":"2025-03-29T23:17:07.654Z","avatar_url":"https://github.com/martinheidegger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-fetch [![Build Status](https://travis-ci.org/martinheidegger/egraphql-fetch.svg?branch=master)](https://travis-ci.org/martinheidegger/egraphql-fetch) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\nThin, **symmetrically encrypted**, GraphQL client powered by fetch.\n\n_(Based on the great work of [tjmehta](https://github.com/tjmehta) and compatible with [graphql-fetch](https://github.com/tjmehta/graphql-fetch))_\n\n# Installation\n```bash\nnpm i --save egraphql-fetch\n```\n\n# Usage\n```js\nvar fetch = require('graphql-fetch')(\n  'http://domain.com/graphql',\n  'keyId', //         ... ID for the key (could be user-name)\n  'secretKey', //     ... Secret Key to encrypt the data (could be password)\n  // cipherAlgorithm, ... Cipher algorithm used to encrypt the request (default: aes256)\n  // cipherPad        ... Padding to make traffic guessing harder (defaults: 1024)\n)\n\nvar query = `\n  query q (id: String!) {\n    user(id: $id) {\n      id,\n      email,\n      name\n    }\n  }\n`\nvar queryVars = {\n  id: 'abcdef'\n}\nvar opts = {\n  // custom fetch options\n}\n\n/**\n * @param  {Query} query graphql query\n * @param  {Object} [vars]  graphql query args, optional\n * @param  {Object} [opts]  fetch options, optional\n */\nfetch(query, queryVars, opts).then(function (results) {\n  if (results.errors) {\n    //...\n    return\n  }\n  var user = result.data.user\n  //...\n})\n```\n\n# Notes\n* Uses [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) under the hood, which makes `fetch`, `Headers`, `Request`, and `Response` globally available.\n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinheidegger%2Fegraphql-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinheidegger%2Fegraphql-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinheidegger%2Fegraphql-fetch/lists"}