Cannot read property 'refetch' of undefined
See original GitHub issueBug 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:
yarn create keystone-app my-test-app
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:
- Created 4 years ago
- Reactions:8
- Comments:5 (2 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
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.
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”,