Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flowtype failing on my repo #64

Open
golmansax opened this issue Feb 11, 2019 · 0 comments
Open

Flowtype failing on my repo #64

golmansax opened this issue Feb 11, 2019 · 0 comments

Comments

@golmansax
Copy link
Contributor

Hi, I believe 84b3361#diff-98bf0f0a5018817161c912b3742e1b02R17 should make credentials an optional property in Flow.

See the following Flow error I'm getting in my repo. Happy to submit a pull request if you agree with this change.

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/react-relay-network-layer/lib/middleware/batch.js.flow:162:46

Cannot assign object literal to req because property credentials is missing in object literal [1] but exists in
FetchOpts [2].

     node_modules/react-relay-network-layer/lib/middleware/batch.js.flow
     159│     // $FlowFixMe
     160│     const url = isFunction(opts.batchUrl) ? opts.batchUrl(requestMap) : opts.batchUrl;
     161│
 [1] 162│     const req: RRNLRequestObjectBatchQuery = {
     163│       url,
     164│       relayReqId: `BATCH_QUERY:${ids.join(':')}`,
     165│       relayReqMap: requestMap,
     166│       relayReqType: 'batch-query',
     167│       method: 'POST',
     168│       headers: {
     169│         Accept: '*/*',
     170│         'Content-Type': 'application/json',
     171│       },
     172│       body: `[${ids.map(id => requestMap[id].req.body).join(',')}]`,
     173│     };
     174│
     175│     return next(req)
     176│       .then(batchResponse => {

     node_modules/react-relay-network-layer/lib/definition.js.flow
 [2]  37│ export type RRNLRequestObjectBatchQuery = FetchOpts & {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant