I had a project that was using the latest version of Prisma (3.9.1) and was planning to place a CMS on top of it. Keystone seemed like a very good fit as they already use Prisma internally. Unfortunately I couldn't modify the Prisma schema because it was auto-generated from the Keystone schema. Is there a way to reverse the process and get a Keystone schema from Prisma ?
Generate KeyStone.js 6 schema from modified Prisma schema
790 Views Asked by Brook MG At
2
There are 2 best solutions below
0
Coco
On
One option is to paste your Prisma schema into extendedPrismaSchema in keystone/schema.ts as following:
SomeSchema: list({
fields: {},
db: {
extendPrismaSchema() {
return `
model YourSchema {
id String
name String
email String
}
`;
}
}
})
I don't know how this would affect things, but it's one way!
Related Questions in NODE.JS
- How to solve CERT_UNTRUSTED error in nodemailer
- Run a loop over a callback, node js
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- formatting path string in javascript
- One to One screensharing using WEBRTC
- Create polygon from grid (for collisions)
- Strange npm behavior when installing packages like grunt
- Convert JSON.gz to JSON in node js
- "Your npm version is outdated." but it's not. While install yo
- Why put methods on the prototype of a class instead of declaring them in the constructor?
- Node JS Async Response
- mongoose get property from nested schema after `group`
- Cannot Receive Incoming call on Twilio android Client
- How can I change a specific line in a file with node js?
Related Questions in CONTENT-MANAGEMENT-SYSTEM
- MongoDB Content Management Web App for the non-technical
- Is it possible to edit a php file from itself?
- Integrate content from API with a CMS website
- Umbraco 7 lists
- What SQL privileges is it best to use to satisy requirements of most popular CMS
- fire external script background with js?
- Save + Publishing in Umbraco reverting back to previous save
- How to add a HTML Home page to a prestashop page
- Appending children to different elements with same class name
- Moving strings and triggering events with jquery
- Add block to all CMS Pages with certain URL Key
- Can't insert and update at the same time
- Cons of a liferay cms while website development using Community Edition
- What is the best way for me to find what CMS a webpage is using?
- How to enable the subheader, but only for the custom extension in typo3 6.x backend?
Related Questions in PRISMA
- Nexus field resolver parent type is not nullable
- GraphQL nested query arguments?
- Prisma update function fails because of incorrect type
- Cannot use GraphQLNonNull "[User]!" from another module or realm
- Prisma: Create timestamp field without date
- How to define datasource for multiple connection (development and production) Prisma
- Update multiple tables in one query
- How to upload correctly with graphql and cloudinary
- Nested writes in Prisma
- TypeGraphql and Prisma 2 type conflicts
- Unable to Create Multiple Connect Query in Prisma?
- Error Assertion `args[3]->IsInt32()' failed
- Multiple relations between models
- Prisma ^2.0 can't handle database creation and table creation?
- Convert Object<T> to Object<A> where A is contained in T
Related Questions in KEYSTONEJS
- How to use i18next with KeystoneJS
- Redirect keystone app to sub directory using htaccess
- MongoDB Content Management Web App for the non-technical
- How to create pages in keystone.js from admin section
- Path is missing in KeystoneJS
- Keystone, feature galleries on home page
- KeystoneJS error cannot install on openshift
- KeystoneJS get ObjectID from another value
- Show all posts created from specific year
- Keystonejs session
- keystone js: localhost is not in the certs altnames
- Keystone+React: 'import' and 'export' may appear only with 'sourceType: module'
- Yo keystone not working for Ubuntu server 16.04
- How to use .env file variable in .js file other than Keystone.js?
- Got console error `unexpected token <` from sign in page (using keystonejs 4.0 beta4)
Related Questions in KEYSTONEJS6
- How can I override Webpack config in a dependency package?
- In Keystone 6, can we disable the user authentication/user login?
- How to fetch and pass the dynamic data into the custom field (Keystone.js 6)?
- Add data automatically to a table B when you add data to table A
- In Keystone JS v6, is there a way to store users without password being a required option?
- An error occurred handling a request for the Admin UI: Error: Prisma error: The table `main.User` does not exist in the current database
- Keystone 6 js: checkbox null values
- keystonejs form a multi-column unique constraint
- Static file serving in Keystonejs 6
- Unable to configure Keystone 6 with MongoDB
- Add logged in user ID to foreign key field automatically in KeystoneJS
- How to display data in table using Keystone6 component in custom page so it looks same?
- How to upload Image using graphQL update mutation in Keystone6?
- Error trying to reorder items within another list in Keystone 6
- Not able to understand the goal of public repo of KEYSTONEJS official repository and can't create docker image
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
At the moment there's no way to generate a Keystone schema from an existing Prisma schema. You'd need to create the Keystone schema manually so Keystone could generate a new Prisma schema file.
There's also currently no way to modify the Prisma schema generated by Keystone, though there's been talk of opening this up.