Comments (1)
// example of the custom inline middleware
next => req => {
return next(req);
}
If you don't want pass request to internal fetch function, do not call next
function. But you should return some promise.
next => req => {
const resultWithPayloadOrError = promiseThatProceedReqViaBuffer(req);
return resultWithPayloadOrError;
}
In promiseThatProceedReqViaBuffer
:
requestList = [];
requestList.push(req.relayReqObj);
// after some tiny period of time, when you collect requests
queriesBatch(relayRequestList, fetchWithMiddleware)
Internally queriesBatch
resolves/rejects all relay queries. But ideally somehow needs to pass resulting promise back to middleware (resultWithPayloadOrError).
from react-relay-network-layer.
Related Issues (20)
- Throwing errors from middleware HOT 5
- batchUrl property of URL middleware is not passed req HOT 4
- Support max batch size HOT 2
- authMiddleware stop working as of 2.0.0! HOT 2
- __dataID__ unknown field HOT 2
- Rendering partial response with error messages HOT 1
- error: Processing of node_modules/react-relay-network-layer/lib/middleware/gqErrors.js failed. SyntaxError: Unexpected token (80:376) HOT 3
- Syntax Error GraphQL request (1:1) Unexpected EOF HOT 1
- Chinese Characters Issue HOT 3
- When will subscriptions be supported? HOT 2
- How to pass data from express req object to the req received by middleware HOT 3
- Relay Modern equivalent? HOT 6
- Redirect to login page and network layer HOT 1
- Token not refreshing after user logs out and login again with different user. HOT 4
- regeneratorRuntime not defined in lib/fetchWithMiddleware.js HOT 2
- Batching: make query id optional HOT 1
- Cannot access response header from middleware HOT 1
- Retry middleware not retrying HOT 8
- One of the sources for assign has an enumerable key on the prototype chain HOT 4
- Flowtype failing on my repo
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 react-relay-network-layer.