Last active
April 30, 2019 22:11
-
-
Save johnymontana/7865477356e3379b9559fda21896041a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Movie { | |
_id: Long! | |
countries: [String] | |
imdbId: String! | |
imdbRating: Float | |
imdbVotes: Int | |
languages: [String] | |
movieId: String! | |
plot: String | |
poster: String | |
released: String | |
runtime: Int | |
title: String! | |
tmdbId: String | |
year: Int | |
in_genre: [Genre] @relation(name: "IN_GENRE", direction: "OUT") | |
users: [User] @relation(name: "RATED", direction: "IN") | |
actors: [Actor] @relation(name: "ACTED_IN", direction: "IN") | |
directors: [Director] @relation(name: "DIRECTED", direction: "IN") | |
} | |
type RATED @relation(name: "RATED") { | |
from: User! | |
to: Movie! | |
created: DateTime! | |
rating: Float! | |
timestamp: Int! | |
} | |
type User { | |
_id: Long! | |
name: String! | |
userId: String! | |
rated: [Movie] @relation(name: "RATED", direction: "OUT") | |
RATED_rel: [RATED] | |
} | |
type Actor { | |
_id: Long! | |
name: String! | |
acted_in: [Movie] @relation(name: "ACTED_IN", direction: "OUT") | |
} | |
type Director { | |
_id: Long! | |
name: String! | |
directed: [Movie] @relation(name: "DIRECTED", direction: "OUT") | |
} | |
type Genre { | |
_id: Long! | |
name: String! | |
movies: [Movie] @relation(name: "IN_GENRE", direction: "IN") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment