{"library":"apollo-datasource-http","type":"library","category":null,"description":"apollo-datasource-http is an optimized HTTP data source for Apollo Server, designed to enhance performance when fetching JSON data from REST APIs. Currently at version 0.21.0, it is actively developed with a frequent release cadence, though it explicitly warns that releases are pre-1.0 and may introduce breaking changes. Its key differentiators include leveraging the high-performance Undici HTTP client (claiming up to 60% faster than `apollo-datasource-rest`), integrated request deduplication via LRU caching, configurable request caching with TTL, and `stale-if-error` capabilities. It also supports `AbortController` for manual request cancellation and integrates with Apollo Cache Storage backends for advanced caching strategies. This data source aims to provide a robust and efficient solution for connecting Apollo Server to external HTTP services, offering fine-grained control over request lifecycle and caching behavior through a hook-based API.","language":"javascript","status":"active","version":"0.21.0","tags":["javascript","apollo","data-source","rest","json","graphql","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install apollo-datasource-http","imports":["import { HTTPDataSource } from 'apollo-datasource-http'","import { Pool } from 'undici'"]},{"cmd":"yarn add apollo-datasource-http","imports":[]},{"cmd":"pnpm add apollo-datasource-http","imports":[]}],"homepage":"https://www.apollographql.com/docs/apollo-server/data/http-data-source/","github":"https://github.com/StarpTech/apollo-datasource-http","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/apollo-datasource-http","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/apollo-datasource-http/compatibility"}}