Update schema and docs

This commit is contained in:
Brian Beck 2016-12-09 18:56:45 -08:00
parent 325c6db0ce
commit 42f612cc2f
3 changed files with 164 additions and 286 deletions

View file

@ -15,7 +15,7 @@ type Alias {
# The locale (language and/or country) in which the alias is
# used.
locale: String
locale: Locale
# Whether this is the main alias for the entity in the
# specified locale (this could mean the most recent or the most common).
@ -256,6 +256,11 @@ type ArtistEdge {
score: Int
}
# An [Amazon Standard Identification Number](https://musicbrainz.org/doc/ASIN)
# (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com
# and its partners for product identification within the Amazon organization.
scalar ASIN
# A query for all MusicBrainz entities directly linked to another
# entity.
type BrowseQuery {
@ -381,6 +386,12 @@ type BrowseQuery {
# The MBID of a release group to which the entity is linked.
releaseGroup: MBID
# Filter by one or more release group types.
type: [ReleaseGroupType]
# Filter by one or more release statuses.
status: [ReleaseStatus]
): ReleaseConnection
# Browse release group entities linked to the given arguments.
@ -396,6 +407,9 @@ type BrowseQuery {
# The MBID of a release to which the entity is linked.
release: MBID
# Filter by one or more release group types.
type: [ReleaseGroupType]
): ReleaseGroupConnection
# Browse work entities linked to the given arguments.
@ -409,15 +423,6 @@ type BrowseQuery {
# The MBID of a collection in which the entity is found.
collection: MBID
): WorkConnection
# Browse URL entities linked to the given arguments.
urls(
after: String
first: Int
# The web address for which to browse URL entities.
resource: URLString
): URLConnection
}
# Geographic coordinates described with latitude and longitude.
@ -696,6 +701,9 @@ type LifeSpan {
ended: Boolean
}
# Language code, optionally with country and encoding.
scalar Locale
# A lookup of an individual MusicBrainz entity by its MBID.
type LookupQuery {
# Look up a specific area by its MBID.
@ -761,7 +769,10 @@ type LookupQuery {
# Look up a specific URL by its MBID.
url(
# The MBID of the entity.
mbid: MBID!
mbid: MBID
# The web address of the URL entity to look up.
resource: URLString
): URL
# Look up a specific work by its MBID.
@ -1305,6 +1316,10 @@ type Release implements Node, Entity {
# The country in which the release was issued.
country: String
# The [Amazon Standard Identification Number](https://musicbrainz.org/doc/ASIN)
# of the release.
asin: ASIN
# The [barcode](https://en.wikipedia.org/wiki/Barcode), if the
# release has one. The most common types found on releases are 12-digit
# [UPCs](https://en.wikipedia.org/wiki/Universal_Product_Code) and 13-digit
@ -1807,32 +1822,6 @@ type URL implements Node, Entity {
relationships: Relationships
}
# A connection to a list of items.
type URLConnection {
# Information to aid in pagination.
pageInfo: PageInfo!
# A list of edges.
edges: [URLEdge]
# A count of the total number of items in this connection,
# ignoring pagination.
totalCount: Int
}
# An edge in a connection.
type URLEdge {
# The item at the end of the edge
node: URL
# A cursor for use in pagination
cursor: String!
# The relevancy score (0100) assigned by the search engine, if
# these results were found through a search.
score: Int
}
# A web address.
scalar URLString

View file

@ -52,8 +52,6 @@ You may also be interested in reading the [schema in GraphQL syntax](schema.md).
<li>[TagConnection](#tagconnection)</li>
<li>[TagEdge](#tagedge)</li>
<li>[URL](#url)</li>
<li>[URLConnection](#urlconnection)</li>
<li>[URLEdge](#urledge)</li>
<li>[Work](#work)</li>
<li>[WorkConnection](#workconnection)</li>
<li>[WorkEdge](#workedge)</li>
@ -63,12 +61,14 @@ You may also be interested in reading the [schema in GraphQL syntax](schema.md).
<li>[ReleaseStatus](#releasestatus)</li>
</ul></li>
<li>[Scalars](#scalars)<ul>
<li>[ASIN](#asin)</li>
<li>[Boolean](#boolean)</li>
<li>[Date](#date)</li>
<li>[Degrees](#degrees)</li>
<li>[ID](#id)</li>
<li>[IPI](#ipi)</li>
<li>[Int](#int)</li>
<li>[Locale](#locale)</li>
<li>[MBID](#mbid)</li>
<li>[String](#string)</li>
<li>[Time](#time)</li>
@ -147,7 +147,7 @@ the front).</td>
</tr>
<tr>
<td valign="top"><strong>locale</strong></td>
<td valign="top"><a href="#string">String</a></td>
<td valign="top"><a href="#locale">Locale</a></td>
<td>The locale (language and/or country) in which the alias is
used.</td>
</tr>
@ -931,6 +931,16 @@ release, but is not included in the credits for the release itself.</td>
<td valign="top"><a href="#mbid">MBID</a></td>
<td>The MBID of a release group to which the entity is linked.</td>
</tr>
<tr>
<td align="right" valign="top">type</td>
<td valign="top">[<a href="#releasegrouptype">ReleaseGroupType</a>]</td>
<td>Filter by one or more release group types.</td>
</tr>
<tr>
<td align="right" valign="top">status</td>
<td valign="top">[<a href="#releasestatus">ReleaseStatus</a>]</td>
<td>Filter by one or more release statuses.</td>
</tr>
<tr>
<td valign="top"><strong>releaseGroups</strong></td>
<td valign="top"><a href="#releasegroupconnection">ReleaseGroupConnection</a></td>
@ -961,6 +971,11 @@ release, but is not included in the credits for the release itself.</td>
<td valign="top"><a href="#mbid">MBID</a></td>
<td>The MBID of a release to which the entity is linked.</td>
</tr>
<tr>
<td align="right" valign="top">type</td>
<td valign="top">[<a href="#releasegrouptype">ReleaseGroupType</a>]</td>
<td>Filter by one or more release group types.</td>
</tr>
<tr>
<td valign="top"><strong>works</strong></td>
<td valign="top"><a href="#workconnection">WorkConnection</a></td>
@ -986,26 +1001,6 @@ release, but is not included in the credits for the release itself.</td>
<td valign="top"><a href="#mbid">MBID</a></td>
<td>The MBID of a collection in which the entity is found.</td>
</tr>
<tr>
<td valign="top"><strong>urls</strong></td>
<td valign="top"><a href="#urlconnection">URLConnection</a></td>
<td>Browse URL entities linked to the given arguments.</td>
</tr>
<tr>
<td align="right" valign="top">after</td>
<td valign="top"><a href="#string">String</a></td>
<td></td>
</tr>
<tr>
<td align="right" valign="top">first</td>
<td valign="top"><a href="#int">Int</a></td>
<td></td>
</tr>
<tr>
<td align="right" valign="top">resource</td>
<td valign="top"><a href="#urlstring">URLString</a></td>
<td>The web address for which to browse URL entities.</td>
</tr>
</tbody></table>
### Coordinates
@ -1660,9 +1655,14 @@ A lookup of an individual MusicBrainz entity by its MBID.
</tr>
<tr>
<td align="right" valign="top">mbid</td>
<td valign="top"><a href="#mbid">MBID</a>!</td>
<td valign="top"><a href="#mbid">MBID</a></td>
<td>The MBID of the entity.</td>
</tr>
<tr>
<td align="right" valign="top">resource</td>
<td valign="top"><a href="#urlstring">URLString</a></td>
<td>The web address of the URL entity to look up.</td>
</tr>
<tr>
<td valign="top"><strong>work</strong></td>
<td valign="top"><a href="#work">Work</a></td>
@ -2762,6 +2762,12 @@ distribution mechanism.</td>
<td valign="top"><a href="#string">String</a></td>
<td>The country in which the release was issued.</td>
</tr>
<tr>
<td valign="top"><strong>asin</strong></td>
<td valign="top"><a href="#asin">ASIN</a></td>
<td>The <a href="https://musicbrainz.org/doc/ASIN">Amazon Standard Identification Number</a>
of the release.</td>
</tr>
<tr>
<td valign="top"><strong>barcode</strong></td>
<td valign="top"><a href="#string">String</a></td>
@ -3657,64 +3663,6 @@ acquired, an entry in another database, etc.
</tr>
</tbody></table>
### URLConnection
A connection to a list of items.
<table><thead>
<tr>
<th align="left">Field&nbsp;/&nbsp;Argument</th>
<th align="left">Type</th>
<th align="left">Description</th>
</tr>
</thead><tbody>
<tr>
<td valign="top"><strong>pageInfo</strong></td>
<td valign="top"><a href="#pageinfo">PageInfo</a>!</td>
<td>Information to aid in pagination.</td>
</tr>
<tr>
<td valign="top"><strong>edges</strong></td>
<td valign="top">[<a href="#urledge">URLEdge</a>]</td>
<td>A list of edges.</td>
</tr>
<tr>
<td valign="top"><strong>totalCount</strong></td>
<td valign="top"><a href="#int">Int</a></td>
<td>A count of the total number of items in this connection,
ignoring pagination.</td>
</tr>
</tbody></table>
### URLEdge
An edge in a connection.
<table><thead>
<tr>
<th align="left">Field&nbsp;/&nbsp;Argument</th>
<th align="left">Type</th>
<th align="left">Description</th>
</tr>
</thead><tbody>
<tr>
<td valign="top"><strong>node</strong></td>
<td valign="top"><a href="#url">URL</a></td>
<td>The item at the end of the edge</td>
</tr>
<tr>
<td valign="top"><strong>cursor</strong></td>
<td valign="top"><a href="#string">String</a>!</td>
<td>A cursor for use in pagination</td>
</tr>
<tr>
<td valign="top"><strong>score</strong></td>
<td valign="top"><a href="#int">Int</a></td>
<td>The relevancy score (0100) assigned by the search engine, if
these results were found through a search.</td>
</tr>
</tbody></table>
### Work
A [work](https://musicbrainz.org/doc/Work) is a distinct
@ -4013,6 +3961,12 @@ translation/transliteration purposes.</td>
## Scalars
### ASIN
An [Amazon Standard Identification Number](https://musicbrainz.org/doc/ASIN)
(ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com
and its partners for product identification within the Amazon organization.
### Boolean
The `Boolean` scalar type represents `true` or `false`.
@ -4039,6 +3993,10 @@ musical rights management.
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
### Locale
Language code, optionally with country and encoding.
### MBID
The MBID scalar represents MusicBrainz identifiers, which are

View file

@ -364,13 +364,19 @@
"name": "mbid",
"description": "The MBID of the entity.",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "MBID",
"ofType": null
}
"kind": "SCALAR",
"name": "MBID",
"ofType": null
},
"defaultValue": null
},
{
"name": "resource",
"description": "The web address of the URL entity to look up.",
"type": {
"kind": "SCALAR",
"name": "URLString",
"ofType": null
},
"defaultValue": null
}
@ -1017,7 +1023,7 @@
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"name": "Locale",
"ofType": null
},
"isDeprecated": false,
@ -1065,6 +1071,16 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "Locale",
"description": "Language code, optionally with country and encoding.",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "Boolean",
@ -2555,6 +2571,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "asin",
"description": "The [Amazon Standard Identification Number](https://musicbrainz.org/doc/ASIN)\nof the release.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "ASIN",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "barcode",
"description": "The [barcode](https://en.wikipedia.org/wiki/Barcode), if the\nrelease has one. The most common types found on releases are 12-digit\n[UPCs](https://en.wikipedia.org/wiki/Universal_Product_Code) and 13-digit\n[EANs](https://en.wikipedia.org/wiki/International_Article_Number).",
@ -2870,6 +2898,16 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "ASIN",
"description": "An [Amazon Standard Identification Number](https://musicbrainz.org/doc/ASIN)\n(ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com\nand its partners for product identification within the Amazon organization.",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "LabelConnection",
@ -6500,6 +6538,16 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "URLString",
"description": "A web address.",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "URL",
@ -6582,16 +6630,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "URLString",
"description": "A web address.",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "BrowseQuery",
@ -7088,6 +7126,34 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "type",
"description": "Filter by one or more release group types.",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "ReleaseGroupType",
"ofType": null
}
},
"defaultValue": null
},
{
"name": "status",
"description": "Filter by one or more release statuses.",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "ReleaseStatus",
"ofType": null
}
},
"defaultValue": null
}
],
"type": {
@ -7151,6 +7217,20 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "type",
"description": "Filter by one or more release group types.",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "ReleaseGroupType",
"ofType": null
}
},
"defaultValue": null
}
],
"type": {
@ -7213,49 +7293,6 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "urls",
"description": "Browse URL entities linked to the given arguments.",
"args": [
{
"name": "after",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": null,
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "resource",
"description": "The web address for which to browse URL entities.",
"type": {
"kind": "SCALAR",
"name": "URLString",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "URLConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
@ -7369,112 +7406,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "URLConnection",
"description": "A connection to a list of items.",
"fields": [
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "edges",
"description": "A list of edges.",
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "URLEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "totalCount",
"description": "A count of the total number of items in this connection,\nignoring pagination.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "URLEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "node",
"description": "The item at the end of the edge",
"args": [],
"type": {
"kind": "OBJECT",
"name": "URL",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "cursor",
"description": "A cursor for use in pagination",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "score",
"description": "The relevancy score (0100) assigned by the search engine, if\nthese results were found through a search.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "SearchQuery",