-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
143 lines (128 loc) · 2.7 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type ConfigData {
colorMode: ColorMode!
language: String!
}
enum ColorMode {
Light
Dark
System
}
type Artist {
id: Int!
name: String!
createdAt: DateTime!
updatedAt: DateTime!
musics: [Music!]!
albums: [Album!]!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type AlbumArt {
id: Int!
type: String
description: String
createdAt: DateTime!
updatedAt: DateTime!
url: String!
}
type Album {
id: Int!
title: String!
artistNames: [String!]!
albumArtists: [String!]!
createdAt: DateTime!
updatedAt: DateTime!
musics: [Music!]!
artists: [Artist!]!
albumArt: AlbumArt
albumArts: [AlbumArt!]!
}
type Music {
id: Int!
title: String
artistName: String
artistNames: [String!]!
albumTitle: String
albumArtist: String
genre: [String!]!
year: String
trackNumber: Int
discNumber: Int
duration: Float!
filePath: String!
createdAt: DateTime!
updatedAt: DateTime!
album: Album
artists: [Artist!]!
albumArt: AlbumArt
albumArts: [AlbumArt!]!
url: String!
}
type SearchSuggestion {
id: Int!
title: String!
type: SearchSuggestionType!
}
enum SearchSuggestionType {
Music
Album
Artist
}
type SearchResult {
musics: [Music!]!
artists: [Artist!]!
albums: [Album!]!
}
type Playlist {
id: Int!
name: String!
musicIds: [Int!]!
createdAt: DateTime!
updatedAt: DateTime!
musics: [Music!]!
}
type Query {
album(id: Int!): Album
albums: [Album!]!
artist(id: Int!): Artist
artists: [Artist!]!
musics: [Music!]!
isMaximized: Boolean!
isMinimized: Boolean!
config: ConfigData!
search(query: String!): SearchResult!
searchSuggestions: [SearchSuggestion!]!
playlist(id: Int!): Playlist
playlists: [Playlist!]!
}
type Mutation {
maximize: Boolean!
unmaximize: Boolean!
minimize: Boolean!
close: Boolean!
updateConfig(config: ConfigUpdateInput!): Boolean!
scanLibrary: Boolean!
createPlaylist(name: String!, musicIds: [Int!]!): Playlist!
clearPlaylist(playlistId: Int!): Boolean!
deletePlaylist(id: Int!): Boolean!
deletePlaylistItems(playlistId: Int!, indices: [Int!]!): Boolean!
renamePlaylist(id: Int!, name: String!): Boolean!
addMusicsToPlaylist(playlistId: Int!, musicIds: [Int!]!): Boolean!
}
input ConfigUpdateInput {
colorMode: ColorMode
language: String
}
type Subscription {
maximizedStateChanged: Boolean!
configUpdated: ConfigData!
libraryScanningStateChanged: Boolean!
playlistCreated: Playlist!
playlistDeleted: Int!
playlistUpdated: Playlist!
}