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

0.9.0 (4) - Add integration test for vitejs + streaming #198

Merged
merged 55 commits into from
Mar 6, 2024

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Feb 16, 2024

This adds an integration test that demonstrates how to use Apollo Client with streaming SSR in Vite.

@phryneas phryneas force-pushed the pr/split-packages branch 2 times, most recently from 4c5565e to fb2bc7e Compare February 19, 2024 11:41
Base automatically changed from pr/split-packages to main February 19, 2024 12:55
@phryneas phryneas force-pushed the pr/integration-tests branch 2 times, most recently from e6316e8 to 5cbb230 Compare February 19, 2024 17:48
@phryneas phryneas added this to the 0.9.0 milestone Feb 27, 2024
@phryneas phryneas marked this pull request as ready for review February 29, 2024 13:53
@phryneas phryneas requested a review from a team as a code owner February 29, 2024 13:53
Base automatically changed from pr/integration-test-experimental to main March 5, 2024 10:05
Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of this contains code from the other base branches so I limited my review to the integration-tests/vite-streaming directly. Let me know if I missed something!

let vite;
let bootstrapModules = [];
let assets = [];
console.log({ isProduction });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log({ isProduction });

"express": "^4.18.2",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"react": "npm:@phryneas/experimental-react@0.0.0-phryneas-a1c625c",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this version still needed in the vite tests? Makes sense for the experimental tests, but wasn't sure about this one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you!

@phryneas phryneas merged commit 80aec32 into main Mar 6, 2024
12 checks passed
phryneas added a commit that referenced this pull request Mar 6, 2024
* add a "jest" integration test

* split up into "sub-monorepo"

* more logs

* move around monorepo link

* build deps first

* allow updating checksum

* ignore checksums in integration tests

* mark pattern

* call for linux, not osx

* rename test runs

* fixup

* 0.9.0 (4) -  Add integration test for vitejs + streaming (#198)

* rename wrapped classes to original name, also export in RSC

* fix up test

* fixup build types

* comment shape

* adjust type resolution

* fixup

* adjust package shapes

* bundling adjustment: no `/index.js` in CJS

* check "package shapes"

* revert changes to examples/integration tests

* reset README changes

* add description to helper scripts

* wrap hook functionality from ApolloClient instance

* move wrappers to `QueryManager`

* update version

* remove hook exports from `@apollo/client-react-streaming`

* run test-bundle in CI

* drop hook exports

* move "integration-test" into "integration-test/nextjs"

* initialize basic vite react-ssr project

* apply prettier

* [WIP] try to set up a streaming server

* fix hydration, force faster flush

* experimental-react demo working

* add delay

* also works with prod build

* update lockfile

* global react version

* simplify a bit

* move experimental detail out to `WrappedApolloProvider`

* adjustments

* remove `@apollo/client-react-streaming/experimental-react-transport`

* alternative installation

* alternative approach

* fix non-failing tests

* fix bug that prevented rerunning hydrated queries if initialized too late

* adjust script

* more packaging foo

* fixup app rendering

* playwright test

* split up

* copy experimental to vite-streaming

* adjust types

* remove `Writable` from experimental example

* vite-streaming

* remove insertions after last flush

* add pipeTrough

* learnings from experimental-react

* add steps to workflow

* build only libraries in test preparation

* review feedback

* small fixup

* Update integration-test/jest/package.json

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>

* Update integration-test/jest/src/App.jsx

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
phryneas added a commit that referenced this pull request Mar 6, 2024
* add a "jest" integration test

* split up into "sub-monorepo"

* more logs

* move around monorepo link

* build deps first

* allow updating checksum

* ignore checksums in integration tests

* mark pattern

* call for linux, not osx

* rename test runs

* fixup

* 0.9.0 (4) -  Add integration test for vitejs + streaming (#198)

* rename wrapped classes to original name, also export in RSC

* fix up test

* fixup build types

* comment shape

* adjust type resolution

* fixup

* adjust package shapes

* bundling adjustment: no `/index.js` in CJS

* check "package shapes"

* revert changes to examples/integration tests

* reset README changes

* add description to helper scripts

* wrap hook functionality from ApolloClient instance

* move wrappers to `QueryManager`

* update version

* remove hook exports from `@apollo/client-react-streaming`

* run test-bundle in CI

* drop hook exports

* move "integration-test" into "integration-test/nextjs"

* initialize basic vite react-ssr project

* apply prettier

* [WIP] try to set up a streaming server

* fix hydration, force faster flush

* experimental-react demo working

* add delay

* also works with prod build

* update lockfile

* global react version

* simplify a bit

* move experimental detail out to `WrappedApolloProvider`

* adjustments

* remove `@apollo/client-react-streaming/experimental-react-transport`

* alternative installation

* alternative approach

* fix non-failing tests

* fix bug that prevented rerunning hydrated queries if initialized too late

* adjust script

* more packaging foo

* fixup app rendering

* playwright test

* split up

* copy experimental to vite-streaming

* adjust types

* remove `Writable` from experimental example

* vite-streaming

* remove insertions after last flush

* add pipeTrough

* learnings from experimental-react

* add steps to workflow

* build only libraries in test preparation

* review feedback

* small fixup

* Update integration-test/jest/package.json

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>

* Update integration-test/jest/src/App.jsx

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
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

Successfully merging this pull request may close these issues.

2 participants