Skip to content

Commit

Permalink
feat!: Support Relay v8.x (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
taion authored Dec 20, 2019
1 parent 34bff51 commit c0daccb
Show file tree
Hide file tree
Showing 3 changed files with 906 additions and 933 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@
"peerDependencies": {
"found": ">=0.3.21",
"react": ">=16.9.0",
"react-relay": ">=6.0.0",
"relay-runtime": ">=6.0.0"
"react-relay": ">=8.0.0",
"relay-runtime": ">=8.0.0"
},
"devDependencies": {
"@4c/babel-preset": "^7.2.4",
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
"@babel/node": "^7.7.4",
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/node": "^7.7.7",
"babel-jest": "^24.9.0",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-relay": "^7.1.0",
"babel-plugin-relay": "^8.0.0",
"codecov": "^3.6.1",
"delay": "^4.3.0",
"doctoc": "^1.4.0",
Expand All @@ -112,10 +112,10 @@
"prettier": "^1.19.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-relay": "^7.1.0",
"relay-compiler": "^7.1.0",
"react-relay": "^8.0.0",
"relay-compiler": "^8.0.0",
"relay-local-schema": "^0.8.0",
"relay-runtime": "^7.1.0",
"relay-runtime": "^8.0.0",
"rimraf": "^3.0.0"
}
}
4 changes: 2 additions & 2 deletions src/QuerySubscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class QuerySubscription {
!this.retrying &&
(this.fetchPolicy === 'store-and-network' ||
this.fetchPolicy === 'store-or-network') &&
this.environment.check(this.operation.root);
this.environment.check(this.operation) === 'available';

if (!(this.fetchPolicy === 'store-or-network' && useStoreSnapshot)) {
try {
Expand Down Expand Up @@ -151,7 +151,7 @@ export default class QuerySubscription {
};

retain() {
return this.environment.retain(this.operation.root);
return this.environment.retain(this.operation);
}

dispose() {
Expand Down
Loading

0 comments on commit c0daccb

Please sign in to comment.