James
02/26/2018, 5:30 PMRamsay Lanier
02/26/2018, 5:34 PMRamsay Lanier
02/26/2018, 5:35 PMJames
02/26/2018, 5:35 PMRamsay Lanier
02/26/2018, 5:35 PMJames
02/26/2018, 5:35 PMRamsay Lanier
02/26/2018, 5:36 PMRamsay Lanier
02/26/2018, 5:36 PMRamsay Lanier
02/26/2018, 5:37 PMJames
02/26/2018, 5:38 PMnoahdavis
02/26/2018, 5:38 PMpnicolaou
02/26/2018, 6:08 PMtype User {
name: String,
posts: [Post!]!
}
I want to replace the posts for the user. But I am not sure how.
If I do
mutation {
updateUser(
where: {id: "123"},
data: {
posts: {
create: [{title: 'hi}, {title: 'hey'}]
}
}
)
}
It just appends the posts, instead of replacing themterion
02/26/2018, 6:25 PM{ query: 'mutation($project_name: String!, $stage: String!, $types: String!) {\n deploy(input: {\n name: $project_name\n stage: $stage,\n types: $types\n }) {\n errors {\n type\n field\n description\n }\n }\n}',
variables:
{ project_name: 'test-project',
stage: 'local',
types: 'type Place {... } }
(full types in comment https://github.com/graphcool/prisma/issues/1948#issuecomment-368598581, they are taken from example server)
What is wrong?fcosrno
02/26/2018, 6:50 PMprisma deploy
and npm start
, but I cannot perform CRUD operations against the new type. The only queries I see in Schema are the ones under Query in src/schema.graphql. Shouldn't I be able to see the generated ones too?Ramsay Lanier
02/26/2018, 7:26 PMpasa
02/26/2018, 8:03 PMpasa
02/26/2018, 8:04 PMpasa
02/26/2018, 8:04 PMpasa
02/26/2018, 8:05 PMpasa
02/26/2018, 8:06 PMpasa
02/26/2018, 8:07 PMruben
02/26/2018, 8:28 PMruben
02/26/2018, 8:28 PMharmony
02/26/2018, 8:28 PMharmony
02/26/2018, 8:29 PMpasa
02/26/2018, 8:29 PMpasa
02/26/2018, 8:29 PMpnicolaou
02/26/2018, 8:29 PMtype User {
name: String,
posts: [Post!]!
}
I want to replace the posts for the user. But I am not sure how.
If I do
mutation {
updateUser(
where: {id: "123"},
data: {
posts: {
create: [{title: 'hi}, {title: 'hey'}]
}
}
)
}
It just appends the posts, instead of replacing themruben
02/26/2018, 8:30 PMpasa
02/26/2018, 8:31 PM