diff --git a/docs/schema.md b/docs/schema.md index 21540d9..1072417 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -947,7 +947,10 @@ type Recording implements Node, Entity { aliases: [Alias] # The main credited artist(s). - artistCredit: [ArtistCredit] + artistCredit: [ArtistCredit] @deprecated(reason: "The `artistCredit` field has been renamed to\\n`artistCredits`, since it is a list of credits and is referred to in the\\nplural form throughout the MusicBrainz documentation. This field is deprecated\\nand will be removed in a major release in the future. Use the equivalent\\n`artistCredits` field.") + + # The main credited artist(s). + artistCredits: [ArtistCredit] # An approximation to the length of the recording, calculated # from the lengths of the tracks using it. @@ -1316,7 +1319,10 @@ type Release implements Node, Entity { aliases: [Alias] # The main credited artist(s). - artistCredit: [ArtistCredit] + artistCredit: [ArtistCredit] @deprecated(reason: "The `artistCredit` field has been renamed to\\n`artistCredits`, since it is a list of credits and is referred to in the\\nplural form throughout the MusicBrainz documentation. This field is deprecated\\nand will be removed in a major release in the future. Use the equivalent\\n`artistCredits` field.") + + # The main credited artist(s). + artistCredits: [ArtistCredit] # The release events for this release. releaseEvents: [ReleaseEvent] @@ -1444,7 +1450,10 @@ type ReleaseGroup implements Node, Entity { aliases: [Alias] # The main credited artist(s). - artistCredit: [ArtistCredit] + artistCredit: [ArtistCredit] @deprecated(reason: "The `artistCredit` field has been renamed to\\n`artistCredits`, since it is a list of credits and is referred to in the\\nplural form throughout the MusicBrainz documentation. This field is deprecated\\nand will be removed in a major release in the future. Use the equivalent\\n`artistCredits` field.") + + # The main credited artist(s). + artistCredits: [ArtistCredit] # The date of the earliest release in the group. firstReleaseDate: Date diff --git a/docs/types.md b/docs/types.md index f7f625e..f21ece9 100644 --- a/docs/types.md +++ b/docs/types.md @@ -93,24 +93,32 @@ requests can be made. - lookup + lookup LookupQuery - Perform a lookup of a MusicBrainz entity by its MBID. + + Perform a lookup of a MusicBrainz entity by its MBID. + - browse + browse BrowseQuery - Browse all MusicBrainz entities directly linked to another entity. + + Browse all MusicBrainz entities directly linked to another entity. + - search + search SearchQuery - Search for MusicBrainz entities using Lucene query syntax. + + Search for MusicBrainz entities using Lucene query syntax. + - node + node Node - Fetches an object given its ID + + Fetches an object given its ID + id @@ -135,40 +143,52 @@ entity will be given as a result – even if the actual name wouldn’t be. - name + name String - The aliased name of the entity. + + The aliased name of the entity. + - sortName + sortName String - The string to use for the purpose of ordering by name (for + + The string to use for the purpose of ordering by name (for example, by moving articles like ‘the’ to the end or a person’s last name to -the front). +the front). + - locale + locale Locale - The locale (language and/or country) in which the alias is -used. + + The locale (language and/or country) in which the alias is +used. + - primary + primary Boolean - Whether this is the main alias for the entity in the -specified locale (this could mean the most recent or the most common). + + Whether this is the main alias for the entity in the +specified locale (this could mean the most recent or the most common). + - type + type String - The type or purpose of the alias – whether it is a variant, -search hint, etc. + + The type or purpose of the alias – whether it is a variant, +search hint, etc. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + @@ -185,48 +205,64 @@ or settlements (countries, cities, or the like). - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - sortName + sortName String - The string to use for the purpose of ordering by name (for + + The string to use for the purpose of ordering by name (for example, by moving articles like ‘the’ to the end or a person’s last name to -the front). +the front). + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - isoCodes + isoCodes [String] - ISO 3166 codes are -the codes assigned by ISO to countries and subdivisions. + + ISO 3166 codes are +the codes assigned by ISO to countries and subdivisions. + - artists + artists ArtistConnection - A list of artists linked to this entity. + + A list of artists linked to this entity. + after @@ -239,9 +275,11 @@ the codes assigned by ISO to countries and subdivisions. - events + events EventConnection - A list of events linked to this entity. + + A list of events linked to this entity. + after @@ -254,9 +292,11 @@ the codes assigned by ISO to countries and subdivisions. - labels + labels LabelConnection - A list of labels linked to this entity. + + A list of labels linked to this entity. + after @@ -269,9 +309,11 @@ the codes assigned by ISO to countries and subdivisions. - places + places PlaceConnection - A list of places linked to this entity. + + A list of places linked to this entity. + after @@ -284,9 +326,11 @@ the codes assigned by ISO to countries and subdivisions. - releases + releases ReleaseConnection - A list of releases linked to this entity. + + A list of releases linked to this entity. + after @@ -309,14 +353,18 @@ the codes assigned by ISO to countries and subdivisions. Filter by one or more release statuses. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -342,20 +390,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [AreaEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -371,20 +425,26 @@ An edge in a connection. - node + node Area - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -404,107 +464,143 @@ even a fictional character. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - sortName + sortName String - The string to use for the purpose of ordering by name (for + + The string to use for the purpose of ordering by name (for example, by moving articles like ‘the’ to the end or a person’s last name to -the front). +the front). + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - country + country String - The country with which an artist is primarily identified. It -is often, but not always, its birth/formation country. + + The country with which an artist is primarily identified. It +is often, but not always, its birth/formation country. + - area + area Area - The area with which an artist is primarily identified. It -is often, but not always, its birth/formation country. + + The area with which an artist is primarily identified. It +is often, but not always, its birth/formation country. + - beginArea + beginArea Area - The area in which an artist began their career (or where -were born, if the artist is a person). + + The area in which an artist began their career (or where +were born, if the artist is a person). + - endArea + endArea Area - The area in which an artist ended their career (or where -they died, if the artist is a person). + + The area in which an artist ended their career (or where +they died, if the artist is a person). + - lifeSpan + lifeSpan LifeSpan - The begin and end dates of the entity’s existence. Its exact -meaning depends on the type of entity. + + The begin and end dates of the entity’s existence. Its exact +meaning depends on the type of entity. + - gender + gender String - Whether a person or character identifies as male, female, or -neither. Groups do not have genders. + + Whether a person or character identifies as male, female, or +neither. Groups do not have genders. + - genderID + genderID MBID - The MBID associated with the value of the gender -field. + + The MBID associated with the value of the gender +field. + - type + type String - Whether an artist is a person, a group, or something else. + + Whether an artist is a person, a group, or something else. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - ipis + ipis [IPI] - List of Interested Parties Information -(IPI) codes for the artist. + + List of Interested Parties Information +(IPI) codes for the artist. + - isnis + isnis [ISNI] - List of International Standard Name Identifier -(ISNI) codes for the artist. + + List of International Standard Name Identifier +(ISNI) codes for the artist. + - recordings + recordings RecordingConnection - A list of recordings linked to this entity. + + A list of recordings linked to this entity. + after @@ -517,9 +613,11 @@ field. - releases + releases ReleaseConnection - A list of releases linked to this entity. + + A list of releases linked to this entity. + after @@ -542,9 +640,11 @@ field. Filter by one or more release statuses. - releaseGroups + releaseGroups ReleaseGroupConnection - A list of release groups linked to this entity. + + A list of release groups linked to this entity. + after @@ -562,9 +662,11 @@ field. Filter by one or more release group types. - works + works WorkConnection - A list of works linked to this entity. + + A list of works linked to this entity. + after @@ -577,14 +679,18 @@ field. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -610,20 +716,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [ArtistEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -643,22 +755,28 @@ track, etc., and join phrases between them. - artist + artist Artist - The entity representing the artist referenced in the -credits. + + The entity representing the artist referenced in the +credits. + - name + name String - The name of the artist as credited in the specific release, -track, etc. + + The name of the artist as credited in the specific release, +track, etc. + - joinPhrase + joinPhrase String - Join phrases might include words and/or punctuation to -separate artist names as they appear on the release, track, etc. + + Join phrases might include words and/or punctuation to +separate artist names as they appear on the release, track, etc. + @@ -674,20 +792,26 @@ An edge in a connection. - node + node Artist - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -704,9 +828,11 @@ entity. - areas + areas AreaConnection - Browse area entities linked to the given arguments. + + Browse area entities linked to the given arguments. + after @@ -724,9 +850,11 @@ entity. The MBID of a collection in which the entity is found. - artists + artists ArtistConnection - Browse artist entities linked to the given arguments. + + Browse artist entities linked to the given arguments. + after @@ -769,9 +897,11 @@ entity. The MBID of a work to which the artist is linked. - events + events EventConnection - Browse event entities linked to the given arguments. + + Browse event entities linked to the given arguments. + after @@ -804,9 +934,11 @@ entity. The MBID of a place to which the event is linked. - labels + labels LabelConnection - Browse label entities linked to the given arguments. + + Browse label entities linked to the given arguments. + after @@ -834,9 +966,11 @@ entity. The MBID of a release to which the entity is linked. - places + places PlaceConnection - Browse place entities linked to the given arguments. + + Browse place entities linked to the given arguments. + after @@ -859,9 +993,11 @@ entity. The MBID of a collection in which the entity is found. - recordings + recordings RecordingConnection - Browse recording entities linked to the given arguments. + + Browse recording entities linked to the given arguments. + after @@ -889,9 +1025,11 @@ entity. The MBID of a release to which the entity is linked. - releases + releases ReleaseConnection - Browse release entities linked to the given arguments. + + Browse release entities linked to the given arguments. + after @@ -955,9 +1093,11 @@ release, but is not included in the credits for the release itself. Filter by one or more release statuses. - releaseGroups + releaseGroups ReleaseGroupConnection - Browse release group entities linked to the given arguments. + + Browse release group entities linked to the given arguments. + after @@ -990,9 +1130,11 @@ release, but is not included in the credits for the release itself. Filter by one or more release group types. - works + works WorkConnection - Browse work entities linked to the given arguments. + + Browse work entities linked to the given arguments. + after @@ -1028,14 +1170,18 @@ Geographic coordinates described with latitude and longitude. - latitude + latitude Degrees - The north–south position of a point on the Earth’s surface. + + The north–south position of a point on the Earth’s surface. + - longitude + longitude Degrees - The east–west position of a point on the Earth’s surface. + + The east–west position of a point on the Earth’s surface. + @@ -1053,74 +1199,100 @@ Generally this means live performances, like concerts and festivals. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - lifeSpan + lifeSpan LifeSpan - The begin and end dates of the entity’s existence. Its exact -meaning depends on the type of entity. + + The begin and end dates of the entity’s existence. Its exact +meaning depends on the type of entity. + - time + time Time - The start time of the event. + + The start time of the event. + - cancelled + cancelled Boolean - Whether or not the event took place. + + Whether or not the event took place. + - setlist + setlist String - A list of songs performed, optionally including links to + + A list of songs performed, optionally including links to artists and works. See the setlist documentation -for syntax and examples. +for syntax and examples. + - type + type String - What kind of event the event is, e.g. concert, festival, etc. + + What kind of event the event is, e.g. concert, festival, etc. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -1146,20 +1318,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [EventEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -1175,20 +1353,26 @@ An edge in a connection. - node + node Event - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -1206,59 +1390,79 @@ used in relationships between two other entities. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - description + description String - A brief description of the main characteristics of the -instrument. + + A brief description of the main characteristics of the +instrument. + - type + type String - The type categorises the instrument by the way the sound is + + The type categorises the instrument by the way the sound is created, similar to the Hornbostel-Sachs -classification. +classification. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -1284,20 +1488,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [InstrumentEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -1313,20 +1523,26 @@ An edge in a connection. - node + node Instrument - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -1344,82 +1560,110 @@ represent a record company. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - sortName + sortName String - The string to use for the purpose of ordering by name (for + + The string to use for the purpose of ordering by name (for example, by moving articles like ‘the’ to the end or a person’s last name to -the front). +the front). + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - country + country String - The country of origin for the label. + + The country of origin for the label. + - area + area Area - The area in which the label is based. + + The area in which the label is based. + - lifeSpan + lifeSpan LifeSpan - The begin and end dates of the entity’s existence. Its exact -meaning depends on the type of entity. + + The begin and end dates of the entity’s existence. Its exact +meaning depends on the type of entity. + - labelCode + labelCode Int - The “LC” code -of the label. + + The “LC” code +of the label. + - ipis + ipis [IPI] - List of Interested Parties Information -codes for the label. + + List of Interested Parties Information +codes for the label. + - type + type String - A type describing the main activity of the label, e.g. -imprint, production, distributor, rights society, etc. + + A type describing the main activity of the label, e.g. +imprint, production, distributor, rights society, etc. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - releases + releases ReleaseConnection - A list of releases linked to this entity. + + A list of releases linked to this entity. + after @@ -1442,14 +1686,18 @@ field. Filter by one or more release statuses. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -1475,20 +1723,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [LabelEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -1504,20 +1758,26 @@ An edge in a connection. - node + node Label - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -1534,19 +1794,25 @@ lifetime, including whether it has ended (even if the date is unknown). - begin + begin Date - The start date of the entity’s life span. + + The start date of the entity’s life span. + - end + end Date - The end date of the entity’s life span. + + The end date of the entity’s life span. + - ended + ended Boolean - Whether or not the entity’s life span has ended. + + Whether or not the entity’s life span has ended. + @@ -1562,9 +1828,11 @@ A lookup of an individual MusicBrainz entity by its MBID. - area + area Area - Look up a specific area by its MBID. + + Look up a specific area by its MBID. + mbid @@ -1572,9 +1840,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - artist + artist Artist - Look up a specific artist by its MBID. + + Look up a specific artist by its MBID. + mbid @@ -1582,9 +1852,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - event + event Event - Look up a specific event by its MBID. + + Look up a specific event by its MBID. + mbid @@ -1592,9 +1864,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - instrument + instrument Instrument - Look up a specific instrument by its MBID. + + Look up a specific instrument by its MBID. + mbid @@ -1602,9 +1876,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - label + label Label - Look up a specific label by its MBID. + + Look up a specific label by its MBID. + mbid @@ -1612,9 +1888,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - place + place Place - Look up a specific place by its MBID. + + Look up a specific place by its MBID. + mbid @@ -1622,9 +1900,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - recording + recording Recording - Look up a specific recording by its MBID. + + Look up a specific recording by its MBID. + mbid @@ -1632,9 +1912,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - release + release Release - Look up a specific release by its MBID. + + Look up a specific release by its MBID. + mbid @@ -1642,9 +1924,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - releaseGroup + releaseGroup ReleaseGroup - Look up a specific release group by its MBID. + + Look up a specific release group by its MBID. + mbid @@ -1652,9 +1936,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - series + series Series - Look up a specific series by its MBID. + + Look up a specific series by its MBID. + mbid @@ -1662,9 +1948,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The MBID of the entity. - url + url URL - Look up a specific URL by its MBID. + + Look up a specific URL by its MBID. + mbid @@ -1677,9 +1965,11 @@ A lookup of an individual MusicBrainz entity by its MBID. The web address of the URL entity to look up. - work + work Work - Look up a specific work by its MBID. + + Look up a specific work by its MBID. + mbid @@ -1700,24 +1990,32 @@ Information about pagination in a connection. - hasNextPage + hasNextPage Boolean! - When paginating forwards, are there more items? + + When paginating forwards, are there more items? + - hasPreviousPage + hasPreviousPage Boolean! - When paginating backwards, are there more items? + + When paginating backwards, are there more items? + - startCursor + startCursor String - When paginating backwards, the cursor to continue. + + When paginating backwards, the cursor to continue. + - endCursor + endCursor String - When paginating forwards, the cursor to continue. + + When paginating forwards, the cursor to continue. + @@ -1734,70 +2032,94 @@ or other place where music is performed, recorded, engineered, etc. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - address + address String - The address describes the location of the place using the -standard addressing format for the country it is located in. + + The address describes the location of the place using the +standard addressing format for the country it is located in. + - area + area Area - The area entity representing the area, such as the city, in -which the place is located. + + The area entity representing the area, such as the city, in +which the place is located. + - coordinates + coordinates Coordinates - The geographic coordinates of the place. + + The geographic coordinates of the place. + - lifeSpan + lifeSpan LifeSpan - The begin and end dates of the entity’s existence. Its exact -meaning depends on the type of entity. + + The begin and end dates of the entity’s existence. Its exact +meaning depends on the type of entity. + - type + type String - The type categorises the place based on its primary -function. + + The type categorises the place based on its primary +function. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - events + events EventConnection - A list of events linked to this entity. + + A list of events linked to this entity. + after @@ -1810,14 +2132,18 @@ field. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -1843,20 +2169,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [PlaceEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -1872,20 +2204,26 @@ An edge in a connection. - node + node Place - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -1912,51 +2250,82 @@ or mixing. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - title + title String - The official title of the entity. + + The official title of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - artistCredit + artistCredit ⚠️ [ArtistCredit] - The main credited artist(s). + + The main credited artist(s). +

⚠️ DEPRECATED

+
The artistCredit field has been renamed to +artistCredits, since it is a list of credits and is referred to in the +plural form throughout the MusicBrainz documentation. This field is deprecated +and will be removed in a major release in the future. Use the equivalent +artistCredits field.
+ - length + artistCredits + [ArtistCredit] + + The main credited artist(s). + + + + length Int - An approximation to the length of the recording, calculated -from the lengths of the tracks using it. + + An approximation to the length of the recording, calculated +from the lengths of the tracks using it. + - video + video Boolean - Whether this is a video recording. + + Whether this is a video recording. + - artists + artists ArtistConnection - A list of artists linked to this entity. + + A list of artists linked to this entity. + after @@ -1969,9 +2338,11 @@ from the lengths of the tracks using it. - releases + releases ReleaseConnection - A list of releases linked to this entity. + + A list of releases linked to this entity. + after @@ -1994,14 +2365,18 @@ from the lengths of the tracks using it. Filter by one or more release statuses. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -2027,20 +2402,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [RecordingEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -2056,20 +2437,26 @@ An edge in a connection. - node + node Recording - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -2087,65 +2474,87 @@ other and to URLs outside MusicBrainz. - target + target Entity! - The target entity. + + The target entity. + - direction + direction String! - The direction of the relationship. + + The direction of the relationship. + - targetType + targetType String! - The type of entity on the receiving end of the relationship. + + The type of entity on the receiving end of the relationship. + - sourceCredit + sourceCredit String - How the source entity was actually credited, if different -from its main (performance) name. + + How the source entity was actually credited, if different +from its main (performance) name. + - targetCredit + targetCredit String - How the target entity was actually credited, if different -from its main (performance) name. + + How the target entity was actually credited, if different +from its main (performance) name. + - begin + begin Date - The date on which the relationship became applicable. + + The date on which the relationship became applicable. + - end + end Date - The date on which the relationship became no longer applicable. + + The date on which the relationship became no longer applicable. + - ended + ended Boolean - Whether the relationship still applies. + + Whether the relationship still applies. + - attributes + attributes [String] - Attributes which modify the relationship. There is a list + + Attributes which modify the relationship. There is a list of all attributes, but the attributes which are available, and how they should be used, depends on the -relationship type. +relationship type. + - type + type String - The type of relationship. + + The type of relationship. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + @@ -2161,20 +2570,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [RelationshipEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -2190,20 +2605,26 @@ An edge in a connection. - node + node Relationship - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -2219,9 +2640,11 @@ Lists of entity relationships for each entity type. - areas + areas RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2260,9 +2683,11 @@ Lists of entity relationships for each entity type. field. - artists + artists RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2301,9 +2726,11 @@ field. field. - events + events RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2342,9 +2769,11 @@ field. field. - instruments + instruments RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2383,9 +2812,11 @@ field. field. - labels + labels RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2424,9 +2855,11 @@ field. field. - places + places RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2465,9 +2898,11 @@ field. field. - recordings + recordings RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2506,9 +2941,11 @@ field. field. - releases + releases RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2547,9 +2984,11 @@ field. field. - releaseGroups + releaseGroups RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2588,9 +3027,11 @@ field. field. - series + series RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2629,9 +3070,11 @@ field. field. - urls + urls RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2670,9 +3113,11 @@ field. field. - works + works RelationshipConnection - A list of relationships between these two entity types. + + A list of relationships between these two entity types. + after @@ -2728,102 +3173,149 @@ MusicBrainz as one release. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - title + title String - The official title of the entity. + + The official title of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - artistCredit + artistCredit ⚠️ [ArtistCredit] - The main credited artist(s). + + The main credited artist(s). +

⚠️ DEPRECATED

+
The artistCredit field has been renamed to +artistCredits, since it is a list of credits and is referred to in the +plural form throughout the MusicBrainz documentation. This field is deprecated +and will be removed in a major release in the future. Use the equivalent +artistCredits field.
+ - releaseEvents + artistCredits + [ArtistCredit] + + The main credited artist(s). + + + + releaseEvents [ReleaseEvent] - The release events for this release. + + The release events for this release. + - date + date Date - The release date + + The release date is the date in which a release was made available through some sort of -distribution mechanism. +distribution mechanism. + - country + country String - The country in which the release was issued. + + The country in which the release was issued. + - asin + asin ASIN - The Amazon Standard Identification Number -of the release. + + The Amazon Standard Identification Number +of the release. + - barcode + barcode String - The barcode, if the + + The barcode, if the release has one. The most common types found on releases are 12-digit UPCs and 13-digit -EANs. +EANs. + - status + status ReleaseStatus - The status describes how “official” a release is. + + The status describes how “official” a release is. + - statusID + statusID MBID - The MBID associated with the value of the status -field. + + The MBID associated with the value of the status +field. + - packaging + packaging String - The physical packaging that accompanies the release. See + + The physical packaging that accompanies the release. See the list of packaging for more -information. +information. + - packagingID + packagingID MBID - The MBID associated with the value of the packaging -field. + + The MBID associated with the value of the packaging +field. + - quality + quality String - Data quality indicates how good the data for a release is. + + Data quality indicates how good the data for a release is. It is not a mark of how good or bad the music itself is – for that, use -ratings. +ratings. + - artists + artists ArtistConnection - A list of artists linked to this entity. + + A list of artists linked to this entity. + after @@ -2836,9 +3328,11 @@ It is not a mark of how good or bad the music itself is – for that, use - labels + labels LabelConnection - A list of labels linked to this entity. + + A list of labels linked to this entity. + after @@ -2851,9 +3345,11 @@ It is not a mark of how good or bad the music itself is – for that, use - recordings + recordings RecordingConnection - A list of recordings linked to this entity. + + A list of recordings linked to this entity. + after @@ -2866,9 +3362,11 @@ It is not a mark of how good or bad the music itself is – for that, use - releaseGroups + releaseGroups ReleaseGroupConnection - A list of release groups linked to this entity. + + A list of release groups linked to this entity. + after @@ -2886,14 +3384,18 @@ It is not a mark of how good or bad the music itself is – for that, use Filter by one or more release group types. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -2919,20 +3421,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [ReleaseEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -2948,20 +3456,26 @@ An edge in a connection. - node + node Release - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -2978,14 +3492,18 @@ particular label, catalog number, barcode, and what release format was used. - area + area Area - + + + - date + date Date - + + + @@ -3008,71 +3526,108 @@ album – it doesn’t matter how many CDs or editions/versions it had. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - title + title String - The official title of the entity. + + The official title of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - artistCredit + artistCredit ⚠️ [ArtistCredit] - The main credited artist(s). + + The main credited artist(s). +

⚠️ DEPRECATED

+
The artistCredit field has been renamed to +artistCredits, since it is a list of credits and is referred to in the +plural form throughout the MusicBrainz documentation. This field is deprecated +and will be removed in a major release in the future. Use the equivalent +artistCredits field.
+ - firstReleaseDate + artistCredits + [ArtistCredit] + + The main credited artist(s). + + + + firstReleaseDate Date - The date of the earliest release in the group. + + The date of the earliest release in the group. + - primaryType + primaryType ReleaseGroupType - The type + + The type of a release group describes what kind of releases the release group represents, e.g. album, single, soundtrack, compilation, etc. A release group can have a -“main” type and an unspecified number of additional types. +“main” type and an unspecified number of additional types. + - primaryTypeID + primaryTypeID MBID - The MBID associated with the value of the primaryType -field. + + The MBID associated with the value of the primaryType +field. + - secondaryTypes + secondaryTypes [ReleaseGroupType] - Additional types -that apply to this release group. + + Additional types +that apply to this release group. + - secondaryTypeIDs + secondaryTypeIDs [MBID] - The MBIDs associated with the values of the secondaryTypes -field. + + The MBIDs associated with the values of the secondaryTypes +field. + - artists + artists ArtistConnection - A list of artists linked to this entity. + + A list of artists linked to this entity. + after @@ -3085,9 +3640,11 @@ field. - releases + releases ReleaseConnection - A list of releases linked to this entity. + + A list of releases linked to this entity. + after @@ -3110,14 +3667,18 @@ field. Filter by one or more release statuses. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -3143,20 +3704,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [ReleaseGroupEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -3172,20 +3739,26 @@ An edge in a connection. - node + node ReleaseGroup - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -3201,9 +3774,11 @@ A search for MusicBrainz entities using Lucene query syntax. - areas + areas AreaConnection - Search for area entities matching the given query. + + Search for area entities matching the given query. + query @@ -3222,9 +3797,11 @@ and search fields. - artists + artists ArtistConnection - Search for artist entities matching the given query. + + Search for artist entities matching the given query. + query @@ -3243,9 +3820,11 @@ and search fields. - events + events EventConnection - Search for event entities matching the given query. + + Search for event entities matching the given query. + query @@ -3264,9 +3843,11 @@ and search fields. - instruments + instruments InstrumentConnection - Search for instrument entities matching the given query. + + Search for instrument entities matching the given query. + query @@ -3285,9 +3866,11 @@ and search fields. - labels + labels LabelConnection - Search for label entities matching the given query. + + Search for label entities matching the given query. + query @@ -3306,9 +3889,11 @@ and search fields. - places + places PlaceConnection - Search for place entities matching the given query. + + Search for place entities matching the given query. + query @@ -3327,9 +3912,11 @@ and search fields. - recordings + recordings RecordingConnection - Search for recording entities matching the given query. + + Search for recording entities matching the given query. + query @@ -3348,9 +3935,11 @@ and search fields. - releases + releases ReleaseConnection - Search for release entities matching the given query. + + Search for release entities matching the given query. + query @@ -3369,9 +3958,11 @@ and search fields. - releaseGroups + releaseGroups ReleaseGroupConnection - Search for release group entities matching the given query. + + Search for release group entities matching the given query. + query @@ -3390,9 +3981,11 @@ and search fields. - series + series SeriesConnection - Search for series entities matching the given query. + + Search for series entities matching the given query. + query @@ -3411,9 +4004,11 @@ and search fields. - works + works WorkConnection - Search for work entities matching the given query. + + Search for work entities matching the given query. + query @@ -3447,46 +4042,62 @@ theme. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - name + name String - The official name of the entity. + + The official name of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - type + type String - The type primarily describes what type of entity the series -contains. + + The type primarily describes what type of entity the series +contains. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -3512,20 +4123,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [SeriesEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -3541,20 +4158,26 @@ An edge in a connection. - node + node Series - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -3572,14 +4195,18 @@ release, or recording. - name + name String! - The tag label. + + The tag label. + - count + count Int - How many times this tag has been applied to the entity. + + How many times this tag has been applied to the entity. + @@ -3595,20 +4222,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [TagEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -3624,20 +4257,26 @@ An edge in a connection. - node + node Tag - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -3655,24 +4294,32 @@ acquired, an entry in another database, etc. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - resource + resource URLString! - The actual URL string. + + The actual URL string. + - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + @@ -3690,57 +4337,77 @@ more audio recordings. - id + id ID! - The ID of an object + + The ID of an object + - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + - title + title String - The official title of the entity. + + The official title of the entity. + - disambiguation + disambiguation String - A comment used to help distinguish identically named entitites. + + A comment used to help distinguish identically named entitites. + - aliases + aliases [Alias] - Aliases are used to store -alternate names or misspellings. + + Aliases are used to store +alternate names or misspellings. + - iswcs + iswcs [String] - A list of ISWCs assigned -to the work by copyright collecting agencies. + + A list of ISWCs assigned +to the work by copyright collecting agencies. + - language + language String - The language in which the work was originally written. + + The language in which the work was originally written. + - type + type String - The type of work. + + The type of work. + - typeID + typeID MBID - The MBID associated with the value of the type -field. + + The MBID associated with the value of the type +field. + - artists + artists ArtistConnection - A list of artists linked to this entity. + + A list of artists linked to this entity. + after @@ -3753,14 +4420,18 @@ field. - relationships + relationships Relationships - Relationships between this entity and other entitites. + + Relationships between this entity and other entitites. + - tags + tags TagConnection - A list of tags linked to this entity. + + A list of tags linked to this entity. + after @@ -3786,20 +4457,26 @@ A connection to a list of items. - pageInfo + pageInfo PageInfo! - Information to aid in pagination. + + Information to aid in pagination. + - edges + edges [WorkEdge] - A list of edges. + + A list of edges. + - totalCount + totalCount Int - A count of the total number of items in this connection, -ignoring pagination. + + A count of the total number of items in this connection, +ignoring pagination. + @@ -3815,20 +4492,26 @@ An edge in a connection. - node + node Work - The item at the end of the edge + + The item at the end of the edge + - cursor + cursor String! - A cursor for use in pagination + + A cursor for use in pagination + - score + score Int - The relevancy score (0–100) assigned by the search engine, if -these results were found through a search. + + The relevancy score (0–100) assigned by the search engine, if +these results were found through a search. + @@ -3844,79 +4527,106 @@ etc. Description - ALBUM - An album, perhaps better defined as a “Long Play” (LP) + ALBUM + + An album, perhaps better defined as a “Long Play” (LP) release, generally consists of previously unreleased material (unless this type is combined with secondary types which change that, such as “Compilation”). This -includes album re-issues, with or without bonus tracks. +includes album re-issues, with or without bonus tracks. + - SINGLE - A single typically has one main song and possibly a handful + SINGLE + + A single typically has one main song and possibly a handful of additional tracks or remixes of the main track. A single is usually named -after its main song. +after its main song. + - EP - An EP is a so-called “Extended Play” release and often + EP + + An EP is a so-called “Extended Play” release and often contains the letters EP in the title. Generally an EP will be shorter than a full length release (an LP or “Long Play”) and the tracks are usually exclusive to the EP, in other words the tracks don’t come from a previously issued release. EP is fairly difficult to define; usually it should only be assumed -that a release is an EP if the artist defines it as such. +that a release is an EP if the artist defines it as such. + - OTHER - Any release that does not fit any of the other categories. + OTHER + + Any release that does not fit any of the other categories. + - BROADCAST - An episodic release that was originally broadcast via radio, -television, or the Internet, including podcasts. + BROADCAST + + An episodic release that was originally broadcast via radio, +television, or the Internet, including podcasts. + - COMPILATION - A compilation is a collection of previously released tracks -by one or more artists. + COMPILATION + + A compilation is a collection of previously released tracks +by one or more artists. + - SOUNDTRACK - A soundtrack is the musical score to a movie, TV series, -stage show, computer game, etc. + SOUNDTRACK + + A soundtrack is the musical score to a movie, TV series, +stage show, computer game, etc. + - SPOKENWORD - A non-music spoken word release. + SPOKENWORD + + A non-music spoken word release. + - INTERVIEW - An interview release contains an interview, generally with -an artist. + INTERVIEW + + An interview release contains an interview, generally with +an artist. + - AUDIOBOOK - An audiobook is a book read by a narrator without music. + AUDIOBOOK + + An audiobook is a book read by a narrator without music. + - LIVE - A release that was recorded live. + LIVE + + A release that was recorded live. + - REMIX - A release that was (re)mixed from previously released -material. + REMIX + + A release that was (re)mixed from previously released +material. + - DJMIX - A DJ-mix is a sequence of several recordings played one + DJMIX + + A DJ-mix is a sequence of several recordings played one after the other, each one modified so that they blend together into a continuous flow of music. A DJ mix release requires that the recordings be modified in some manner, and the DJ who does this modification is usually (although not always) -credited in a fairly prominent way. +credited in a fairly prominent way. + - MIXTAPE - Promotional in nature (but not necessarily free), mixtapes + MIXTAPE + + Promotional in nature (but not necessarily free), mixtapes and street albums are often released by artists to promote new artists, or upcoming studio albums by prominent artists. They are also sometimes used to keep fans’ attention between studio releases and are most common in rap & hip @@ -3927,16 +4637,21 @@ mixes (which are usually deemed compilations) and are defined by having a significant proportion of new material, including original production or original vocals over top of other artists’ instrumentals. They are distinct from demos in that they are designed for release directly to the public and fans, not -to labels. +to labels. + - DEMO - A release that was recorded for limited circulation or -reference use rather than for general public release. + DEMO + + A release that was recorded for limited circulation or +reference use rather than for general public release. + - NAT - A non-album track (special case). + NAT + + A non-album track (special case). + @@ -3950,25 +4665,33 @@ bootleg, etc. Description - OFFICIAL - Any release officially sanctioned by the artist and/or their -record company. (Most releases will fit into this category.) + OFFICIAL + + Any release officially sanctioned by the artist and/or their +record company. (Most releases will fit into this category.) + - PROMOTION - A giveaway release or a release intended to promote an + PROMOTION + + A giveaway release or a release intended to promote an upcoming official release, e.g. prerelease albums or releases included with a -magazine. +magazine. + - BOOTLEG - An unofficial/underground release that was not sanctioned by -the artist and/or the record company. + BOOTLEG + + An unofficial/underground release that was not sanctioned by +the artist and/or the record company. + - PSEUDORELEASE - A pseudo-release is a duplicate release for -translation/transliteration purposes. + PSEUDORELEASE + + A pseudo-release is a duplicate release for +translation/transliteration purposes. + @@ -4049,9 +4772,11 @@ An entity in the MusicBrainz schema. - mbid + mbid MBID! - The MBID of the entity. + + The MBID of the entity. + @@ -4067,8 +4792,10 @@ An object with an ID - id + id ID! - The id of the object. + + The id of the object. + diff --git a/schema.json b/schema.json index d16e86b..114347e 100644 --- a/schema.json +++ b/schema.json @@ -2012,6 +2012,22 @@ "ofType": null } }, + "isDeprecated": true, + "deprecationReason": "The `artistCredit` field has been renamed to\n`artistCredits`, since it is a list of credits and is referred to in the\nplural form throughout the MusicBrainz documentation. This field is deprecated\nand will be removed in a major release in the future. Use the equivalent\n`artistCredits` field." + }, + { + "name": "artistCredits", + "description": "The main credited artist(s).", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ArtistCredit", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, @@ -2580,6 +2596,22 @@ "ofType": null } }, + "isDeprecated": true, + "deprecationReason": "The `artistCredit` field has been renamed to\n`artistCredits`, since it is a list of credits and is referred to in the\nplural form throughout the MusicBrainz documentation. This field is deprecated\nand will be removed in a major release in the future. Use the equivalent\n`artistCredits` field." + }, + { + "name": "artistCredits", + "description": "The main credited artist(s).", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ArtistCredit", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, @@ -4979,6 +5011,22 @@ "ofType": null } }, + "isDeprecated": true, + "deprecationReason": "The `artistCredit` field has been renamed to\n`artistCredits`, since it is a list of credits and is referred to in the\nplural form throughout the MusicBrainz documentation. This field is deprecated\nand will be removed in a major release in the future. Use the equivalent\n`artistCredits` field." + }, + { + "name": "artistCredits", + "description": "The main credited artist(s).", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ArtistCredit", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, diff --git a/scripts/render-types.js b/scripts/render-types.js index 28786e0..1e1fbb5 100644 --- a/scripts/render-types.js +++ b/scripts/render-types.js @@ -54,9 +54,15 @@ function renderObject (type, { skipTitle = false } = {}) { console.log('') type.fields.forEach(field => { console.log(' ') - console.log(` ${field.name}`) + console.log(` ${field.name} ${field.isDeprecated ? '⚠️' : ''}`) console.log(` ${markdown(renderType(field.type))}`) - console.log(` ${markdown(field.description)}`) + console.log(` `) + console.log(` ${markdown(field.description)}`) + if (field.isDeprecated) { + console.log('

⚠️ DEPRECATED

') + console.log(`
${markdown(field.deprecationReason)}
`) + } + console.log(' ') console.log(' ') if (field.args.length) { field.args.forEach((arg, i) => { @@ -129,8 +135,14 @@ enums.forEach(type => { console.log('') type.enumValues.forEach(value => { console.log(' ') - console.log(` ${value.name}`) - console.log(` ${markdown(value.description)}`) + console.log(` ${value.name} ${value.isDeprecated ? '⚠️' : ''}`) + console.log(' ') + console.log(` ${markdown(value.description)}`) + if (value.isDeprecated) { + console.log('

⚠️ DEPRECATED

') + console.log(`
${markdown(value.deprecationReason)}
`) + } + console.log(' ') console.log(' ') }) console.log('') diff --git a/src/resolvers.js b/src/resolvers.js index 69d72fc..4968ee6 100644 --- a/src/resolvers.js +++ b/src/resolvers.js @@ -40,6 +40,7 @@ export function includeSubqueries (params, info, fragments = info.fragments) { const subqueryIncludes = { aliases: 'aliases', artistCredit: 'artist-credits', + artistCredits: 'artist-credits', tags: 'tags' } let fields = getFields(info, fragments) @@ -177,15 +178,15 @@ export function resolveLinked (entity, args, context, info) { * for a particular field that's being requested, make another request to grab * it (after making sure it isn't already available). */ -export function createSubqueryResolver (includeValue, handler = value => value) { +export function createSubqueryResolver ({ inc, key } = {}, handler = value => value) { return (entity, args, { loaders }, info) => { - const key = toDashed(info.fieldName) + key = key || toDashed(info.fieldName) let promise if (key in entity || (entity._inc && entity._inc.indexOf(key) >= 0)) { promise = Promise.resolve(entity) } else { const { _type: entityType, id } = entity - const params = { inc: [includeValue || key] } + const params = { inc: [inc || key] } promise = loaders.lookup.load([entityType, id, params]) } return promise.then(entity => handler(entity[key], args)) diff --git a/src/types/artist-credit.js b/src/types/artist-credit.js index cdaf3c6..0d6f59b 100644 --- a/src/types/artist-credit.js +++ b/src/types/artist-credit.js @@ -30,7 +30,7 @@ track, etc.` type: GraphQLString, description: `Join phrases might include words and/or punctuation to separate artist names as they appear on the release, track, etc.`, - resolve: data => data['joinphrase'] + resolve: data => data.joinphrase } }) }) diff --git a/src/types/helpers.js b/src/types/helpers.js index e242e9f..2c8423d 100644 --- a/src/types/helpers.js +++ b/src/types/helpers.js @@ -55,6 +55,22 @@ export function toWords (name) { }) } +export function resolveHyphenated (obj, args, context, info) { + const name = toDashed(info.fieldName) + return obj[name] +} + +export function resolveWithFallback (keys) { + return (obj) => { + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + if (key in obj) { + return obj[key] + } + } + } +} + export function fieldWithID (name, config = {}) { config = { type: GraphQLString, @@ -77,22 +93,6 @@ field.`, } } -export function resolveHyphenated (obj, args, context, info) { - const name = dashify(info.fieldName) - return obj[name] -} - -export function resolveWithFallback (keys) { - return (obj) => { - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - if (key in obj) { - return obj[key] - } - } - } -} - export const id = globalIdField() export const mbid = { type: new GraphQLNonNull(MBID), @@ -196,10 +196,19 @@ alternate names or misspellings.`, resolve: createSubqueryResolver() } -export const artistCredit = { +export const artistCredits = { type: new GraphQLList(ArtistCredit), description: 'The main credited artist(s).', - resolve: createSubqueryResolver() + resolve: createSubqueryResolver({ key: 'artist-credit' }) +} + +export const artistCredit = { + ...artistCredits, + deprecationReason: `The \`artistCredit\` field has been renamed to +\`artistCredits\`, since it is a list of credits and is referred to in the +plural form throughout the MusicBrainz documentation. This field is deprecated +and will be removed in a major release in the future. Use the equivalent +\`artistCredits\` field.` } export const releaseGroupType = { @@ -229,7 +238,7 @@ export const releaseGroups = linkedQuery(ReleaseGroupConnection, { } }) export const tags = linkedQuery(TagConnection, { - resolve: createSubqueryResolver('tags', (value = [], args) => ({ + resolve: createSubqueryResolver({}, (value = [], args) => ({ totalCount: value.length, ...connectionFromArray(value, args) })) diff --git a/src/types/recording.js b/src/types/recording.js index cf795a4..47119fc 100644 --- a/src/types/recording.js +++ b/src/types/recording.js @@ -8,6 +8,7 @@ import { disambiguation, aliases, artistCredit, + artistCredits, artists, releases, relationships, @@ -37,6 +38,7 @@ or mixing.`, disambiguation, aliases, artistCredit, + artistCredits, length: { type: GraphQLInt, description: `An approximation to the length of the recording, calculated diff --git a/src/types/release-group.js b/src/types/release-group.js index 6ae6d9a..9b36db2 100644 --- a/src/types/release-group.js +++ b/src/types/release-group.js @@ -10,6 +10,7 @@ import { disambiguation, aliases, artistCredit, + artistCredits, artists, releases, relationships, @@ -37,6 +38,7 @@ album – it doesn’t matter how many CDs or editions/versions it had.`, disambiguation, aliases, artistCredit, + artistCredits, firstReleaseDate: { type: DateType, description: 'The date of the earliest release in the group.', diff --git a/src/types/release.js b/src/types/release.js index 9e30d5c..7f4f0e4 100644 --- a/src/types/release.js +++ b/src/types/release.js @@ -11,6 +11,7 @@ import { disambiguation, aliases, artistCredit, + artistCredits, artists, labels, recordings, @@ -37,6 +38,7 @@ MusicBrainz as one release.`, disambiguation, aliases, artistCredit, + artistCredits, releaseEvents: { type: new GraphQLList(ReleaseEvent), description: 'The release events for this release.', diff --git a/test/fixtures/062868f6b4e58067a80a3174bda59ce9 b/test/fixtures/062868f6b4e58067a80a3174bda59ce9 new file mode 100644 index 0000000..2fce5ac Binary files /dev/null and b/test/fixtures/062868f6b4e58067a80a3174bda59ce9 differ diff --git a/test/fixtures/062868f6b4e58067a80a3174bda59ce9.headers b/test/fixtures/062868f6b4e58067a80a3174bda59ce9.headers new file mode 100644 index 0000000..aa2261c --- /dev/null +++ b/test/fixtures/062868f6b4e58067a80a3174bda59ce9.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Sun, 11 Dec 2016 19:09:42 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "436", + "x-ratelimit-reset": "1481483383", + "server": "Plack::Handler::Starlet", + "etag": "W/\"54c3ce0c0b89068301c6398acc373f1d\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/recording/07649758-09c8-4d70-bc6f-5c37ab36334d?inc=artist-credits&fmt=json", + "time": 415, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.1.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8 b/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8 new file mode 100644 index 0000000..adb23f6 Binary files /dev/null and b/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8 differ diff --git a/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8.headers b/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8.headers new file mode 100644 index 0000000..d4110db --- /dev/null +++ b/test/fixtures/0d51f45ab918425f0e5c7ff08e9fd0b8.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Sun, 11 Dec 2016 19:09:42 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "434", + "x-ratelimit-reset": "1481483383", + "server": "Plack::Handler::Starlet", + "etag": "W/\"75e29d38d42caac97bdac8d6b2ea2212\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group/53614893-6f25-4519-9cae-b1db904e2887?inc=artist-credits&fmt=json", + "time": 418, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.1.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/b7b4645eb7db0efa5e012a0155892a26 b/test/fixtures/b7b4645eb7db0efa5e012a0155892a26 new file mode 100644 index 0000000..e23bca7 Binary files /dev/null and b/test/fixtures/b7b4645eb7db0efa5e012a0155892a26 differ diff --git a/test/fixtures/b7b4645eb7db0efa5e012a0155892a26.headers b/test/fixtures/b7b4645eb7db0efa5e012a0155892a26.headers new file mode 100644 index 0000000..3a7972f --- /dev/null +++ b/test/fixtures/b7b4645eb7db0efa5e012a0155892a26.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Sun, 11 Dec 2016 19:09:42 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "439", + "x-ratelimit-reset": "1481483383", + "server": "Plack::Handler::Starlet", + "etag": "W/\"8a9ee65e910a0be7a5dcfa7974758c30\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release/d5cdb7fd-c7e9-460a-9549-8a369655cc52?inc=artist-credits&fmt=json", + "time": 418, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.1.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/schema.js b/test/schema.js index 2bc8372..09ba45a 100644 --- a/test/schema.js +++ b/test/schema.js @@ -479,3 +479,59 @@ test('Artists have a list of ISNIs and IPIs', testData, t.deepEqual(artist.ipis, ['00006457004']) t.deepEqual(artist.isnis, ['0000000110273481']) }) + +test('artistCredits is an alias for artistCredit', testData, + ` + { + lookup { + recording(mbid: "07649758-09c8-4d70-bc6f-5c37ab36334d") { + artistCredit { + name + joinPhrase + } + artistCredits { + name + joinPhrase + } + } + release(mbid: "d5cdb7fd-c7e9-460a-9549-8a369655cc52") { + artistCredit { + name + joinPhrase + } + artistCredits { + name + joinPhrase + } + } + releaseGroup(mbid: "53614893-6f25-4519-9cae-b1db904e2887") { + artistCredit { + name + joinPhrase + } + artistCredits { + name + joinPhrase + } + } + } + } + `, (t, data) => { + const { recording, release, releaseGroup } = data.lookup + t.deepEqual(recording.artistCredit, [ + { name: 'Holly Golightly', joinPhrase: ' & ' }, + { name: 'The Brokeoffs', joinPhrase: '' } + ]) + t.deepEqual(recording.artistCredits, recording.artistCredit) + + t.deepEqual(release.artistCredit, [ + { name: 'Leonard Cohen', joinPhrase: '' } + ]) + t.deepEqual(release.artistCredits, release.artistCredit) + + t.deepEqual(releaseGroup.artistCredit, [ + { name: 'DJ Muggs', joinPhrase: ' vs. ' }, + { name: 'Ill Bill', joinPhrase: '' } + ]) + t.deepEqual(releaseGroup.artistCredits, releaseGroup.artistCredit) + })