Questions tagged [keystonejs]
742 questions
4
votes
0 answers
How to create custom admin pages in 4.x?
I need to add a custom admin page to the back office (/keystone). It will not be model related, but some custom UI for additional nodejs calls. What is the best way to achieve that (without hijacking the keystone admin code in /node_modules)?
Any…

simonwidjaja
- 549
- 2
- 6
- 13
4
votes
3 answers
How to serve a static site within keystone?
I have one keystone based site and a completely static one.
I would like to integrate the static one into the first one.
All the requests to "/" will serve the static one but requests under "/resources" would serve the keystone site.
basically:
"/"…
user4418284
4
votes
2 answers
How to allow a specific server to access my API?
I am writing an API using node.js,express and mongodb, which will be used in another server. I just want only that server (or some more in the future) to be able to access my API. How can I do that?

Mr Cold
- 1,565
- 2
- 19
- 29
4
votes
1 answer
How Can I Use Express.js Middleware in a Keystone.js Project?
I'm currently building a Keystone.js project, and need to use some Express.js middleware libraries with it. Since Keystone.js is built on top of Express.js, this seemed like it would be fairly easy, but I'm running into lots of issues getting things…

rdegges
- 32,786
- 20
- 85
- 109
4
votes
1 answer
Validation error in Keystone JS
I am trying to build a contact form which is very similar to the one used in the keystone demo but i have hit a road block, While trying to save to db, I get the following errors
{ message: 'Validation failed',
name: 'ValidationError',
…

Bazinga777
- 5,140
- 13
- 53
- 92
4
votes
1 answer
Image gallery with caption using CloudinaryImage on keystonejs
I'm using keystonejs and CloudinaryImages to create an Image Gallery.
{ type: Types.CloudinaryImages }
I need the ability to add a caption to the images.
I was also reading this:
https://github.com/keystonejs/keystone/pull/604
but I could not…

Katie
- 609
- 1
- 6
- 17
4
votes
1 answer
Filter KeystoneJS relationship by id
I'm trying to write a KeystoneJS (Mongoose) model for a Contest collection. These are simplified versions of my actual models:
Contest
Contest.add({
title: {
type: Types.Text,
initial: true,
required: true,
index: true
…

Ignacio Lago
- 2,432
- 1
- 27
- 33
4
votes
2 answers
Mongoose schema types in KeystoneJS models
var keystone = require('keystone'),
Types = keystone.Field.Types;
var LeaderboardEntry = new keystone.List('leaderboardEntry', {
autokey: { path: 'slug', from: 'publicKey playername', unique: false }
});
LeaderboardEntry.add({
publicKey: {…

Eat at Joes
- 4,937
- 1
- 40
- 40
3
votes
0 answers
Adding access controls to users in KeystoneJS
everyone!
I'm learning about KeystoneJS referring its manual. In this manual, I've stuck at an area of how to add access controls from the back-end to users which has labeled as admin. So, I'm referring the given examples in the KeystoneJS…

mastercordy
- 161
- 1
- 2
- 16
3
votes
1 answer
Any workaround to the "Could not find prisma-fmt binary" error when installing KeystoneJS?
I'm running into this issue when trying to install KeystoneJS (tried locally with node and npm up to date and in a node:16-alpine docker image).
> keystone-app@1.0.0 postinstall
> keystone postinstall
Error: Could not find prisma-fmt binary.…

Camopy
- 125
- 1
- 12
3
votes
1 answer
Keystone crashes inside Turborepo
Keystone fails to find dependencies while running yarn build inside a new Turborepo project.
Steps to reproduce
Install Turborepo in a new project npx create-turbo@latest
navigate to the apps folder or wherever you plan to install Keystone cd…

remainstheday
- 464
- 1
- 4
- 13
3
votes
2 answers
Generate KeyStone.js 6 schema from modified Prisma schema
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…

Brook MG
- 601
- 10
- 20
3
votes
0 answers
How to upload Image using graphQL update mutation in Keystone6?
I am trying to upload user profile image using useMutation
But I am getting 400 error while uploading.
here is my code.
File Input
onChange
function onChange({ target: { validity, files }…

DEV
- 455
- 4
- 18
3
votes
1 answer
How do you seed a mongodb database such that the Keystone 5 CMS recognizes the many-to-many relationships?
Let's say I have two objects: Product and Seller
Products can have multiple Sellers.
A single Seller can sell multiple Products.
The goal is to write a seeding script that successfully seeds my MongoDB database such that Keystone.js's CMS recognizes…

Joshua Mitchell
- 81
- 1
- 6
3
votes
3 answers
KeystoneJs user-defined order for Relationship
I am using KeystoneJS with PostgreSQL as my backend and Apollo on the frontend for my app.
I have a schema that has a list that is linked to another list.
I want to be able to allow users to change the order of the second list.
This is a simplified…

Jayd
- 880
- 1
- 12
- 16