question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'refetch' of undefined

See original GitHub issue

Bug report

Describe the bug

I want to create new entity in the DB using Admin UI. But when I filled form and click ‘Create’ button I got notification Cannot read property 'refetch' of undefined. Then was opened edit view and I clicked ‘Save Changes’ and got positive notification 😃

To Reproduce

Steps to reproduce the behaviour. Please provide code snippets or a repository:

  1. yarn create keystone-app my-test-app
  2. keystone.createList("test", { fields: { title: { type: Text } } });

Expected behaviour

Don’t show error notification and successfully saved new entity.

Screenshots

https://www.dropbox.com/s/5zatk8tay75awaz/Screenshot 2019-11-14 17.22.27.png?dl=0

System information

  • OS: macOS 10.15
  • Browser: Google Chrome 78.0.3904.97

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
MadeByMikecommented, Nov 19, 2019

Hey everyone, this is confirmed and on my list. It’s a very visible bug, but not causing any problems so it might be a week or two before I land a fix for this one. Apologies for any alarm caused.

0reactions
cloud90bkcommented, Dec 11, 2019

Hi, I’ve updated the node modules but still have the error message. It has been released? I use this version now: “@keystonejs/adapter-mongoose”: “5.1.3”, “@keystonejs/app-admin-ui”: “5.4.0”, “@keystonejs/app-graphql”: “5.0.1”, “@keystonejs/app-static”: “5.0.0”, “@keystonejs/auth-password”: “5.0.1”, “@keystonejs/fields”: “6.0.1”, “@keystonejs/file-adapters”: “5.2.0”, “@keystonejs/keystone”: “5.3.0”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'refetch' of undefined · Issue #3862 ...
Hello friends, Today I faced an issue with GraphQL in my React.js project. What I tried to do is refetch a query once...
Read more >
Cannot read property 'refetch' of undefined - Stack Overflow
data = {}. looks like you tried to 'escape' from undefined data error - not recommended method ... use if(loading) return <Loading />....
Read more >
Refetching queries in Apollo Client - Apollo GraphQL Docs
refetchQueries was introduced, the INVALIDATE sentinel was not very useful, because invalidated queries with fetchPolicy: "cache-first" would typically re-read ...
Read more >
[Solved]-Unhandled Rejection (TypeError): Cannot read ...
Coding example for the question Unhandled Rejection (TypeError): Cannot read property 'extensions' of undefined. (GraphQL)-Reactjs.
Read more >
useQuery | TanStack Query Docs
The data cannot be undefined . enabled: boolean. Set this to false ... If set to false , the query will not refetch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found