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

Update examples/with-apollo #15178

Merged
merged 8 commits into from
Jul 15, 2020
Merged

Update examples/with-apollo #15178

merged 8 commits into from
Jul 15, 2020

Conversation

drumm2k
Copy link
Contributor

@drumm2k drumm2k commented Jul 15, 2020

apollo-client 2.6.8 -> 3.0.0

apollo-client 2.6.8 -> 3.0.0
@ijjk ijjk added the examples Issue was opened via the examples template. label Jul 15, 2020
@ijjk
Copy link
Member

ijjk commented Jul 15, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 12.3s 12.7s ⚠️ +392ms
nodeModulesSize 66.5 MB 66.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary drumm2k/next.js canary Change
/ failed reqs 0 0
/ total time (seconds) 2.065 2.098 ⚠️ +0.03
/ avg req/sec 1210.69 1191.85 ⚠️ -18.84
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.275 1.275
/error-in-render avg req/sec 1960.64 1961.18 +0.54
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary drumm2k/next.js canary Change
index.html gzip 954 B 954 B
link.html gzip 960 B 960 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB

Serverless Mode
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 13.6s 13.8s ⚠️ +218ms
nodeModulesSize 66.5 MB 66.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary drumm2k/next.js canary Change
_error.js 882 kB 882 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB
link.js 924 kB 924 kB
routerDirect.js 918 kB 918 kB
withRouter.js 918 kB 918 kB
Overall change 4.53 MB 4.53 MB
Commit: 51e7e9e

apollo-client 2.6.4 -> 3.0.0
@drumm2k
Copy link
Contributor Author

drumm2k commented Jul 15, 2020

Also updated with-apollo-and-redux

@ijjk
Copy link
Member

ijjk commented Jul 15, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 10.8s 10.8s -2ms
nodeModulesSize 66.5 MB 66.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary drumm2k/next.js canary Change
/ failed reqs 0 0
/ total time (seconds) 1.689 1.755 ⚠️ +0.07
/ avg req/sec 1479.83 1424.13 ⚠️ -55.7
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.058 1.051 -0.01
/error-in-render avg req/sec 2363.42 2378.46 +15.04
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary drumm2k/next.js canary Change
index.html gzip 954 B 954 B
link.html gzip 960 B 960 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB

Serverless Mode
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 11.6s 11.7s ⚠️ +134ms
nodeModulesSize 66.5 MB 66.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary drumm2k/next.js canary Change
_error.js 882 kB 882 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB
link.js 924 kB 924 kB
routerDirect.js 918 kB 918 kB
withRouter.js 918 kB 918 kB
Overall change 4.53 MB 4.53 MB
Commit: 376261a

@balazsorban44
Copy link
Member

balazsorban44 commented Jul 15, 2020

As per the migration guide I think you could also remove graphql-tag as a dependency and import it from @apollo/client as well! :)

Just a guess, but same for graphql as well. And cannot ApolloClient also be directly imported from @apollo/client instead of @apollo/client/core? That one might just be a personal preference, so leave it if you disagree, but maybe it could mirror better how in v3 you only need one import to achieve anything.

@drumm2k
Copy link
Contributor Author

drumm2k commented Jul 15, 2020

I could, but gql from graphql-tag is 35.8kb and the gql from @apollo/client is 107.4kb.
I tried to build, seems ~1kb difference with my project, so i changed the import and removed graphql-tag.

Tried to import ApolloClient from @apollo/client and it works, that's nice.
Can't remove graphql though, it is needed.

@ijjk
Copy link
Member

ijjk commented Jul 15, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 13.9s 13.8s -139ms
nodeModulesSize 66.5 MB 66.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary drumm2k/next.js canary Change
/ failed reqs 0 0
/ total time (seconds) 2.408 2.332 -0.08
/ avg req/sec 1038.42 1072.01 +33.59
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.563 1.643 ⚠️ +0.08
/error-in-render avg req/sec 1599.06 1521.47 ⚠️ -77.59
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary drumm2k/next.js canary Change
index.html gzip 954 B 954 B
link.html gzip 962 B 962 B
withRouter.html gzip 948 B 948 B
Overall change 2.86 kB 2.86 kB

Serverless Mode
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 14.7s 14.7s ⚠️ +17ms
nodeModulesSize 66.5 MB 66.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary drumm2k/next.js canary Change
_error.js 882 kB 882 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB
link.js 924 kB 924 kB
routerDirect.js 918 kB 918 kB
withRouter.js 918 kB 918 kB
Overall change 4.53 MB 4.53 MB
Commit: 3dc33e9

Copy link
Member

@lfades lfades left a comment

Choose a reason for hiding this comment

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

@drumm2k LGTM, thank you!

@ijjk
Copy link
Member

ijjk commented Jul 15, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 14.1s 13.8s -318ms
nodeModulesSize 66.5 MB 66.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary drumm2k/next.js canary Change
/ failed reqs 0 0
/ total time (seconds) 2.335 2.392 ⚠️ +0.06
/ avg req/sec 1070.58 1045.28 ⚠️ -25.3
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.528 1.593 ⚠️ +0.06
/error-in-render avg req/sec 1635.81 1569.45 ⚠️ -66.36
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary drumm2k/next.js canary Change
index.html gzip 954 B 954 B
link.html gzip 962 B 962 B
withRouter.html gzip 948 B 948 B
Overall change 2.86 kB 2.86 kB

Serverless Mode
General
vercel/next.js canary drumm2k/next.js canary Change
buildDuration 15.5s 15.6s ⚠️ +94ms
nodeModulesSize 66.5 MB 66.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.js gzip 6.72 kB 6.72 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..cead.js gzip 9.77 kB 9.77 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 56.4 kB 56.4 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary drumm2k/next.js canary Change
main-HASH.module.js gzip 5.8 kB 5.8 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 6.17 kB 6.17 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 51.9 kB 51.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary drumm2k/next.js canary Change
polyfills-HASH.js gzip 26.4 kB 26.4 kB
Overall change 26.4 kB 26.4 kB
Client Build Manifests
vercel/next.js canary drumm2k/next.js canary Change
_buildManifest.js gzip 267 B 267 B
_buildManife..dule.js gzip 273 B 273 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary drumm2k/next.js canary Change
_error.js 882 kB 882 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 882 kB 882 kB
link.js 924 kB 924 kB
routerDirect.js 918 kB 918 kB
withRouter.js 918 kB 918 kB
Overall change 4.53 MB 4.53 MB
Commit: 1b02fa2

@kodiakhq kodiakhq bot merged commit 893e57d into vercel:canary Jul 15, 2020
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants