kgoggin / reason-react-apollo

Reason Bindings For Apollo's React API
https://reason-react-apollo.kylegoggin.com
MIT License
24 stars 1 forks source link

Dependency Issues w/ graphql-code-generator #17

Open Phylodome opened 4 years ago

Phylodome commented 4 years ago

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 commented 4 years ago

Getting same error. Configuration details are here. https://github.com/dotansimha/graphql-code-generator/issues/3445#issuecomment-691527151

What is your config @Phylodome ?