hez
06/07/2018, 3:08 PMtype Thing {
thingID: String!
createdAt: DateTime!
updatedAt: DateTime!
thingProfile: ThingProfile
}
type ThingProfile {
thingID: String
thingPropertyA: String
thingPropertyB: String
}
type Mutation {
createThingProfile(
thingID: String
thingProfile: ThingProfile
): Thing
}
And I want to add a profile
to a thing
that was not initialized with a profile
...using a mutation on the thing
.... how would I do this? This feels like it should be possible...but I'm stumbling on the confignilan
06/08/2018, 12:05 PMupdateThing(where: { thingID: "mything id" }, data: { thingProfile: { connect: { ... }} }) { ... }
nilan
06/08/2018, 12:05 PMthingID
as @unique
in both Thing
and ThingProfile
nilan
06/08/2018, 12:06 PMprisma.yml