-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.graphql
73 lines (70 loc) · 2 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"""
Character represents a character in the show
"""
type Character {
"Internal identifier"
id: ID!
"Character name, all caps"
name: String! @id @search(by: [term, regexp])
"The episodes this character appears in"
episodes: [Episode]
"The lines this character has"
lines: [Line]
}
"""
Season represents a season of the show
"""
type Season {
"Internal identifier"
id: ID!
"Season number"
number: Int! @id @search
"The episodes in the Season"
episodes: [Episode] @hasInverse(field: season)
}
"""
Episode represents an episode of the show
"""
type Episode {
"Internal identifier"
id: ID!
"Episode identifier, in the format S01E01"
identifier: String! @id @search(by: [term])
"Episode number"
number: Int! @search
"Episode title"
title: String! @search(by: [term, regexp])
"Episode summary"
summary: String @search(by: [term])
"Episode summary embedding"
summary_v: [Float!] @embedding @search(by: ["hnsw(metric: cosine, exponent: 3)"])
"Air date"
airDate: DateTime! @search
"The characters in the episode"
characters: [Character] @hasInverse(field: episodes)
"The directors of the episode"
directors: [String] @search(by: [term])
"The writers of the episode"
writers: [String] @search(by: [term])
"The season in which this episode appears"
season: Season @hasInverse(field: episodes)
"The lines in the episode"
lines: [Line] @hasInverse(field: episode)
}
"""
Line represents a line of dialogue in the show
"""
type Line {
"Internal identifier"
id: ID!
"The line number in the episode"
number: Int! @search
"The dialogue text"
text: String! @search(by: [term, regexp])
"The dialogue text embedding"
text_v: [Float!] @embedding @search(by: ["hnsw(metric: cosine, exponent: 5)"])
"The character who said the line"
character: Character @hasInverse(field: lines)
"The episode in which the line appears"
episode: Episode @hasInverse(field: lines)
}