From 441c9cd8b84dd434dca20a7972d3567d55dfe898 Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Sun, 11 Dec 2016 21:09:37 -0800 Subject: [PATCH] Reorder args so connection pagination args come last --- docs/schema.md | 95 +++---- docs/types.md | 300 ++++++++++---------- schema.json | 628 +++++++++++++++++++++--------------------- src/queries/browse.js | 4 +- src/types/helpers.js | 4 +- 5 files changed, 506 insertions(+), 525 deletions(-) diff --git a/docs/schema.md b/docs/schema.md index f1a5b2e..6b1345b 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -72,14 +72,13 @@ type Area implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # Relationships between this entity and other entitites. @@ -190,23 +189,21 @@ type Artist implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # A list of release groups linked to this entity. releaseGroups( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] + after: String + first: Int ): ReleaseGroupConnection # A list of works linked to this entity. @@ -274,18 +271,14 @@ scalar ASIN type BrowseQuery { # Browse area entities linked to the given arguments. areas( - after: String - first: Int - # The MBID of a collection in which the entity is found. collection: MBID + after: String + first: Int ): AreaConnection # Browse artist entities linked to the given arguments. artists( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID @@ -303,13 +296,12 @@ type BrowseQuery { # The MBID of a work to which the entity is linked. work: MBID + after: String + first: Int ): ArtistConnection # Browse collection entities linked to the given arguments. collections( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID @@ -339,13 +331,12 @@ type BrowseQuery { # The MBID of a work to which the entity is linked. work: MBID + after: String + first: Int ): CollectionConnection # Browse event entities linked to the given arguments. events( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID @@ -357,13 +348,12 @@ type BrowseQuery { # The MBID of a place to which the entity is linked. place: MBID + after: String + first: Int ): EventConnection # Browse label entities linked to the given arguments. labels( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID @@ -372,25 +362,23 @@ type BrowseQuery { # The MBID of a release to which the entity is linked. release: MBID + after: String + first: Int ): LabelConnection # Browse place entities linked to the given arguments. places( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID # The MBID of a collection in which the entity is found. collection: MBID + after: String + first: Int ): PlaceConnection # Browse recording entities linked to the given arguments. recordings( - after: String - first: Int - # The MBID of an artist to which the entity is linked. artist: MBID @@ -403,13 +391,12 @@ type BrowseQuery { # The [International Standard Recording Code](https://musicbrainz.org/doc/ISRC) # (ISRC) of the recording. isrc: ISRC + after: String + first: Int ): RecordingConnection # Browse release entities linked to the given arguments. releases( - after: String - first: Int - # The MBID of an area to which the entity is linked. area: MBID @@ -444,13 +431,12 @@ type BrowseQuery { # A [disc ID](https://musicbrainz.org/doc/Disc_ID) # associated with the release. discID: DiscID + after: String + first: Int ): ReleaseConnection # Browse release group entities linked to the given arguments. releaseGroups( - after: String - first: Int - # The MBID of an artist to which the entity is linked. artist: MBID @@ -462,13 +448,12 @@ type BrowseQuery { # Filter by one or more release group types. type: [ReleaseGroupType] + after: String + first: Int ): ReleaseGroupConnection # Browse work entities linked to the given arguments. works( - after: String - first: Int - # The MBID of an artist to which the entity is linked. artist: MBID @@ -478,6 +463,8 @@ type BrowseQuery { # The [International Standard Musical Work Code](https://musicbrainz.org/doc/ISWC) # (ISWC) of the work. iswc: ISWC + after: String + first: Int ): WorkConnection } @@ -526,23 +513,21 @@ type Collection implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # A list of release groups linked to this entity. releaseGroups( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] + after: String + first: Int ): ReleaseGroupConnection # A list of works linked to this entity. @@ -835,14 +820,13 @@ type Label implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # Relationships between this entity and other entitites. @@ -1151,14 +1135,13 @@ type Recording implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # Relationships between this entity and other entitites. @@ -1564,11 +1547,10 @@ type Release implements Node, Entity { # A list of release groups linked to this entity. releaseGroups( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] + after: String + first: Int ): ReleaseGroupConnection # Relationships between this entity and other entitites. @@ -1668,14 +1650,13 @@ type ReleaseGroup implements Node, Entity { # A list of releases linked to this entity. releases( - after: String - first: Int - # Filter by one or more release group types. type: [ReleaseGroupType] # Filter by one or more release statuses. status: [ReleaseStatus] + after: String + first: Int ): ReleaseConnection # Relationships between this entity and other entitites. diff --git a/docs/types.md b/docs/types.md index c5787cc..acef8b5 100644 --- a/docs/types.md +++ b/docs/types.md @@ -339,16 +339,6 @@ the codes assigned by ISO to countries and subdivisions. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -359,6 +349,16 @@ the codes assigned by ISO to countries and subdivisions. [ReleaseStatus] Filter by one or more release statuses. + + after + String + + + + first + Int + + relationships Relationships @@ -626,16 +626,6 @@ field. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -646,13 +636,6 @@ field. [ReleaseStatus] Filter by one or more release statuses. - - releaseGroups - ReleaseGroupConnection - - A list of release groups linked to this entity. - - after String @@ -663,11 +646,28 @@ field. Int + + releaseGroups + ReleaseGroupConnection + + A list of release groups linked to this entity. + + type [ReleaseGroupType] Filter by one or more release group types. + + after + String + + + + first + Int + + works WorkConnection @@ -841,6 +841,11 @@ entity. Browse area entities linked to the given arguments. + + collection + MBID + The MBID of a collection in which the entity is found. + after String @@ -851,11 +856,6 @@ entity. Int - - collection - MBID - The MBID of a collection in which the entity is found. - artists ArtistConnection @@ -863,16 +863,6 @@ entity. Browse artist entities linked to the given arguments. - - after - String - - - - first - Int - - area MBID @@ -903,13 +893,6 @@ entity. MBID The MBID of a work to which the entity is linked. - - collections - CollectionConnection - - Browse collection entities linked to the given arguments. - - after String @@ -920,6 +903,13 @@ entity. Int + + collections + CollectionConnection + + Browse collection entities linked to the given arguments. + + area MBID @@ -970,13 +960,6 @@ entity. MBID The MBID of a work to which the entity is linked. - - events - EventConnection - - Browse event entities linked to the given arguments. - - after String @@ -987,6 +970,13 @@ entity. Int + + events + EventConnection + + Browse event entities linked to the given arguments. + + area MBID @@ -1007,13 +997,6 @@ entity. MBID The MBID of a place to which the entity is linked. - - labels - LabelConnection - - Browse label entities linked to the given arguments. - - after String @@ -1024,6 +1007,13 @@ entity. Int + + labels + LabelConnection + + Browse label entities linked to the given arguments. + + area MBID @@ -1039,13 +1029,6 @@ entity. MBID The MBID of a release to which the entity is linked. - - places - PlaceConnection - - Browse place entities linked to the given arguments. - - after String @@ -1056,6 +1039,13 @@ entity. Int + + places + PlaceConnection + + Browse place entities linked to the given arguments. + + area MBID @@ -1066,13 +1056,6 @@ entity. MBID The MBID of a collection in which the entity is found. - - recordings - RecordingConnection - - Browse recording entities linked to the given arguments. - - after String @@ -1083,6 +1066,13 @@ entity. Int + + recordings + RecordingConnection + + Browse recording entities linked to the given arguments. + + artist MBID @@ -1104,13 +1094,6 @@ entity. The International Standard Recording Code (ISRC) of the recording. - - releases - ReleaseConnection - - Browse release entities linked to the given arguments. - - after String @@ -1121,6 +1104,13 @@ entity. Int + + releases + ReleaseConnection + + Browse release entities linked to the given arguments. + + area MBID @@ -1178,13 +1168,6 @@ release, but is not included in the credits for the release itself. A disc ID associated with the release. - - releaseGroups - ReleaseGroupConnection - - Browse release group entities linked to the given arguments. - - after String @@ -1195,6 +1178,13 @@ associated with the release. Int + + releaseGroups + ReleaseGroupConnection + + Browse release group entities linked to the given arguments. + + artist MBID @@ -1215,13 +1205,6 @@ associated with the release. [ReleaseGroupType] Filter by one or more release group types. - - works - WorkConnection - - Browse work entities linked to the given arguments. - - after String @@ -1232,6 +1215,13 @@ associated with the release. Int + + works + WorkConnection + + Browse work entities linked to the given arguments. + + artist MBID @@ -1248,6 +1238,16 @@ associated with the release. The International Standard Musical Work Code (ISWC) of the work. + + after + String + + + + first + Int + + ### Collection @@ -1421,16 +1421,6 @@ field. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -1441,13 +1431,6 @@ field. [ReleaseStatus] Filter by one or more release statuses. - - releaseGroups - ReleaseGroupConnection - - A list of release groups linked to this entity. - - after String @@ -1458,11 +1441,28 @@ field. Int + + releaseGroups + ReleaseGroupConnection + + A list of release groups linked to this entity. + + type [ReleaseGroupType] Filter by one or more release group types. + + after + String + + + + first + Int + + works WorkConnection @@ -2059,16 +2059,6 @@ field. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -2079,6 +2069,16 @@ field. [ReleaseStatus] Filter by one or more release statuses. + + after + String + + + + first + Int + + relationships Relationships @@ -2758,16 +2758,6 @@ from the lengths of the tracks using it. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -2778,6 +2768,16 @@ from the lengths of the tracks using it. [ReleaseStatus] Filter by one or more release statuses. + + after + String + + + + first + Int + + relationships Relationships @@ -3782,6 +3782,11 @@ It is not a mark of how good or bad the music itself is – for that, use A list of release groups linked to this entity. + + type + [ReleaseGroupType] + Filter by one or more release group types. + after String @@ -3792,11 +3797,6 @@ It is not a mark of how good or bad the music itself is – for that, use Int - - type - [ReleaseGroupType] - Filter by one or more release group types. - relationships Relationships @@ -4060,16 +4060,6 @@ field. A list of releases linked to this entity. - - after - String - - - - first - Int - - type [ReleaseGroupType] @@ -4080,6 +4070,16 @@ field. [ReleaseStatus] Filter by one or more release statuses. + + after + String + + + + first + Int + + relationships Relationships diff --git a/schema.json b/schema.json index 9619465..f5fcf38 100644 --- a/schema.json +++ b/schema.json @@ -700,26 +700,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -747,6 +727,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -1577,26 +1577,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -1624,20 +1604,7 @@ } }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ReleaseConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "releaseGroups", - "description": "A list of release groups linked to this entity.", - "args": [ + }, { "name": "after", "description": null, @@ -1657,7 +1624,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "ReleaseConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releaseGroups", + "description": "A list of release groups linked to this entity.", + "args": [ { "name": "type", "description": "Filter by one or more release group types.", @@ -1671,6 +1651,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -2145,26 +2145,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -2192,6 +2172,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -2915,6 +2915,20 @@ "name": "releaseGroups", "description": "A list of release groups linked to this entity.", "args": [ + { + "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": "after", "description": null, @@ -2934,20 +2948,6 @@ "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": { @@ -3352,26 +3352,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -3399,6 +3379,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -5208,26 +5208,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -5255,6 +5235,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -6686,26 +6686,6 @@ "name": "releases", "description": "A list of releases linked to this entity.", "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": "type", "description": "Filter by one or more release group types.", @@ -6733,20 +6713,7 @@ } }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ReleaseConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "releaseGroups", - "description": "A list of release groups linked to this entity.", - "args": [ + }, { "name": "after", "description": null, @@ -6766,7 +6733,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "ReleaseConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releaseGroups", + "description": "A list of release groups linked to this entity.", + "args": [ { "name": "type", "description": "Filter by one or more release group types.", @@ -6780,6 +6760,26 @@ } }, "defaultValue": null + }, + { + "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 } ], "type": { @@ -7369,6 +7369,16 @@ "name": "areas", "description": "Browse area entities linked to the given arguments.", "args": [ + { + "name": "collection", + "description": "The MBID of a collection in which the entity is found.", + "type": { + "kind": "SCALAR", + "name": "MBID", + "ofType": null + }, + "defaultValue": null + }, { "name": "after", "description": null, @@ -7388,16 +7398,6 @@ "ofType": null }, "defaultValue": null - }, - { - "name": "collection", - "description": "The MBID of a collection in which the entity is found.", - "type": { - "kind": "SCALAR", - "name": "MBID", - "ofType": null - }, - "defaultValue": null } ], "type": { @@ -7412,26 +7412,6 @@ "name": "artists", "description": "Browse artist 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": "area", "description": "The MBID of an area to which the entity is linked.", @@ -7491,20 +7471,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ArtistConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "collections", - "description": "Browse collection entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7524,7 +7491,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "ArtistConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "collections", + "description": "Browse collection entities linked to the given arguments.", + "args": [ { "name": "area", "description": "The MBID of an area to which the entity is linked.", @@ -7624,20 +7604,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "CollectionConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "events", - "description": "Browse event entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7657,7 +7624,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "CollectionConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "Browse event entities linked to the given arguments.", + "args": [ { "name": "area", "description": "The MBID of an area to which the entity is linked.", @@ -7697,20 +7677,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "EventConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "labels", - "description": "Browse label entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7730,7 +7697,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "EventConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labels", + "description": "Browse label entities linked to the given arguments.", + "args": [ { "name": "area", "description": "The MBID of an area to which the entity is linked.", @@ -7760,20 +7740,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "LabelConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "places", - "description": "Browse place entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7793,7 +7760,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "LabelConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "places", + "description": "Browse place entities linked to the given arguments.", + "args": [ { "name": "area", "description": "The MBID of an area to which the entity is linked.", @@ -7813,20 +7793,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "PlaceConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "recordings", - "description": "Browse recording entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7846,7 +7813,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "PlaceConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "recordings", + "description": "Browse recording entities linked to the given arguments.", + "args": [ { "name": "artist", "description": "The MBID of an artist to which the entity is linked.", @@ -7886,20 +7866,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "RecordingConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "releases", - "description": "Browse release entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -7919,7 +7886,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "RecordingConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releases", + "description": "Browse release entities linked to the given arguments.", + "args": [ { "name": "area", "description": "The MBID of an area to which the entity is linked.", @@ -8037,20 +8017,7 @@ "ofType": null }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ReleaseConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "releaseGroups", - "description": "Browse release group entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -8070,7 +8037,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "ReleaseConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releaseGroups", + "description": "Browse release group entities linked to the given arguments.", + "args": [ { "name": "artist", "description": "The MBID of an artist to which the entity is linked.", @@ -8114,20 +8094,7 @@ } }, "defaultValue": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ReleaseGroupConnection", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "works", - "description": "Browse work entities linked to the given arguments.", - "args": [ + }, { "name": "after", "description": null, @@ -8147,7 +8114,20 @@ "ofType": null }, "defaultValue": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "ReleaseGroupConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "works", + "description": "Browse work entities linked to the given arguments.", + "args": [ { "name": "artist", "description": "The MBID of an artist to which the entity is linked.", @@ -8177,6 +8157,26 @@ "ofType": null }, "defaultValue": null + }, + { + "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 } ], "type": { diff --git a/src/queries/browse.js b/src/queries/browse.js index dc87941..4e1ebd3 100644 --- a/src/queries/browse.js +++ b/src/queries/browse.js @@ -66,8 +66,8 @@ function createBrowseField (connectionType, args) { type: connectionType, description: `Browse ${typeName} entities linked to the given arguments.`, args: { - ...forwardConnectionArgs, - ...args + ...args, + ...forwardConnectionArgs }, resolve: resolveBrowse } diff --git a/src/types/helpers.js b/src/types/helpers.js index 4d13852..2aabb2f 100644 --- a/src/types/helpers.js +++ b/src/types/helpers.js @@ -132,8 +132,8 @@ function linkedQuery (connectionType, { args, ...config } = {}) { type: connectionType, description: `A list of ${typeName} linked to this entity.`, args: { - ...forwardConnectionArgs, - ...args + ...args, + ...forwardConnectionArgs }, resolve: resolveLinked, ...config