-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.graphql
More file actions
43 lines (39 loc) · 706 Bytes
/
api.graphql
File metadata and controls
43 lines (39 loc) · 706 Bytes
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
# Data types
type Artist {
id: ID!
name: String!
albums: [Album!]!
relatedArtists: [Artist!]!
}
type Album {
id: ID!
name: String!
year: Int
artist: Artist!
songs: [Song!]!
}
type Song {
id: ID!
name: String!
artist: Artist
album: Album
trackNum: Int
chords: String!
}
# Queries
type Query {
artists: [Artist!]!
artist(id: ID!): Artist
albums: [Album!]!
album(id: ID!): Album
songs: [Song!]!
song(id: ID!): Song
}
# Mutations
#type Mutation {
# addSong(song: Song): Song
# updateSong(song: Song): Song
# relateArtists(artists: [Artist]) [Artist]
# unrelateArtists([Artist]) [Artist]
# updateAlbum(Album) Album
#}