Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Add ignoreOperations to not persist specific operations #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

declanelcocks
Copy link

@declanelcocks declanelcocks commented Sep 6, 2018

What does it do? Allows ignoreOperations to specify an array of operations to ignore when persisting requests.

Why? I came across an issue #12 with persisted queries and apollo-upload-client where the retried file upload would not include the files from the original request.

There were some ideas thrown around here, but with no concrete solution. As the author pointed out, the issue comes from the fact that the library mutates the operation and the retry request does not have the correct payload.

Since this issue appeared to be unique to uploading files like this, I chose to add ignoreOperations to specify an Array of operations to ignore.

Let me know if there's any improvements to be made, or if my approach is not worthwhile.

@ghost ghost added the feature Feature: new addition or enhancement to existing solutions label Sep 6, 2018
@apollo-cla
Copy link

@declanelcocks: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@ghost ghost added the feature Feature: new addition or enhancement to existing solutions label Sep 6, 2018
…y of operations to ignore when persisting requests
@codecov-io
Copy link

codecov-io commented Sep 6, 2018

Codecov Report

Merging #22 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage   98.76%   98.75%   -0.02%     
==========================================
  Files           2        2              
  Lines          81       80       -1     
  Branches       23       19       -4     
==========================================
- Hits           80       79       -1     
  Misses          1        1
Impacted Files Coverage Δ
src/index.ts 98.73% <100%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 974edc3...8857e6d. Read the comment docs.

@declanelcocks
Copy link
Author

Not sure on why Travis is failing as the failed build is not a result of my changes. It appears to be a result of some of the current tests timing out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature: new addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants