Comments (1)
@iam1me sorry about the docs discrepancy, we did some major version work on main
so they were out of sync. We just released v5 of the @apollo/datasource-rest
package yesterday (which made the fetch
method public) so you should be able to use that now and the docs are all up-to-date (both in the README here and on our docs site).
I think what you're looking for is how to set status codes from your resolvers, which is an Apollo Server problem more than it is a data source problem. Let me know if this is what you're looking for.
https://www.apollographql.com/docs/apollo-server/data/errors#setting-http-status-code-and-headers
I'm going to close this issue since I think it's not a data source concern, but happy to continue to triage with you here and re-open if we establish a different understanding of the issue that makes it a data source problem.
from datasource-rest.
Related Issues (20)
- Document `contextValue` recipe for circular references in context object
- Posting FormData as body (for file uploads) not possible anymore HOT 7
- Forward all cache options to key value cache HOT 6
- Unable to connect to Localhost server HOT 1
- @apollo/datasource-rest willSendRequest param type missing `agent` HOT 7
- Feature request: More control over readResponseAndWriteToCache method HOT 4
- Why the introduction of response.clone() in HTTPCache class? HOT 4
- Refine `Content-Type` negotiation
- Add url as an argument to the RESTDataSource.didEncounterError() function
- Make errorFromResponse parameters optional
- Parse blob data HOT 1
- RequestDeduplicationPolicy is not exported in datasource-rest index.ts
- Fix CacheOptions Related Types HOT 1
- Typescript project build failing due to missing type declarations HOT 1
- Unable to prevent reading from the Cache HOT 3
- Question about cacheOptions HOT 1
- 304 throws if last-modified doesn't match across requests
- HELP: Proper way to set http proxy HOT 1
- "DeprecationWarning: The `punycode` module is deprecated." in Node 22 HOT 2
- JSON body is not parsed when Content-Type contains a charset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasource-rest.