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

[v2] improve how we load GraphQL query results in development/production (aka Ludicrous Mode) #4555

Merged
merged 38 commits into from
Apr 6, 2018
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e218c1f
Create placeholder JSON store
m-allanson Mar 15, 2018
0894947
Rename
m-allanson Mar 15, 2018
4ca7dda
Websocket placeholder
m-allanson Mar 15, 2018
cf55f6b
Push query results JSON over websockets
m-allanson Mar 15, 2018
293f36a
More descriptive variable name
m-allanson Mar 16, 2018
7e852cf
Fix queries being overwritten
m-allanson Mar 16, 2018
2adaffe
Remove eslint-disable flag
m-allanson Mar 16, 2018
c03cc34
Remove junk
m-allanson Mar 16, 2018
ca50615
test require error fix for windows
pieh Mar 15, 2018
460ca7d
dont require json data in sync-require
pieh Mar 15, 2018
f4c92e5
dont add layout data to json array multiple times
pieh Mar 16, 2018
e6239ee
initial async loading
pieh Mar 16, 2018
4e064d7
revert saving json directly to public for now
pieh Mar 16, 2018
1801fa7
updated production-app to sync with prop name change in ComponentRend…
pieh Mar 16, 2018
53bc172
we load json data via json-loader component in develop and not handli…
pieh Mar 16, 2018
adc3ce1
hashes for json files
pieh Mar 17, 2018
9008479
fix preloading, use xhr instead of fetch - for some reason can't forc…
pieh Mar 20, 2018
3050620
dont use full paths in dataPath - remove static/d/ path and .json ext…
pieh Mar 21, 2018
46e5235
Merge pull request #4635 from pieh/json-loader
m-allanson Mar 21, 2018
a3b6aee
Enable cached query results to be loaded
m-allanson Mar 22, 2018
66e462c
Don't dump all query results out to the client
m-allanson Mar 26, 2018
8196649
Merge pull request #4658 from m-allanson/load-develop-query-results
m-allanson Mar 26, 2018
7602a73
Merge remote-tracking branch 'upstream/v2' into json-loader-w4
pieh Mar 26, 2018
f0b3b0c
fix preload link to json data
pieh Mar 26, 2018
c268376
Merge remote-tracking branch 'upstream/v2' into json-loader
pieh Mar 28, 2018
2d9e286
remove not used function
pieh Mar 28, 2018
95fcd4a
remove more not used code
pieh Mar 28, 2018
20252dc
Update to latest webpack/mini-css-extract-plugin
KyleAMathews Mar 29, 2018
44797c3
don't write new (a)sync-requires.js if components didn't change (#4759)
pieh Mar 29, 2018
467a792
create just one websocket client (#4763)
pieh Mar 29, 2018
dd442c7
Filter out duplicate query jobs and create secondary queue for jobs i…
KyleAMathews Mar 29, 2018
abcb58c
[json-loader] Don't emit new file node until previous is finished pro…
KyleAMathews Apr 3, 2018
e374818
[json-loader] Only log file events if we're past bootstrap (#4826)
KyleAMathews Apr 3, 2018
62754de
[json-loader] dont recompile on data change - part 2 (#4837)
pieh Apr 5, 2018
4a09f74
[json-loader] develop - reading results from file improvments (#4850)
pieh Apr 5, 2018
868ef8b
Add query prioritization based on what page(s) user(s) are on
KyleAMathews Apr 5, 2018
b4fdecb
Add initial forward slash
KyleAMathews Apr 6, 2018
1bb7cc4
Actually this is how we add back the initial forward slash
KyleAMathews Apr 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/gatsby/cache-dir/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ function shouldUpdateScroll(prevRouterProps, { location: { pathname } }) {
return true
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this moved elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

This removal probably shouldn't be in this PR - this is dead code even in master - https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/root.js#L120 addNotFoundRoute is defined but not used anywhere and so is noMatch after removal of previous function

let noMatch
for (let i = 0; i < pages.length; i++) {
if (/^\/dev-404-page/.test(pages[i].path)) {
noMatch = pages[i]
break
}
}

const navigateTo = to => {
window.___history.push(to)
}
Expand Down