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

[WIP]: feat(gatsby): use lokijs for in-memory database #9338

Closed
wants to merge 35 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
64a7149
Added query benchmark
Moocar Oct 4, 2018
ae5de27
Merge branch 'query-benchmark' into integrate-loki
Moocar Oct 19, 2018
4da734d
draft of new run-query
Moocar Oct 19, 2018
0fe2778
added query-sift.js
Moocar Oct 19, 2018
361bb82
move page dependency tracking into build-node-types
Moocar Oct 19, 2018
5364fc5
clean up
Moocar Oct 19, 2018
9e99174
add promise to query-loki
Moocar Oct 19, 2018
409c029
Replaced redux nodes with loki
Moocar Oct 19, 2018
8438bad
create indexes for each field
Moocar Oct 19, 2018
8303810
Dynamically create pages across generated types
Moocar Oct 20, 2018
0172556
update recordings
Moocar Oct 20, 2018
997b826
Merge branch 'query-benchmark' into integrate-loki
Moocar Oct 20, 2018
93f9d91
fix build-node-connections
Moocar Oct 20, 2018
a21efee
make plugin ids unique
Moocar Oct 20, 2018
93c60f7
added tests to loki
Moocar Oct 20, 2018
d3dc9be
getNodesByType
Moocar Oct 21, 2018
d2d9353
format graphql query
Moocar Oct 23, 2018
dd7e631
recordings
Moocar Oct 23, 2018
e9bcfb4
Merge branch 'master' into integrate-loki
Moocar Oct 23, 2018
968ef2b
Added persistence
Moocar Oct 23, 2018
75dae87
linter fixes
Moocar Oct 23, 2018
79a5685
query benchmark PR udpates
Moocar Oct 23, 2018
62aee97
docs
Moocar Oct 23, 2018
ac97c30
docs
Moocar Oct 23, 2018
e936d0e
plugin-fields.js and move fns to db/index
Moocar Oct 23, 2018
d1be8e8
docs
Moocar Oct 23, 2018
9aae188
docs
Moocar Oct 24, 2018
feb0e1b
handle firstOnly
Moocar Oct 24, 2018
1eab83f
docs
Moocar Oct 24, 2018
443b169
fixed
Moocar Oct 24, 2018
059b485
remove loki fs adapter
Moocar Oct 24, 2018
760817e
benchmark machine
Moocar Oct 24, 2018
187adb9
remove unused fn
Moocar Oct 24, 2018
be39c66
only track loki nodes once db is loaded
Moocar Oct 24, 2018
0ec21f7
Merge branch 'master' into integrate-loki
Moocar Oct 25, 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
Prev Previous commit
Next Next commit
add promise to query-loki
  • Loading branch information
Moocar committed Oct 19, 2018
commit 9e991748b5ab7cc33f5eb8c931092bb221e3c025
5 changes: 3 additions & 2 deletions packages/gatsby/src/schema/query-loki.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const _ = require(`lodash`)
const Promise = require(`bluebird`)
const { db } = require(`../db`)

// Takes a raw graphql filter and converts it into a mongo-like args
Expand Down Expand Up @@ -152,7 +153,7 @@ module.exports = ({ type, rawGqlArgs }) => {

const coll = db.getCollection(type.name)

const lokiResult = execLokiQuery(coll, lokiArgs, gqlArgs)
const result = execLokiQuery(coll, lokiArgs, gqlArgs)

return lokiResult
return Promise.resolve(result)
}