Open thecodeboss opened 5 years ago
@thecodeboss I've been able to see this as well. If I understand correctly, this isn't necessarily the datamodel being cached (Since we don't actually save the datamodel anywhere), but the saved queries not being updated when the datamodel changes.
This is something that we've been giving a lot of thought to, and I'll let you know here when we make progress. In the time being, I think just changing the open query to remove (invalid) fields should fix this, as I'm sure you've figured out.
In the time being, I think just changing the open query to remove (invalid) fields should fix this, as I'm sure you've figured out.
The bug does not occur when I'm executing a query; just when I click on the User
table itself in the admin UI. I don't know how to edit the default generated queries for tables.
@thecodeboss Sorry for the late reply! Those tables you see on the left are actually pre-built queries. If you click on the little arrow to the right of the type name (screenshot attached), the query editor should show up and you'll be able to remove the extra fields that cause this issue. Please let me know if that does not work either!
@madebysid Ah I never noticed that arrow before, that's super helpful. Thanks!
Figured I'd chime in to say that I've seen the same issue as well. Seems to happen on both Chrome and Firefox, clearing the cache/cookies fixes it every time.
Environments: Windows 10 + Mac Mojave Firefox + Chrome Prisma 1.34.0
I actually just ran into this problem as well and as @IanSaucy stated, when I cleared the cache/ cookies I was able to fix the issue.
Environments: Mac Mojave Chrome Prisma 1.34.10
On a Mac in Chromium, I found that I could refresh prisma admin by running the following in the browser's devtool's console:
localStorage.setItem('prisma-admin', null)
@dcsw that works for me but this should really be a button on the UI or actually just part of the deploy command.
Same Issue, solved by clearing cache.
Describe the bug After running a migration, we started seeing errors in Prisma Admin related to the previous version of the schema. Basically changes we made in the migration were not reflected in the UI, and it was still sending invalid queries to the Prisma server.
After some debugging, I found the issue was that the admin UI was caching the datamodel in my browser's local storage. I am able to resolve the issue by clearing my local storage, but this should not be a necessary step.
To Reproduce Steps to reproduce the behavior:
--force
to allow data loss)User
object.Expected behavior The UI should reflect the updated datamodel, and not throw the error above.
Versions (please complete the following information):
Postgres
1.31
prisma
CLI:prisma/1.31.1 (darwin-x64) node-v11.12.0
OS X Mojave
Additional context The cached data can be found in local storage by running in a browser console:
cc @kainolophobia