Lars Ivar Igesund
09/13/2020, 1:48 PMAadarsha
09/13/2020, 8:19 PMnpx prisma introspect
i get extra file with sth like this ..Aadarsha
09/13/2020, 8:21 PMGabriel Oliveira
09/14/2020, 1:08 AMKohki Shiga
09/14/2020, 1:49 AMThe change you are trying to make would violate the required relation 'DrinkingLocationsToUser' between the `DrinkingLocations` and `User` models.
The entities are as follows:
model User {
id String @default(cuid()) @id
username String
password String
drinkingLocation DrinkingLocations
profile Profile
}
model DrinkingLocations {
id String @default(cuid()) @id
locationName String
longtitude Float
latitude Float
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
userId String
}
For the nexus code I wrote this
schema.objectType({
name: 'User',
definition(t) {
t.string('id', { description: 'Id of the user' });
t.string('username', { description: 'Name of the user' });
t.string('password', { description: 'Encrypted password' });
t.field('DrinkingLocations', {
type: 'DrinkingLocations',
});
t.field('Profile', {
type: 'Profile',
});
},
});
schema.objectType({
name: 'DrinkingLocations',
definition(t) {
t.string('id', { description: 'Id of the Drinking location' });
t.string('locationName', { description: 'Name of the Drinking Location' });
t.float('longtitude', { description: 'Longtitude of the Drinking ' });
t.float('latitude', { description: 'Latitude of the Drinking Location' });
t.date('createdAt', { description: 'Time when the user started drinking' });
t.string('userId', { description: 'Foreign key to User' });
t.field('user', {
type: 'User',
});
},
});
schema.mutationType({
definition(t) {
t.crud.createOneUser();
t.crud.createOneDrinkingLocations();
t.crud.createOneProfile();
},
});
But when I try to test it out on Graphql Playground I get that error when executing the mutation query:
mutation {
createOneDrinkingLocations(
data: {
locationName: "ORCHARD GINZA"
latitude : 35.672422
longtitude: 139.763155
user: {
connect: {
id: "ckf0gb3wb0000gfzyoen9psbr"
}
}
}
){
id
locationName
latitude
longtitude
createdAt
}
}
I'd really appreciate if someone has any clue about thisManthan Mallikarjun
09/14/2020, 2:20 AMManthan Mallikarjun
09/14/2020, 2:35 AMJustin Ellingwood
09/14/2020, 5:21 PMNatalia
Ton Nguyen
09/15/2020, 10:58 AMKJReactor
09/15/2020, 6:11 PMprisma migrate save --experimental
command stopped working. I am running v2.6Philipp Rajah Moura Srivastava
09/15/2020, 11:16 PMMartïn
09/16/2020, 11:15 AMAadarsha
09/16/2020, 1:32 PMDaniel Norman
Neil Francis Nahid
09/16/2020, 6:53 PMKJReactor
09/17/2020, 3:03 PMmigrate save
. Error is no such table `_migration' when I do migrate up
. I delete the database. Re-create it do migrate save
. But once I do up i get the same the same errorJonathan
09/17/2020, 11:18 PMstephan
09/18/2020, 11:22 AMEtel
Jeremy
09/19/2020, 11:04 AMThibault Jeanpierre
09/19/2020, 1:33 PM>prisma deploy
! 'UNABLE_TO_VERIFY_LEAF_SIGNATURE':
! request to <https://api.cloud.prisma.sh/>
! failed, reason: unable to verify the first
! certificate
Get in touch if you need help: <https://slack.prisma.io>
To get more detailed output, run $ export DEBUG="*"
(node:19452) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
raven@2.6.4 alert: failed to send exception to sentry: unable to verify the first certificate
I changed my computer. My application is deployed on Heroku and I paid a Dyno for my backend part, I do not know if the problem comes from the change of computer or the SSL that has been activated on Heroku.
thank youMarvin
09/19/2020, 4:32 PMschema.prisma
file and keep the data on migration? I thought @map("oldFieldName")
should work for that but it doesn't.MagmaStorm
09/19/2020, 5:50 PMDanilo
09/20/2020, 4:09 AMJoe Graham
09/20/2020, 5:25 PMShaon
09/21/2020, 7:49 AMGraphQL
now ?
I'n going to start from scratch to learn core concept with advanced topics too 🔜KJReactor
09/21/2020, 2:10 PMconnectOrCreate
but I don't want to create and the fields I'm searching on are not uniqueSteve Jenkins
09/21/2020, 7:07 PM