This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssr false queries still being called on server (#3515)
* ssr false queries still being called on server * add test for this usecase * my added test was not adding any value, because the test is not testing the query being executed or not since that is happening in the startQuerySubscription part * Fully disable SSR when using `ssr: false` and `ssrMode: true` When `ssrMode` is `true`, Apollo Client's `disableNetworkFetches` is `true`, meaning we want all network fetches to be disabled. Right now `ssr: false` doesn't take `disableNetworkFetches` into consideration, but with these changes it will. So with these changes: - If `ssr: false` is set and we're coming from a React SSR `getDataFromTree` or `getMarkupFromTree` call (`treeRenderingInitiated` is `true`), we return a default SSR loading state to prevent the running of any subsequent queries in the same render. - If `ssr: false` is set and we've disabled network fetching (`ssrMode` is `true`), we return a default SSR loading state to prevent the running of any subsequent queries in the same render. * Prep for beta publish * Publish - [email protected] - @apollo/[email protected] - @apollo/[email protected] - @apollo/[email protected] - @apollo/[email protected] - @apollo/[email protected] - @apollo/[email protected] * Changelog updates
- Loading branch information
Showing
16 changed files
with
141 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "react-apollo", | ||
"description": "React Apollo Hooks, Components, and HOC.", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -30,7 +30,7 @@ | |
"build": "npx tsc -p ./config", | ||
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish" | ||
"deploy": "npm publish --tag beta" | ||
}, | ||
"peerDependencies": { | ||
"@types/react": "^16.8.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@apollo/react-common", | ||
"description": "React Apollo common utilities.", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -25,7 +25,7 @@ | |
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"watch": "npx tsc-watch --onSuccess \"npm run postbuild\" -p ./config", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish", | ||
"deploy": "npm publish --tag beta", | ||
"test": "npx jest --config ../../config/jest.config.js --testPathPattern packages/common", | ||
"test:watch": "npx jest --config ../../config/jest.config.js --testPathPattern packages/common --watch", | ||
"test:cjs": "npm run build && npx jest --config ../../config/jest.cjs.config.js --testPathPattern packages/common", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@apollo/react-components", | ||
"description": "React Apollo Query, Mutation and Subscription components.", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -29,7 +29,7 @@ | |
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"watch": "npx tsc-watch --onSuccess \"npm run postbuild\" -p ./config", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish", | ||
"deploy": "npm publish --tag beta", | ||
"test": "npx jest --config ../../config/jest.config.js --testPathPattern packages/components", | ||
"test:watch": "npx jest --config ../../config/jest.config.js --testPathPattern packages/components --watch", | ||
"test:cjs": "npm run build && npx jest --config ../../config/jest.cjs.config.js --testPathPattern packages/components", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@apollo/react-hoc", | ||
"description": "React Apollo `graphql` higher-order component.", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -29,7 +29,7 @@ | |
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"watch": "npx tsc-watch --onSuccess \"npm run postbuild\" -p ./config", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish", | ||
"deploy": "npm publish --tag beta", | ||
"test": "npx jest --config ../../config/jest.config.js --testPathPattern packages/hoc", | ||
"test:watch": "npx jest --config ../../config/jest.config.js --testPathPattern packages/hoc --watch", | ||
"test:cjs": "npm run build && npx jest --config ../../config/jest.cjs.config.js --testPathPattern packages/hoc", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@apollo/react-hooks", | ||
"description": "React Apollo Hooks.", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -29,7 +29,7 @@ | |
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"watch": "npx tsc-watch --onSuccess \"npm run postbuild\" -p ./config", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish", | ||
"deploy": "npm publish --tag beta", | ||
"test": "npx jest --config ../../config/jest.config.js --testPathPattern packages/hooks", | ||
"test:watch": "npx jest --config ../../config/jest.config.js --testPathPattern packages/hooks --watch", | ||
"test:cjs": "npm run build && npx jest --config ../../config/jest.cjs.config.js --testPathPattern packages/hooks", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@apollo/react-ssr", | ||
"description": "React Apollo server-side rendering utilities", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"author": "[email protected]", | ||
"keywords": [ | ||
"apollo", | ||
|
@@ -29,7 +29,7 @@ | |
"postbuild": "npx rollup -c ./config/rollup.config.js", | ||
"watch": "npx tsc-watch --onSuccess \"npm run postbuild\" -p ./config", | ||
"predeploy": "npm run build", | ||
"deploy": "npm publish", | ||
"deploy": "npm publish --tag beta", | ||
"test": "npx jest --config ../../config/jest.config.js --testPathPattern packages/ssr", | ||
"test:watch": "npx jest --config ../../config/jest.config.js --testPathPattern packages/ssr --watch", | ||
"test:cjs": "npm run build && npx jest --config ../../config/jest.cjs.config.js --testPathPattern packages/ssr", | ||
|
Oops, something went wrong.