John Smeeth
03/02/2019, 10:01 AM{
"errors": [
{
"message": "Post : unsupported protocol scheme \"\"",
"path": [
"createUser"
]
}
],
"data": {
"createUser": null
}
}
John Smeeth
03/02/2019, 10:02 AMJohn Smeeth
03/02/2019, 10:02 AMmutation {
createUser(name: "Bob") {
id
}
}
John Smeeth
03/02/2019, 10:03 AMAhmed Ashraf
03/02/2019, 2:55 PMAhmed Ashraf
03/02/2019, 2:55 PMJo Sprague
03/02/2019, 4:30 PMprisma deploy
the datamodel changes are reflected on the server, but the data from seed.graphql isn't there. How do I reset the data to use what's in seed.graphql?Jo Sprague
03/02/2019, 7:06 PMcontext.prisma.posts({ where: { published: false, user: { id } } });
but I'd like to make a resolver to get posts that are published OR for the current user. How do I format an OR query?Luca
03/02/2019, 7:15 PMwhere
, then it's quite easy to figure it out. something like ctx.prisma.posts({ where: { OR: [{ published: false }, { user: { id } }] } });
should do the jobJo Sprague
03/02/2019, 7:35 PMAlex Varela
03/02/2019, 8:00 PMEnvironment:
- Name: PRISMA_CONFIG
Value: !Sub
- |
port: 60000
managementApiSecret: ${ManagementApiSecret}
databases:
default:
connector: ${DbConnector}
uri: ${DbUri}
database: ${DbDatabase}
migrations: true
but it doesn't get picked up and keeps using default_default
, what can be causing this?Alex Varela
03/02/2019, 8:01 PMkyler
03/02/2019, 10:38 PMkyler
03/02/2019, 10:39 PMJo Sprague
03/02/2019, 11:05 PMtype CheckIn {
id: ID! @unique
location: Location!
user: User!
}
type User {
id: ID! @unique
checkIns: [CheckIn!]
}
type Location {
id: ID! @unique
checkIns: [CheckIn!]
}
How can I add @relation
directives to finish the relationship? Each CheckIn
has a user and a location, and each User
and Location
has a list of `CheckIn`s that refer to it.josh
03/03/2019, 2:04 AMSlackbot
03/03/2019, 4:50 AMJay
03/03/2019, 4:09 PMforwardTo('prisma_db')
functionality... searching the latest docs I can no longer find it?Jay
03/03/2019, 4:14 PMPeter Zhou
03/04/2019, 1:43 AMPeter Zhou
03/04/2019, 1:44 AMPeter Zhou
03/04/2019, 1:45 AMJo Sprague
03/04/2019, 2:42 AMasync createCheckIn(parent, { title, location }, context) {
const userId = getUserId(context);
const { geonameId, ...rest } = location;
if (!location || !geonameId) {
throw new Error(`CheckIn must include a valid location`);
}
return context.prisma.createCheckIn({
title,
location: {
upsert: {
where: {
geonameId
},
update: { ...rest },
create: { ...location }
}
},
public: true,
user: { connect: { id: userId } }
});
}
But I'm getting an error that says "Field 'upsert' is not defined in the input type". Does anyone see what I'm doing wrong here?Bardia Keyvani
03/04/2019, 3:21 AMBardia Keyvani
03/04/2019, 3:23 AMBardia Keyvani
03/04/2019, 3:24 AMBardia Keyvani
03/04/2019, 3:24 AMMichael Jones
03/04/2019, 4:51 AMCarl Foster
03/04/2019, 5:28 AMOmprakash
03/04/2019, 7:11 AM