{"id":26190059,"url":"https://github.com/zazuko/sparql-proxy","last_synced_at":"2025-04-15T02:09:24.646Z","repository":{"id":57366959,"uuid":"76202660","full_name":"zazuko/sparql-proxy","owner":"zazuko","description":"SPARQL proxy middleware","archived":false,"fork":false,"pushed_at":"2023-09-13T11:57:16.000Z","size":117,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T07:01:21.431Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zazuko.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":"2016-12-11T21:59:02.000Z","updated_at":"2022-11-28T12:43:18.000Z","dependencies_parsed_at":"2024-10-24T07:45:13.230Z","dependency_job_id":"0cb76350-e36b-44a2-9f21-3476e2e6a5d3","html_url":"https://github.com/zazuko/sparql-proxy","commit_stats":{"total_commits":88,"total_committers":4,"mean_commits":22.0,"dds":0.375,"last_synced_commit":"46c17ecdc95970ff94bea7b79a2745247f46402c"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fsparql-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fsparql-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fsparql-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fsparql-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zazuko","download_url":"https://codeload.github.com/zazuko/sparql-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809044,"owners_count":21164896,"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":"2025-03-12T00:52:21.886Z","updated_at":"2025-04-15T02:09:24.619Z","avatar_url":"https://github.com/zazuko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sparql-proxy\n\nThis middleware forwards SPARQL queries to a SPARQL endpoint.\nIt supports GET and POST (direct and URL-encoded) query requests and basic authentication.\n\n## Usage\n\nThe module exports a function to build a middleware.\nThe function must be called with a single options object.\nThe following options are supported:\n\n- `endpointUrl`: The URL of the SPARQL endpoint\n- `authentication`: Credentials for basic authentication (object with `user` and `password` property)\n- `queryOperation`: The query operation which will be used to access the SPARQL endpoint (default: `postQueryDirect`)\n- `fetchOptions`: an object that will be merged (and potentially override) with\n  [node-fetch options](https://github.com/bitinn/node-fetch/blob/bf8b4e8db350ec76dbb9236620f774fcc21b8c12/README.md#options) used for the request from the proxy to the SPARQL endpoint. It can be used to override fetch headers: `fetchOptions.headers`\n- `timeout`: configure a timeout in milliseconds (default value: `20000`)\n- `cache`: configure the cache with the following fields:\n  - `url`: connection string for the Redis instance (`redis://…` or `rediss://…`)\n  - `ttl`: the time a value should be kept in the cache in seconds (default value: `3600`, which is one hour)\n  - `clearAtStartup`: set to `true` to remove all entries in the cache at the start of the proxy (default: `false`)\n  - `disabled`: set to `true` to disable the cache (default: `false`)\n  - `prefix`: set a custom prefix for all entries in Redis (default: `default`)\n\n## Example\n\n```js\n// load the module\nconst sparqlProxy = require('@zazuko/sparql-proxy')\n\n// create a middleware instance and add it to the routing\napp.use(sparqlProxy({\n  endpointUrl: 'https://dbpedia.org/sparql'\n})\n```\n\n## Debug\n\nThis package uses [`debug`](https://www.npmjs.com/package/debug), you can get debug logging via: `DEBUG=sparql-proxy`.\nSince [Trifid](https://github.com/zazuko/trifid) makes heavy use of this package, using `DEBUG=trifid:*` also enables\nlogging in this package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fsparql-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzazuko%2Fsparql-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fsparql-proxy/lists"}