mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 19:06:24 +02:00
chore: prepare cloud merge point with docker and firebase configs in movexe fork Boris account? No, current user.
This commit is contained in:
parent
b38a297349
commit
4a6b335ce3
14 changed files with 263 additions and 2 deletions
24
dataconnect/example/mutations.gql
Normal file
24
dataconnect/example/mutations.gql
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
mutation CreateMovie($title: String!, $genre: String!, $imageUrl: String!)
|
||||
@auth(level: USER_EMAIL_VERIFIED, insecureReason: "Any email verified users can create a new movie.") {
|
||||
movie_insert(data: { title: $title, genre: $genre, imageUrl: $imageUrl })
|
||||
}
|
||||
|
||||
mutation UpsertUser($username: String!) @auth(level: USER) {
|
||||
user_upsert(data: { id_expr: "auth.uid", username: $username })
|
||||
}
|
||||
|
||||
mutation AddReview($movieId: UUID!, $rating: Int!, $reviewText: String!)
|
||||
@auth(level: USER) {
|
||||
review_upsert(
|
||||
data: {
|
||||
userId_expr: "auth.uid"
|
||||
movieId: $movieId
|
||||
rating: $rating
|
||||
reviewText: $reviewText
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation DeleteReview($movieId: UUID!) @auth(level: USER) {
|
||||
review_delete(key: { userId_expr: "auth.uid", movieId: $movieId })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue