apollographql/apollo-server
Copy this badge! ↑
HTTPCache
fetches a response from the origin when not cached
HTTPCache.test.ts
HTTPCache
returns a cached response when not expired
HTTPCache.test.ts
HTTPCache
fetches a fresh response from the origin when expired
HTTPCache.test.ts
HTTPCache
overriding TTL
returns a cached response when the overridden TTL is not expired
HTTPCache.test.ts
HTTPCache
overriding TTL
fetches a fresh response from the origin when the overridden TTL expired
HTTPCache.test.ts
HTTPCache
overriding TTL
fetches a fresh response from the origin when the overridden TTL expired even if a longer max-age has been specified
HTTPCache.test.ts
HTTPCache
overriding TTL
does not store a response with an overriden TTL and a non-success status code
HTTPCache.test.ts
HTTPCache
overriding TTL
allows overriding the TTL dynamically
HTTPCache.test.ts
HTTPCache
overriding TTL
allows disabling caching when the TTL is 0 (falsy)
HTTPCache.test.ts
HTTPCache
overriding TTL
allows specifying a custom cache key
HTTPCache.test.ts
HTTPCache
overriding TTL
does not store a response to a non-GET request
HTTPCache.test.ts
HTTPCache
overriding TTL
does not store a response with a non-success status code
HTTPCache.test.ts
HTTPCache
overriding TTL
does not store a response without Cache-Control header
HTTPCache.test.ts
HTTPCache
overriding TTL
does not store a private response
HTTPCache.test.ts
HTTPCache
overriding TTL
returns a cached response when Vary header fields match
HTTPCache.test.ts
HTTPCache
overriding TTL
does not return a cached response when Vary header fields don't match
HTTPCache.test.ts
HTTPCache
overriding TTL
sets the TTL as max-age when the response does not contain revalidation headers
HTTPCache.test.ts
HTTPCache
overriding TTL
sets the TTL as 2 * max-age when the response contains an ETag header
HTTPCache.test.ts
HTTPCache
overriding TTL
revalidates a cached response when expired and returns the cached response when not modified
HTTPCache.test.ts
HTTPCache
overriding TTL
revalidates a cached response when expired and returns and caches a fresh response when modified
HTTPCache.test.ts
HTTPCache
overriding TTL
fetches a response from the origin with a custom fetch function
HTTPCache.test.ts
RESTDataSource
constructing requests
interprets paths relative to the base URL
RESTDataSource.test.ts
RESTDataSource
constructing requests
interprets paths with a leading slash relative to the base URL
RESTDataSource.test.ts
RESTDataSource
constructing requests
adds a trailing slash to the base URL if needed
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows resolving a base URL asynchronously
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows passing in query string parameters
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows setting default query string parameters
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows setting default fetch options
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows setting request headers
RESTDataSource.test.ts
RESTDataSource
constructing requests
serializes a request body that is an object as JSON
RESTDataSource.test.ts
RESTDataSource
constructing requests
serializes a request body that is an array as JSON
RESTDataSource.test.ts
RESTDataSource
constructing requests
serializes a request body that has a toJSON method as JSON
RESTDataSource.test.ts
RESTDataSource
constructing requests
does not serialize a request body that is not an object
RESTDataSource.test.ts
RESTDataSource
constructing requests
allows performing requests
RESTDataSource.test.ts
RESTDataSource
response parsing
returns data as parsed JSON when Content-Type is application/json
RESTDataSource.test.ts
RESTDataSource
response parsing
returns data as parsed JSON when Content-Type is application/hal+json
RESTDataSource.test.ts
RESTDataSource
response parsing
returns data as parsed JSON when Content-Type ends in +json
RESTDataSource.test.ts
RESTDataSource
response parsing
returns data as a string when Content-Type is text/plain
RESTDataSource.test.ts
RESTDataSource
response parsing
attempts to return data as a string when no Content-Type header is returned
RESTDataSource.test.ts
RESTDataSource
response parsing
returns data as a string when response status code is 204 no content
RESTDataSource.test.ts
RESTDataSource
response parsing
returns empty object when response content length is 0
RESTDataSource.test.ts
RESTDataSource
memoization
deduplicates requests with the same cache key
RESTDataSource.test.ts
RESTDataSource
memoization
does not deduplicate requests with a different cache key
RESTDataSource.test.ts
RESTDataSource
memoization
does not deduplicate non-GET requests
RESTDataSource.test.ts
RESTDataSource
memoization
non-GET request removes memoized request with the same cache key
RESTDataSource.test.ts
RESTDataSource
memoization
allows specifying a custom cache key
RESTDataSource.test.ts
RESTDataSource
error handling
throws an AuthenticationError when the response status is 401
RESTDataSource.test.ts
RESTDataSource
error handling
throws a ForbiddenError when the response status is 403
RESTDataSource.test.ts
RESTDataSource
error handling
throws an ApolloError when the response status is 500
RESTDataSource.test.ts
RESTDataSource
error handling
puts JSON error responses on the error as an object
RESTDataSource.test.ts
Load More