sejr / firegraph Goto Github PK
View Code? Open in Web Editor NEWGraphQL Superpowers for Google Cloud Firestore
License: MIT License
GraphQL Superpowers for Google Cloud Firestore
License: MIT License
Not exactly sure what's causing the tests to prevent from exiting successfully. The --debugOpenHandlers
flag seems to be pretty useless too unfortunately.
We can greatly improve the performance of Firestore queries by caching results inside individual firegraph#resolve
calls.
In addition to the performance benefit, this also:
firegraph#resolve
remains consistent across all docs in response, even if another query modifies that data before your query completesNot exactly sure what is causing this because we are able to retrieve results successfully. However, it is very frustrating.
_neq
_gt
_gte
_lt
_lte
_in
was renamed to _contains
It will be very cool to get this working with GraphQL subscription syntax.
Installation fails when npm tries to compile native binaries for grpc, which must be a dependency somewhere in the dependency chain.
This is the error:
โฐโโค yarn add firegraph
yarn add v1.22.15
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
warning firegraph > firebase > @firebase/polyfill > [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning firegraph > firebase > @firebase/firestore > [email protected]: This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead.
warning firegraph > firebase > @firebase/firestore > grpc > [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
warning "bootstrap-vue > [email protected]" has unmet peer dependency "vue@^2.5.18".
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "consola@*".
warning " > [email protected]" has unmet peer dependency "vue@^2.6.11".
warning " > [email protected]" has unmet peer dependency "eslint@>=3.14.1".
warning " > [email protected]" has unmet peer dependency "eslint@>=5.0.0".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/database > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/auth > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/auth > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/firestore > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/performance > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/storage > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/storage > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/messaging > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
warning "firegraph > firebase > @firebase/performance > @firebase/installations > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
[4/4] Building fresh packages...
error /home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments:
Directory: /home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp info check checked for "/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc/grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v93-linux-x64-glibc.tar.gz
node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v93-linux-x64-glibc.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v93-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v93-linux-x64-glibc.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.10.0 found at "/home/k/prj/videosdb/backend/.venv/bin/python3"
gyp info spawn /home/k/prj/videosdb/backend/.venv/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/k/.cache/node-gyp/16.13.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/k/.cache/node-gyp/16.13.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/k/.cache/node-gyp/16.13.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/build'
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_trace.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channelz_registry.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/status_util.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression_internal.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/message_compress.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_gzip.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_identity.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats_data.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/format_request.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/httpcli.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/parser.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/buffer_list.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/call_combiner.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/combiner.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_posix.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_uv.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_windows.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/error.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epoll1_linux.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epollex_linux.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_poll_posix.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_posix.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_windows.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/exec_ctx.o
../deps/grpc/src/core/lib/iomgr/exec_ctx.cc:68:11: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
~ ^~~~~~~~~~~~~~~~~~~~~~
../deps/grpc/src/core/lib/iomgr/exec_ctx.h:35:32: note: expanded from macro 'GRPC_MILLIS_INF_FUTURE'
#define GRPC_MILLIS_INF_FUTURE INT64_MAX
^~~~~~~~~
/usr/include/stdint.h:124:22: note: expanded from macro 'INT64_MAX'
# define INT64_MAX (__INT64_C(9223372036854775807))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:106:24: note: expanded from macro '__INT64_C'
# define __INT64_C(c) c ## L
^~~~~~
<scratch space>:272:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
../deps/grpc/src/core/lib/iomgr/exec_ctx.cc:79:11: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
~ ^~~~~~~~~~~~~~~~~~~~~~
../deps/grpc/src/core/lib/iomgr/exec_ctx.h:35:32: note: expanded from macro 'GRPC_MILLIS_INF_FUTURE'
#define GRPC_MILLIS_INF_FUTURE INT64_MAX
^~~~~~~~~
/usr/include/stdint.h:124:22: note: expanded from macro 'INT64_MAX'
# define INT64_MAX (__INT64_C(9223372036854775807))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:106:24: note: expanded from macro '__INT64_C'
# define __INT64_C(c) c ## L
^~~~~~
<scratch space>:274:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [grpc.target.mk:498: Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/exec_ctx.o] Error 1
make: Leaving directory '/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 5.10.43.3-microsoft-standard-WSL2
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
gyp ERR! cwd /home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/k/prj/videosdb/frontend/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Linux 5.10.43.3-microsoft-standard-WSL2
node-pre-gyp ERR! command "/usr/bin/node" "/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc
node-pre-gyp ERR! node -v v16.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/k/prj/videosdb/frontend/node_modules/firegraph/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
I really have no idea about how to proceed from here, help appreciated.
Queries should return document IDs, with the key they're stored in optionally provided by the user. Probably default to something like _documentID
There seems to be some issues relating to accessing the Firebase SDK within Jest. There are some solutions like firebase-mock
that seem to enable this but I'm going to do more research to figure out the best approach.
Right now we assume all values are primitives, e.g. their actual value can be stripped and put into a JavaScript object. The DocumentReference
can behave that way, but it would be easier to allow us to retrieve those references during resolution.
Example:
query {
posts {
id
message
author {
id
fullName
}
}
}
Amazing implementation of graphQl on firebase. What would be the most suited way to expose firebase as a apollo-server end point using firegraph? plugging it in as a datasource?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.