-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
49 lines (44 loc) · 985 Bytes
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
type User {
username: String! @id
posted_reviews: [Review] @hasInverse(field: posted_by)
}
type Review {
id: ID!
text: String!
rating: Int!
posted_by: User!
reviewed_film: FilmData @hasInverse(field: reviews)
}
type Film @remote {
id: ID!
name: String!
directed_by: [Director!]!
}
type FilmData {
id: String! @id
reviews: [Review]
data: Film @custom(
http: {
url: "https://play.dgraph.io/graphql"
method: "POST"
forwardHeaders: ["Content-Type"]
graphql: "query($id: ID!) { getFilm(id: $id) }"
skipIntrospection: true
}
)
}
type Director @remote {
name: String!
id: ID!
}
type Query {
getMovieNames(name: String): [Film] @custom(
http: {
url: "https://play.dgraph.io/graphql"
method: "POST"
forwardHeaders: ["Content-Type"]
graphql: "query($name: String!) { queryFilm(filter: {name: {alloftext: $name}}) }"
skipIntrospection: true
}
)
}