cometkim / gatsby-plugin-typegen

Let's give developers using GatsbyJS better DX with extreme type-safety
https://www.gatsbyjs.org/packages/gatsby-plugin-typegen/
MIT License
204 stars 25 forks source link

changeCaseAll.pascalCase is not a function #151

Closed jlvdh closed 2 years ago

jlvdh commented 3 years ago

I'm running

"gatsby": "^3.0.1", "gatsby-plugin-typegen": "^2.2.4",

When I run gatsby develop

I get the following error

success extract queries from components - 1.151s

ERROR 

[object Object] changeCaseAll.pascalCase is not a function

  TypeError: changeCaseAll.pascalCase is not a function

  - base-documents-visitor.js:106 TypeScriptDocumentsVisitor.OperationDefinition
    /Users/jorgvanderham/Documents/repos/de-huizenmarkt/dist/plugins/other/visitor-plugin-common/src/base-do
    cuments-visitor.js:106:31

  - index.js:17 Object.plugin
    /Users/jorgvanderham/Documents/repos/de-huizenmarkt/dist/plugins/typescript/operations/src/index.js:17:2
    7

  - execute-plugin.js:31 executePlugin
    /Users/jorgvanderham/Documents/repos/de-huizenmarkt/dist/graphql-codegen-core/src/execute-plugin.js:31:3
    5

  - codegen.js:77 
    /Users/jorgvanderham/Documents/repos/de-huizenmarkt/dist/graphql-codegen-core/src/codegen.js:77:30

  - Array.map

  - codegen.js:67 codegen
    /Users/jorgvanderham/Documents/repos/de-huizenmarkt/dist/graphql-codegen-core/src/codegen.js:67:54

  - task_queues.js:58 runNextTicks
    internal/process/task_queues.js:58:5

  - timers.js:434 processImmediate
    internal/timers.js:434:9

  - codegen.js:139 
    [de-huizenmarkt]/[gatsby-plugin-typegen]/workers/codegen.js:139:20
cometkim commented 3 years ago

HI @jlvdh, what is the version of graphql-codegen? yarn why @graphql-codegen/visitor-plugin-common

jlvdh commented 3 years ago

Hi @cometkim, it's 1.19.0

cometkim commented 3 years ago

cc @dotansimha

I'll send PR soon

cometkim commented 2 years ago

I haven't been able to confirm this since I updated the dependencies. If it reproduces in v3, please re-open the issue.