Jerry Jäppinen
08/23/2018, 1:53 PMuser in data? Can I do this dynamically? I’m reading all my queries from .graphql files, meaning in this case I could do a workaround with just another query called CreateThingWithUser, but that would not scale as it leads to a lot of duplication. I was also looking into directives but it seems those are only useful in defining what gets returnedJerry Jäppinen
08/23/2018, 2:02 PMUserWhereUniqueInput as opposed to just ID, it works smoothlyJerry Jäppinen
08/23/2018, 2:03 PMmutation CreateThing (
$title: String!,
$userWhere: UserWhereUniqueInput
) {
createThing (
data: {
title: $title
user: {
connect: $userWhere
}
}
) {
...Thing
}
}