We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to connect images to my object with sudo context. Used the following code:
const context = req.KeystoneContext; const localDb = context.sudo().db; try { await localDb.Motif.updateOne({ where: { sku: '027_DE' }, data: { isImagesMigrated: true, images: { connect: [ { id: 17674 }, { id: 17675 }, { id: 17676 }, { id: 17677 }, { id: 17678 } ] } } }); } catch (error) { console.log(error); console.log(error.extensions.debug); }
And I see the following error:
GraphQLError: An error occured while resolving relationship fields. - Motif.images: Access denied: You cannot connect that Image - it may not exist
I've tried to link it manually in admin panel then and it is all fine, so it looks like some bug there.
node: v16.20.1 keystone-6/core: v5.5.0
The text was updated successfully, but these errors were encountered:
Updated: Direct prisma call works fine
prisma
Sorry, something went wrong.
No branches or pull requests
I am trying to connect images to my object with sudo context.
Used the following code:
And I see the following error:
I've tried to link it manually in admin panel then and it is all fine, so it looks like some bug there.
node: v16.20.1
keystone-6/core: v5.5.0
The text was updated successfully, but these errors were encountered: