Julián Álvarez
03/13/2019, 5:50 AMJulián Álvarez
03/13/2019, 5:51 AMJulián Álvarez
03/13/2019, 5:51 AMJulián Álvarez
03/13/2019, 5:51 AMJulián Álvarez
03/13/2019, 5:52 AMJulián Álvarez
03/13/2019, 5:52 AMJulián Álvarez
03/13/2019, 5:53 AMChris Fuller
03/13/2019, 10:08 AMRinat
03/13/2019, 10:30 AMEmil
03/13/2019, 10:59 AM[User]!
without ! behind the User type. I thought it has to be [User!]!
(note the two exclamation marks). When did this change happen (can’t find it on the releases on github) and is this intended behaviour?Petr Homoky
03/13/2019, 12:58 PMNavneet Garg
03/13/2019, 1:22 PMkitze
03/13/2019, 2:01 PMPRISMA_MANAGEMENT_API_SECRET
after updating the cli? I have no idea what should be the value for it...btotharye
03/13/2019, 2:45 PMtype Prey {
id: ID! @id
type: String!
size: String!
weight: Int
owner: User! @relation(link: INLINE)
}
type Feed {
id: ID! @id
prey: Prey! @relation(link: INLINE)
date: DateTime!
notes: String
snake: Snake!
}
Then I'm using yoga and prisma together and create the resolver like this but it isn't working atm:
createFeed(
prey: PreyWhereUniqueInput!
date: DateTime
notes: String
snake: SnakeWhereUniqueInput!
): Feed!
I tried doing something like this from prisma playground:
mutation createFeed{
createFeed(
prey: {id: "5c890827be07770007e6a914"}
snake: {id: "5c86ed54be07770007e6a90e"}
date: "2019-03-13"
){id date }
}
But that gives me "Cannot return null for non-nullable field Mutation.createFeed."
isn't there some way to do a connect for the prey and snake id or something I just can't remember how to do itbtotharye
03/13/2019, 2:46 PMcreatePrey(type: String!, weight: Int!, size: String!): Prey!
btotharye
03/13/2019, 2:47 PMJidé
03/13/2019, 2:59 PMezeikel
03/13/2019, 4:03 PMOR
inside of where
doesn't seem to be working. I keep getting back
Error: Variable '$where' expected value of type 'UserWhereInput' but got: {"OR":[]}. Reason: 'OR' Field 'OR' is not defined in the input type 'UserWhereInput'. (line 1, column 8):
query ($where: UserWhereInput) {
typeDefs:
type Query {
users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, first: Int ): [User!]!
user(id: ID!): User
}
Resolver:
users: (_, { where }, ctx, info) => {
return ctx.prisma.users({ where }, info);
}
Query in Playground:
{
users(
where: {
OR: [{ username_contains: "ross" }, { firstName_contains: "rick" }]
}
) {
id
username
}
}
ezeikel
03/13/2019, 4:04 PMOR
and just query on one field it works as expected, just can't seem to combine themMustafa
03/13/2019, 4:49 PMRobert
03/13/2019, 5:14 PMprisma generate
and prisma deploy
on their local machine? Will they be able to access my DB without authentication at their end? Thanks for any help!jdoyle112
03/13/2019, 6:29 PMjdoyle112
03/13/2019, 6:31 PMRobert
03/13/2019, 8:06 PMdeleteJob: async (parent, {id}) => {
return await prisma.deleteJob({where: {id}})
}
but I get the following error
Variable '$where' expected value of type 'JobWhereUniqueInput!' but got: {"where":{"id":"cjt7klf3q5lyc0b79ayuloctr"}}. Reason: 'where' Field 'where' is not defined in the input type 'JobWhereUniqueInput'. (line 1, column 11):
mutation ($where: JobWhereUniqueInput!) {
What am I doing wrong?Robert
03/13/2019, 8:08 PMdeleteJob: async (parent, {id}) => {
return await prisma.deleteJob({ id})
}
},
Robert
03/13/2019, 8:10 PMAdd a delete resolver to Mutation part of src/index.js
delete(parent, { id }, ctx, info) {
return ctx.db.mutation.deletePost(
{
where: { id }
},
info
);
}
Wendell Misiedjan
03/13/2019, 10:01 PMWendell Misiedjan
03/13/2019, 10:02 PMwhere: {
startsAt_gt: now()
}
Or is this something that I'd manually have to configure in my prisma server?jblevins
03/13/2019, 10:26 PMjblevins
03/13/2019, 10:26 PM