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 22
33# # Create a movie based on user input
44# 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." ) {
66# movie_insert(data: { title: $title, genre: $genre, imageUrl: $imageUrl })
77# }
88
Original file line number Diff line number Diff line change 22
33# # @auth() directives control who can call each operation.
44# # 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." ) {
66# movies {
77# id
88# title
4040# }
4141
4242# # 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." ) {
4444# movie(id: $id) {
4545# id
4646# title
6464# }
6565
6666# # 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." ) {
6868# movies(
6969# where: {
7070# _and: [{ genre: { eq: $genre } }, { title: { contains: $titleInput } }]
You can’t perform that action at this time.
0 commit comments