typescript-urql: utils.memoize1 is not a function
See original GitHub issueDescribe the bug I cannot add the latest versions to codesandbox yet, so I’ll leave what I have for now.
Using the newest packages gives me the following error:
node_modules/@graphql-codegen/plugin-helpers/index.js:500
const getCachedDocumentNodeFromSchema = utils.memoize1(utils.getDocumentNodeFromSchema);
TypeError: utils.memoize1 is not a function
at Object.<anonymous> (node_modules/@graphql-codegen/plugin-helpers/index.js:500:47)
To Reproduce Use codegen with the packages below. Only happens on the latest packages so the schema should not matter.
Expected behavior Successful build
Environment:
- OS: macOS 11.6
"@graphql-codegen/cli": "^2.2.1",
"@graphql-codegen/typescript": "^2.2.4",
"@graphql-codegen/typescript-operations": "^2.1.8",
"@graphql-codegen/typescript-urql": "^3.2.2"
- NodeJS: v16.3.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
graphql-codegen/cli
GraphQL Code Generator. Live demo and full documentation: graphql-code-generator.com. Project repository: graphql-code-generator ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ardatan Turns out it was my lockfile too…sorry for the noise! For anyone else try:
npm --depth 10 update @graphql-tools/utils.I think this should be reopened. I got this today:
IN the file it imports
memoize1from here: https://github.com/ardatan/graphql-tools/blame/e7bb9810f8aa57e925ea5362e9f27b5d16d0e40f/packages/utils/src/memoize.ts#L1this was added in version 8.4.0 I think, yet the version specified is ^8.1.1 in package.json.
Opened a PR for this here: #6957