Thanks @Josh-Walker-GM . Any quick workaround you think I can apply in the meantime ?
Hmm Iām not totally sure. My immediate thought is editing the node_modules
at ./node_modules/@redwoodjs/studio/dist-backend/index.js
.
There should be a HOST
and PORT
variable near the top of that file which might help you out if you need studio to use different settings. There is also a line:
apiHost: `http://${webConfig.host}:${webConfig.port}`,
You might need to replace the webConfig values here as well.
Just need to be careful of these changes getting reset if the node_modules
get reset.
Overriding the host works, thanks @Josh-Walker-GM.
Could you add it as an overridable variable in the studio config in the future ?
Yeah Iām working on some fundamental studio updates/refactoring so Iāll note this down as a requirement.
I mostly got excited about impersonation, before realizing, that itās only for the graphql endpoint used via studio.
Are there bits in here, that would allow implementing impersonation into our apps easier (or is it easy and I just never looked at it)
@razzeee Impersonation is very provider specific. The only one of our provider that I know supports impersonation is Clerk User Impersonation | Clerk
Feared that would be the case, I have my own provider implemented, so unsure how to tackle that.
Hi,
Is there a possibility of adding an admin site to the studio? I used to work with the Django web framework in python and really miss that capability, especially when starting a new project.
Essentially it would provide CRUD capability similar to scaffolding but with customizable forms/components that is applicable to the bootstrapping and administration of the main app. The custom forms and components would be able to run server-side scripts or any code that is reserved for users with admin roles. Perhaps the customized components can be defined in an āadminā workspace in redwood projects.
Hey @tvo! I donāt think we have any immediate plans for an admin panel like this but the interest in a solution to this problem is noted! We have thought about trying to introduce an inspect/browser for the database - something similar to prisma studio which you can already run easily with the redwood CLI - but we have not made any decisions on that yet.
Itād be great to see a solution to this for sure. Perhaps a forum post on itās own about admin panels might help out with some community insight or help spark off this work?
Hi @Tobbe ,
It looks like a pretty sweet tool. Iād be glad to play with it for a few days and provide feedback if youād like. Iām game for getting on a call too if needed. At first glance, Iām particularly interested in the ācustom actionā feature but donāt fully understand its capability.
As for my immediate need, I was able to make do with a few reusable scripts for the current project Iām on.
We just released 11.4.0
which contains some important bug fixes and a few interesting preview features for SSR/OG image.
I am getting an error with the update here to v11.4.0:
{"level":30,"time":1713558557727,"pid":9731,"hostname":"Ryans-Mac-mini.local","msg":"Running any seeding of the Prisma database"}
{"level":50,"time":1713558557789,"pid":9855,"hostname":"Ryans-Mac-mini.local","prisma":{"clientVersion":"5.8.1"},"message":"\nInvalid `import_db.db.oTelTraceSpanType.findUnique()` invocation in\n/Users/ryanquinn/Documents/projects/SwankyCloud/Redwood-Swanky/node_modules/@redwoodjs/studio/api/dist/lib/seed.js:26:65\n\n 23 colour: \"00B33C\"\n 24 }];\n 25 for (const spanType of defaultOTelTraceSpanTypes) {\nā 26 const spanTypeExists = await import_db.db.oTelTraceSpanType.findUnique(\nError validating datasource `db`: the URL must start with the protocol `prisma://`","target":"oTelTraceSpanType.findUnique","timestamp":"2024-04-19T20:29:17.789Z","msg":"\nInvalid `import_db.db.oTelTraceSpanType.findUnique()` invocation in\n/Users/ryanquinn/Documents/projects/SwankyCloud/Redwood-Swanky/node_modules/@redwoodjs/studio/api/dist/lib/seed.js:26:65\n\n 23 colour: \"00B33C\"\n 24 }];\n 25 for (const spanType of defaultOTelTraceSpanTypes) {\nā 26 const spanTypeExists = await import_db.db.oTelTraceSpanType.findUnique(\nError validating datasource `db`: the URL must start with the protocol `prisma://`"}
Not sure if this is a me problem with using Prisma accelerate in prod.
I bypass it locally so my prob db does start with prisma://, but I have my local setup bypassing accelerate so the local db starts with postgresql:// which is where the error is hitting.
It didnāt hit this error before the update.
Iām not sure if Iām missing something, but I am on RW 7.4.3 and upgraded RW Studio to 11.4. Whenever I run yarn rw studio, I see the sidebar come up, but I canāt access any of the various sections; I just see a blank screen. I checked the console and network tab, and I did see anything strange.
I also reverted my redwood.toml file to the default api url and Iām still not seeing anything come through. Any ideas?
Nevermind it was an issue with my AD Blocker