createUser
https://graphql.org/graphql-js/mutations-and-input-types/
mutation {
createUser(data: {
name: "piecioshka"
}) {
id
name
}
}
// 5c157dbfa7b11b0007c1767c
deleteUser
mutation {
deleteUser(where: {
id: "5c157dbfa7b11b0007c1767c"
}) {
id
name
}
}
Spróbuj uruchomić 2x?
https://graphql.org/learn/queries/
query {
users {
id
name
}
}
https://graphql.org/blog/subscriptions-in-graphql-and-relay/
TODO
DEMO: https://github.com/piecioshka/test-nodejs-prisma