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

Add graphql voyager #39

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft

Add graphql voyager #39

wants to merge 2 commits into from

Conversation

simon-wacker
Copy link
Contributor

@simon-wacker simon-wacker commented Mar 1, 2023

In 16bd511 I tried to add voyager as a next.js page using the React component. This fails with the error

info  - Loaded env from /home/node/app/.env.local
info  - Linting and checking validity of types
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data ...ReferenceError: window is not defined
    at Object.<anonymous> (/home/node/app/node_modules/graphql-voyager/dist/voyager.lib.js:16:4)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at 3226 (/home/node/app/.next/server/pages/graphql-voyager.js:22:50)
    at __webpack_require__ (/home/node/app/.next/server/webpack-runtime.js:25:42)
    at __webpack_exec__ (/home/node/app/.next/server/pages/graphql-voyager.js:108:39)

> Build error occurred
Error: Failed to collect page data for /graphql-voyager
    at /home/node/app/node_modules/next/dist/build/utils.js:963:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}
error Command failed with exit code 1.

when running yarn build.

In 76bbe41 I tried to add it as a standalone Docker service akin to https://github.com/graphql-services/graphql-voyager This works in general. The current implementation is still buggy though. It is however rather tedious because it requires yet another Dockerfile* pair and so forth.

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.

None yet

1 participant