File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
templates/init/dataconnect Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# # Create a movie based on user input
4
4
# mutation CreateMovie($title: String!, $genre: String!, $imageUrl: String!)
5
- # @auth(level: USER_EMAIL_VERIFIED) {
5
+ # @auth(level: USER_EMAIL_VERIFIED, insecureReason: "Any email verified users can create a new movie." ) {
6
6
# movie_insert(data: { title: $title, genre: $genre, imageUrl: $imageUrl })
7
7
# }
8
8
Original file line number Diff line number Diff line change 2
2
3
3
# # @auth() directives control who can call each operation.
4
4
# # Anyone should be able to list all movies, so the auth level is set to PUBLIC
5
- # query ListMovies @auth(level: PUBLIC) {
5
+ # query ListMovies @auth(level: PUBLIC, insecureReason: "Anyone can list all movies." ) {
6
6
# movies {
7
7
# id
8
8
# title
40
40
# }
41
41
42
42
# # Get movie by id
43
- # query GetMovieById($id: UUID!) @auth(level: PUBLIC) {
43
+ # query GetMovieById($id: UUID!) @auth(level: PUBLIC, insecureReason: "Anyone can get a movie by id." ) {
44
44
# movie(id: $id) {
45
45
# id
46
46
# title
64
64
# }
65
65
66
66
# # Search for movies, actors, and reviews
67
- # query SearchMovie($titleInput: String, $genre: String) @auth(level: PUBLIC) {
67
+ # query SearchMovie($titleInput: String, $genre: String) @auth(level: PUBLIC, insecureReason: "Anyone can search for movies." ) {
68
68
# movies(
69
69
# where: {
70
70
# _and: [{ genre: { eq: $genre } }, { title: { contains: $titleInput } }]
You can’t perform that action at this time.
0 commit comments