cing
01/03/2019, 7:33 PMCCBCodeMonkey
01/03/2019, 8:21 PMPost
and one is UserData
... they are both just types in my datamodel schema with properties... but Post gets these functions made for it by prisma: createManyPosts
, but also createPost
, where as UserData
only gets createManyUserDatas
and not the singular createUserData
.... why is this?? really confusedCCBCodeMonkey
01/03/2019, 8:24 PMid: ID! @unique
on the type.. I thought id was implicit though...KyleG
01/03/2019, 8:36 PMPRISMA_ENDPOINT
from dev
to prod
I figure it's worth sharing.mrszympek
01/03/2019, 8:44 PMNick
01/03/2019, 10:02 PMmahkali
01/03/2019, 10:40 PMserver/resolver.go:68:4: unknown field 'Author' in struct literal of type "hello-world/generated/prisma-client".PostWhereInput
mahkali
01/03/2019, 10:43 PMxiaoqf10
01/04/2019, 1:57 AMJoe
01/04/2019, 3:05 PMszaudowsky
01/04/2019, 5:04 PMszaudowsky
01/04/2019, 5:11 PMIndustrial
01/04/2019, 7:38 PMIndustrial
01/04/2019, 7:39 PMIndustrial
01/04/2019, 7:40 PMIndustrial
01/04/2019, 7:42 PMTiago Correia
01/04/2019, 7:56 PMtype Notification {
id: ID! @unique
sender: User!
receiver: User!
relatesTo: ID
type: NotificationTypes!
content: String!
isRead: Boolean!
createdAt: DateTime!
}
Tiago Correia
01/04/2019, 7:56 PMIndustrial
01/04/2019, 7:57 PMreceiver: User
is the relation.Tiago Correia
01/04/2019, 7:57 PMmahkali
01/04/2019, 8:03 PMfunc (r *mutationResolver) CreateDraft(ctx context.Context, title string, userId string) (*<http://prisma.Post|prisma.Post>, error) {
userExists := r.Prisma.Client.Exists.User(&prisma.UserWhereUniqueInput{
ID: userId,
})
if(userExists == nil) {
panic("User not found");
}
return r.Prisma.CreatePost(prisma.PostCreateInput{
Title: title,
Author: &prisma.UserCreateOneWithoutPostsInput{
Connect: &prisma.UserWhereUniqueInput{ID: &userId},
},
}).Exec(ctx)
}
mahkali
01/04/2019, 8:04 PMmahkali
01/04/2019, 8:15 PMIndustrial
01/04/2019, 8:26 PMEnum
?Industrial
01/04/2019, 8:43 PMIndustrial
01/04/2019, 8:44 PMquery {
__type(name: "MyType") {
enumValues {
name
}
}
}
Industrial
01/04/2019, 9:22 PMIndustrial
01/04/2019, 9:22 PMIndustrial
01/04/2019, 9:23 PMdatamodel.graphql
default implementation of some queries. I have custom SQL query code that I need to execute.Industrial
01/04/2019, 9:28 PM