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

Dependency Issues w/ graphql-code-generator #17

Open
Phylodome opened this issue Apr 21, 2020 · 1 comment
Open

Dependency Issues w/ graphql-code-generator #17

Phylodome opened this issue Apr 21, 2020 · 1 comment

Comments

@Phylodome
Copy link

When trying to generate types, I end up w/ the following error, which appears related to this issue:

> graphql-codegen

  ✔ Parse configuration
  ❯ Generate outputs
    ❯ Generate src/lib/graphql/Graphql.re
      ✔ Load GraphQL schemas
      ✔ Load GraphQL documents
      ✖ Generate
        → Cannot read property 'definitions' of undefined
    ❯ Generate src/lib/graphql/Apollo.re
      ✔ Load GraphQL schemas
      ✔ Load GraphQL documents
      ✖ Generate
        → Cannot read property 'definitions' of undefined


 Found 2 errors

  ✖ src/lib/graphql/Graphql.re
    TypeError: Cannot read property 'definitions' of undefined
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.js:74:35
        at Array.reduce (<anonymous>)
        at extractDocumentOperations (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.
js:73:20)
        at Object.write (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.js:284:22)
        at Object.plugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-client/dist/graphql-codegen-reason-client.cjs.development.js:139:2
6)
        at executePlugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:36:35)
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:113:30
        at Array.map (<anonymous>)
        at Object.codegen (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:103:54)
        at processTicksAndRejections (internal/process/task_queues.js:85:5)
        at async process (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:829:56)
        at async Promise.all (index 0)
        at async /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:836:37
        at async Task.task (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:618:17)
    TypeError: Cannot read property 'definitions' of undefined
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.js:74:35
        at Array.reduce (<anonymous>)
        at extractDocumentOperations (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.
js:73:20)
        at Object.write (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-base/dist/graphql-codegen-reason-base.cjs.development.js:284:22)
        at Object.plugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-client/dist/graphql-codegen-reason-client.cjs.development.js:139:2
6)
        at executePlugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:36:35)
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:113:30
        at Array.map (<anonymous>)
        at Object.codegen (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:103:54)
        at processTicksAndRejections (internal/process/task_queues.js:85:5)
        at async process (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:829:56)
        at async Promise.all (index 0)
        at async /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:836:37
        at async Task.task (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:618:17)

  ✖ src/lib/graphql/Apollo.re
    TypeError: Cannot read property 'definitions' of undefined
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/utilities/concatAST.js:21:18
        at Array.flatMap (<anonymous>)
        at flatMap (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/polyfills/flatMap.js:13:24)
        at Object.concatAST (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/utilities/concatAST.js:20:39)
        at Object.plugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-react-apollo/dist/graphql-codegen-reason-react-apollo.cjs.developm
ent.js:132:26)
        at executePlugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:36:35)
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:113:30
        at Array.map (<anonymous>)
        at Object.codegen (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:103:54)
        at processTicksAndRejections (internal/process/task_queues.js:85:5)
        at async process (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:829:56)
        at async Promise.all (index 0)
        at async /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:836:37
        at async Task.task (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:618:17)
    TypeError: Cannot read property 'definitions' of undefined
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/utilities/concatAST.js:21:18
        at Array.flatMap (<anonymous>)
        at flatMap (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/polyfills/flatMap.js:13:24)
        at Object.concatAST (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql/utilities/concatAST.js:20:39)
        at Object.plugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/graphql-codegen-reason-react-apollo/dist/graphql-codegen-reason-react-apollo.cjs.developm
ent.js:132:26)
        at executePlugin (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:36:35)
        at /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:113:30
        at Array.map (<anonymous>)
        at Object.codegen (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/core/index.cjs.js:103:54)
        at processTicksAndRejections (internal/process/task_queues.js:85:5)
        at async process (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:829:56)
        at async Promise.all (index 0)
        at async /Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:836:37
        at async Task.task (/Users/mpirkowski/code/future-aligned/telos/client/node_modules/@graphql-codegen/cli/bin.js:618:17)
@kunjee17
Copy link

Getting same error. Configuration details are here. dotansimha/graphql-code-generator#3445 (comment)

What is your config @Phylodome ?

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

No branches or pull requests

2 participants