diff --git a/_schema.graphql b/_schema.graphql index 3a4f20a085..18b6ca5bd2 100644 --- a/_schema.graphql +++ b/_schema.graphql @@ -1,19 +1,19 @@ directive @principalField on FIELD +# Autogenerated input type of AddAssetToConsignmentSubmission input AddAssetToConsignmentSubmissionInput { - # The type of the asset - asset_type: String! - - # The token provided by Gemini for your asset - gemini_token: String! - - # The id of the submission you want to attach an asset to - submission_id: String! + # A unique identifier for the client performing the mutation. clientMutationId: String + submissionID: ID! + geminiToken: String! + assetType: String } +# Autogenerated return type of AddAssetToConsignmentSubmission type AddAssetToConsignmentSubmissionPayload { - asset: Asset + asset: ConsignmentSubmissionCategoryAsset + + # A unique identifier for the client performing the mutation. clientMutationId: String } @@ -2636,24 +2636,6 @@ type ArtworkVersion { image: Image } -# An asset which is assigned to a consignment submission -type Asset { - # A globally unique ID. - __id: ID! - - # A type-specific ID likely used as a database ID. - id: ID! - - # The convection submission ID - submission_id: String - - # The gemini token for the asset - gemini_token: String - - # The type of the asset - asset_type: String -} - # Fields of an attachment (currently from Radiation) type Attachment { # A globally unique ID. @@ -4763,80 +4745,78 @@ type ConfirmPickupPayload { clientMutationId: String } -# A work to be consigned to the user +# Consignment Submission type ConsignmentSubmission { - # An optional type-specific ID. - id: ID - - # The gravity ID for an Artist + additional_info: String artist_id: String! - - # Does the artwork come with an certificate of authenticity? + assets: [ConsignmentSubmissionCategoryAsset] authenticity_certificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensions_metric: SubmissionDimensionAggregation - - # Is the work a part of an edition - edition: Boolean - - # The number of the individual work if in a set + dimensions_metric: String + edition: String edition_number: String - - # The whole size of the set of works - edition_size: String - - # The height of the work + edition_size: Int height: String - # The city where the work currently resides + # Uniq ID for this submission + id: ID! + internalID: ID location_city: String - - # The country where the work currently resides location_country: String - - # The state where the work currently resides location_state: String - - # The materials in which the work is created medium: String - - # The history of an work + minimum_price_dollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String + user_id: String! + width: String + year: String + artist: Artist +} - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation +enum ConsignmentSubmissionCategoryAggregation { + PAINTING + SCULPTURE + PHOTOGRAPHY + PRINT + DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER + MIXED_MEDIA + PERFORMANCE_ART + INSTALLATION + VIDEO_FILM_ANIMATION + ARCHITECTURE + FASHION_DESIGN_AND_WEARABLE_ART + JEWELRY + DESIGN_DECORATIVE_ART + TEXTILE_ARTS + OTHER +} - # The width of the work - width: String +# Submission Asset +type ConsignmentSubmissionCategoryAsset { + # type of this Asset + asset_type: String! - # The year the work was created - year: String + # gemini token for asset + gemini_token: String - # The user who submitted the work - user_id: ID - artist: Artist + # Uniq ID for this asset + id: ID! + submissionID: ID + submission_id: ID! } -# A connection to a list of items. +# The connection type for Submission. type ConsignmentSubmissionConnection { + # A list of edges. + edges: [SubmissionEdge] + # Information to aid in pagination. pageInfo: PageInfo! - - # A list of edges. - edges: [ConsignmentSubmissionEdge] } # An edge in a connection. @@ -4848,6 +4828,13 @@ type ConsignmentSubmissionEdge { cursor: String! } +enum ConsignmentSubmissionStateAggregation { + DRAFT + SUBMITTED + APPROVED + REJECTED +} + type Convection { geminiTemplateKey: String! } @@ -5063,72 +5050,39 @@ type CreateOrderWithArtworkPayload { clientMutationId: String } +# Autogenerated input type of CreateSubmissionMutation input CreateSubmissionMutationInput { - # The gravity ID for an Artist - artist_id: String! - - # Does the artwork come with an certificate of authenticity? - authenticity_certificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + # A unique identifier for the client performing the mutation. + clientMutationId: String + additionalInfo: String + artistID: String! + authenticityCertificate: Boolean + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensions_metric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set - edition_number: String - - # The whole size of the set of works - edition_size: String - - # The height of the work + editionNumber: String + editionSize: Int height: String - - # The city where the work currently resides - location_city: String - - # The country where the work currently resides - location_country: String - - # The state where the work currently resides - location_state: String - - # The materials in which the work is created + locationCity: String + locationCountry: String + locationState: String medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - user_id: ID - clientMutationId: String } +# Autogenerated return type of CreateSubmissionMutation type CreateSubmissionMutationPayload { - consignment_submission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } # An asset which is assigned to a consignment submission @@ -8104,21 +8058,6 @@ type Mutation { input: CreateGeminiEntryForAssetInput! ): CreateGeminiEntryForAssetPayload - # Create a new consignment submission using Convection - createConsignmentSubmission( - input: CreateSubmissionMutationInput! - ): CreateSubmissionMutationPayload - - # Update a consignment using Convection - updateConsignmentSubmission( - input: UpdateSubmissionMutationInput! - ): UpdateSubmissionMutationPayload - - # Attach an gemini asset to a consignment submission - addAssetToConsignmentSubmission( - input: AddAssetToConsignmentSubmissionInput! - ): AddAssetToConsignmentSubmissionPayload - # Creates an order with an artwork ecommerceCreateOrderWithArtwork( input: CreateOrderWithArtworkInput! @@ -8292,6 +8231,17 @@ type Mutation { commerceSubmitPendingOffer( input: CommerceSubmitPendingOfferInput! ): CommerceSubmitPendingOfferPayload + + # Create an asset + addAssetToConsignmentSubmission( + input: AddAssetToConsignmentSubmissionInput + ): AddAssetToConsignmentSubmissionPayload + createConsignmentSubmission( + input: CreateSubmissionMutationInput + ): CreateSubmissionMutationPayload + updateConsignmentSubmission( + input: UpdateSubmissionMutationInput + ): UpdateSubmissionMutationPayload } input Near { @@ -10447,6 +10397,33 @@ type Query { state: CommerceOrderStateEnum ): CommerceOrderConnectionWithTotalCount + # Get a Submission + submission(id: ID): ConsignmentSubmission + + # Filter all submission + submissions( + # Returns the first _n_ elements from the list. + first: Int + + # Returns the elements in the list that come after the specified cursor. + after: String + + # Returns the last _n_ elements from the list. + last: Int + + # Returns the elements in the list that come before the specified cursor. + before: String + + # Get all submissions with these IDs + ids: [ID] + + # Only get submission by this user_id + user_id: [ID] + + # If present return either completed or not completed submissions + completed: Boolean + ): ConsignmentSubmissionConnection + # Find PartnerStats analyticsPartnerStats(partnerId: String!): AnalyticsPartnerStats marketingCollections( @@ -11671,6 +11648,15 @@ enum SubmissionDimensionAggregation { IN } +# An edge in a connection. +type SubmissionEdge { + # A cursor for use in pagination. + cursor: String! + + # The item at the end of the edge. + node: ConsignmentSubmission +} + enum SubmissionStateAggregation { DRAFT SUBMITTED @@ -11915,75 +11901,40 @@ type UpdateMyProfilePayload { clientMutationId: String } +# Autogenerated input type of UpdateSubmissionMutation input UpdateSubmissionMutationInput { - # The GUID for the submission - id: String! - - # The gravity ID for an Artist - artist_id: String! - - # Does the artwork come with an certificate of authenticity? - authenticity_certificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + # A unique identifier for the client performing the mutation. + clientMutationId: String + id: ID! + additionalInfo: String + artistID: String + authenticityCertificate: Boolean + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensions_metric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set - edition_number: String - - # The whole size of the set of works - edition_size: String - - # The height of the work + editionNumber: String + editionSize: Int height: String - - # The city where the work currently resides - location_city: String - - # The country where the work currently resides - location_country: String - - # The state where the work currently resides - location_state: String - - # The materials in which the work is created + locationCity: String + locationCountry: String + locationState: String medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - user_id: ID - clientMutationId: String } +# Autogenerated return type of UpdateSubmissionMutation type UpdateSubmissionMutationPayload { - consignment_submission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } type User { diff --git a/_schemaV2.graphql b/_schemaV2.graphql index 02136237a7..a1aafba832 100644 --- a/_schemaV2.graphql +++ b/_schemaV2.graphql @@ -9,20 +9,20 @@ type AccountRequest { notes: String } +# Autogenerated input type of AddAssetToConsignmentSubmission input AddAssetToConsignmentSubmissionInput { - # The type of the asset - assetType: String! - - # The token provided by Gemini for your asset - geminiToken: String! - - # The id of the submission you want to attach an asset to - submissionID: String! + # A unique identifier for the client performing the mutation. clientMutationId: String + submissionID: ID! + geminiToken: String! + assetType: String } +# Autogenerated return type of AddAssetToConsignmentSubmission type AddAssetToConsignmentSubmissionPayload { - asset: Asset + asset: ConsignmentSubmissionCategoryAsset + + # A unique identifier for the client performing the mutation. clientMutationId: String } @@ -1305,24 +1305,6 @@ type ArtworkVersion { image: Image } -# An asset which is assigned to a consignment submission -type Asset { - # A globally unique ID. - id: ID! - - # A type-specific ID likely used as a database ID. - internalID: ID! - - # The convection submission ID - submissionID: String - - # The gemini token for the asset - geminiToken: String - - # The type of the asset - assetType: String -} - # Fields of an attachment (currently from Radiation) type Attachment { # A globally unique ID. @@ -3064,80 +3046,78 @@ type ConditionReportRequest { userID: ID } -# A work to be consigned to the user +# Consignment Submission type ConsignmentSubmission { - # An optional type-specific ID. - internalID: ID - - # The gravity ID for an Artist - artistID: String! - - # Does the artwork come with an certificate of authenticity? - authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + additional_info: String + artist_id: String! + assets: [ConsignmentSubmissionCategoryAsset] + authenticity_certificate: Boolean + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition - edition: Boolean - - # The number of the individual work if in a set - editionNumber: String - - # The whole size of the set of works - editionSize: Int - - # The height of the work + dimensions_metric: String + edition: String + edition_number: String + edition_size: Int height: String - # The city where the work currently resides - locationCity: String - - # The country where the work currently resides - locationCountry: String - - # The state where the work currently resides - locationState: String - - # The materials in which the work is created + # Uniq ID for this submission + id: ID! + internalID: ID + location_city: String + location_country: String + location_state: String medium: String - - # The history of an work + minimum_price_dollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String + user_id: String! + width: String + year: String + artist: Artist +} - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation +enum ConsignmentSubmissionCategoryAggregation { + PAINTING + SCULPTURE + PHOTOGRAPHY + PRINT + DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER + MIXED_MEDIA + PERFORMANCE_ART + INSTALLATION + VIDEO_FILM_ANIMATION + ARCHITECTURE + FASHION_DESIGN_AND_WEARABLE_ART + JEWELRY + DESIGN_DECORATIVE_ART + TEXTILE_ARTS + OTHER +} - # The width of the work - width: String +# Submission Asset +type ConsignmentSubmissionCategoryAsset { + # type of this Asset + asset_type: String! - # The year the work was created - year: String + # gemini token for asset + gemini_token: String - # The user who submitted the work - userID: ID - artist: Artist + # Uniq ID for this asset + id: ID! + submissionID: ID + submission_id: ID! } -# A connection to a list of items. +# The connection type for Submission. type ConsignmentSubmissionConnection { + # A list of edges. + edges: [SubmissionEdge] + # Information to aid in pagination. pageInfo: PageInfo! - - # A list of edges. - edges: [ConsignmentSubmissionEdge] } # An edge in a connection. @@ -3149,6 +3129,13 @@ type ConsignmentSubmissionEdge { cursor: String! } +enum ConsignmentSubmissionStateAggregation { + DRAFT + SUBMITTED + APPROVED + REJECTED +} + type ConvectionService { geminiTemplateKey: String! } @@ -3346,72 +3333,39 @@ type CreateGeminiEntryForAssetPayload { clientMutationId: String } +# Autogenerated input type of CreateSubmissionMutation input CreateSubmissionMutationInput { - # The gravity ID for an Artist + # A unique identifier for the client performing the mutation. + clientMutationId: String + additionalInfo: String artistID: String! - - # Does the artwork come with an certificate of authenticity? authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set editionNumber: String - - # The whole size of the set of works editionSize: Int - - # The height of the work height: String - - # The city where the work currently resides locationCity: String - - # The country where the work currently resides locationCountry: String - - # The state where the work currently resides locationState: String - - # The materials in which the work is created medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - userID: ID - clientMutationId: String } +# Autogenerated return type of CreateSubmissionMutation type CreateSubmissionMutationPayload { - consignmentSubmission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } # An asset which is assigned to a consignment submission @@ -5442,21 +5396,6 @@ type Mutation { startIdentityVerification( input: startIdentityVerificationMutationInput! ): startIdentityVerificationMutationPayload - - # Create a new consignment submission using Convection - createConsignmentSubmission( - input: CreateSubmissionMutationInput! - ): CreateSubmissionMutationPayload - - # Update a consignment using Convection - updateConsignmentSubmission( - input: UpdateSubmissionMutationInput! - ): UpdateSubmissionMutationPayload - - # Attach an gemini asset to a consignment submission - addAssetToConsignmentSubmission( - input: AddAssetToConsignmentSubmissionInput! - ): AddAssetToConsignmentSubmissionPayload captureHold(input: CaptureHoldInput!): CaptureHoldPayload holdInventory(input: HoldInventoryInput!): HoldInventoryPayload recordArtworkView(input: RecordArtworkViewInput!): RecordArtworkViewPayload @@ -5523,6 +5462,17 @@ type Mutation { commerceSubmitPendingOffer( input: CommerceSubmitPendingOfferInput! ): CommerceSubmitPendingOfferPayload + + # Create an asset + addAssetToConsignmentSubmission( + input: AddAssetToConsignmentSubmissionInput + ): AddAssetToConsignmentSubmissionPayload + createConsignmentSubmission( + input: CreateSubmissionMutationInput + ): CreateSubmissionMutationPayload + updateConsignmentSubmission( + input: UpdateSubmissionMutationInput + ): UpdateSubmissionMutationPayload } input Near { @@ -6230,6 +6180,33 @@ type Query { state: CommerceOrderStateEnum ): CommerceOrderConnectionWithTotalCount + # Get a Submission + submission(id: ID): ConsignmentSubmission + + # Filter all submission + submissions( + # Returns the first _n_ elements from the list. + first: Int + + # Returns the elements in the list that come after the specified cursor. + after: String + + # Returns the last _n_ elements from the list. + last: Int + + # Returns the elements in the list that come before the specified cursor. + before: String + + # Get all submissions with these IDs + ids: [ID] + + # Only get submission by this user_id + user_id: [ID] + + # If present return either completed or not completed submissions + completed: Boolean + ): ConsignmentSubmissionConnection + # Find PartnerStats analyticsPartnerStats(partnerId: String!): AnalyticsPartnerStats marketingCollections( @@ -7302,6 +7279,15 @@ enum SubmissionDimensionAggregation { IN } +# An edge in a connection. +type SubmissionEdge { + # A cursor for use in pagination. + cursor: String! + + # The item at the end of the edge. + node: ConsignmentSubmission +} + enum SubmissionStateAggregation { DRAFT SUBMITTED @@ -7492,75 +7478,40 @@ type UpdateMyProfilePayload { clientMutationId: String } +# Autogenerated input type of UpdateSubmissionMutation input UpdateSubmissionMutationInput { - # The GUID for the submission - id: String! - - # The gravity ID for an Artist - artistID: String! - - # Does the artwork come with an certificate of authenticity? + # A unique identifier for the client performing the mutation. + clientMutationId: String + id: ID! + additionalInfo: String + artistID: String authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set editionNumber: String - - # The whole size of the set of works editionSize: Int - - # The height of the work height: String - - # The city where the work currently resides locationCity: String - - # The country where the work currently resides locationCountry: String - - # The state where the work currently resides locationState: String - - # The materials in which the work is created medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - userID: ID - clientMutationId: String } +# Autogenerated return type of UpdateSubmissionMutation type UpdateSubmissionMutationPayload { - consignmentSubmission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } type User { diff --git a/hokusai/test.yml b/hokusai/test.yml index caf8ff6cfd..f5587e6317 100644 --- a/hokusai/test.yml +++ b/hokusai/test.yml @@ -10,6 +10,7 @@ services: - CI_PULL_REQUEST=$CI_PULL_REQUEST - CIRCLE_PULL_REQUEST=$CIRCLE_PULL_REQUEST - CIRCLE_BUILD_NUM=$CIRCLE_BUILD_NUM + - ENABLE_CONSIGNMENTS_STITCHING=true env_file: ../.env.test depends_on: - metaphysics-memcached diff --git a/package.json b/package.json index 1e8e31db21..9c4e4b6438 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged; yarn dump:local; git add _schema.graphql _schemaV2.graphql", + "pre-commit": "lint-staged; yarn dump-remote-schema; yarn dump:local; git add _schema.graphql _schemaV2.graphql", "pre-push": "yarn run type-check" } } diff --git a/src/data/complete.queryMap.json b/src/data/complete.queryMap.json index c92b8ca778..db0dffef5c 100644 --- a/src/data/complete.queryMap.json +++ b/src/data/complete.queryMap.json @@ -1593,4 +1593,4 @@ "69a1a26cfc06fa59ee0e7a023a52bad1": "query ForYouRefetchQuery {\n forYou: homePage {\n ...ForYou_forYou\n }\n}\n\nfragment ForYou_forYou on HomePage {\n artwork_modules: artworkModules(maxRails: -1, maxFollowedGeneRails: -1, order: [ACTIVE_BIDS, RECENTLY_VIEWED_WORKS, RECOMMENDED_WORKS, FOLLOWED_ARTISTS, RELATED_ARTISTS, FOLLOWED_GALLERIES, SAVED_WORKS, LIVE_AUCTIONS, CURRENT_FAIRS, FOLLOWED_GENES], exclude: [FOLLOWED_ARTISTS, GENERIC_GENES]) {\n id\n ...ArtworkRail_rail\n }\n artist_modules: artistModules {\n id\n ...ArtistRail_rail\n }\n fairs_module: fairsModule {\n ...FairsRail_fairs_module\n }\n}\n\nfragment ArtworkRail_rail on HomePageArtworkModule {\n title\n key\n results {\n href\n image {\n imageURL\n }\n id\n }\n context {\n __typename\n ... on HomePageRelatedArtistArtworkModule {\n __typename\n artist {\n slug\n internalID\n href\n id\n }\n basedOn {\n name\n id\n }\n }\n ... on HomePageFollowedArtistArtworkModule {\n artist {\n href\n id\n }\n }\n ... on Fair {\n href\n }\n ... on Gene {\n href\n }\n ... on Sale {\n href\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment ArtistRail_rail on HomePageArtistModule {\n id\n key\n results {\n id\n internalID\n ...ArtistCard_artist\n }\n}\n\nfragment FairsRail_fairs_module on HomePageFairsModule {\n results {\n id\n slug\n profile {\n slug\n id\n }\n name\n exhibitionPeriod\n followedArtistArtworks: filterArtworksConnection(first: 3, includeArtworksByFollowedArtists: true) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n otherArtworks: filterArtworksConnection(first: 3) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n }\n}\n\nfragment ArtistCard_artist on Artist {\n id\n slug\n internalID\n href\n name\n formattedNationalityAndBirthday\n avatar: image {\n url(version: \"small\")\n }\n artworksConnection(first: 3) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n }\n}\n", "cf1134a1095fa998034a0a57f6bf2977": "query QueryRenderersForYouQuery {\n forYou: homePage {\n ...ForYou_forYou\n }\n}\n\nfragment ForYou_forYou on HomePage {\n artwork_modules: artworkModules(maxRails: -1, maxFollowedGeneRails: -1, order: [ACTIVE_BIDS, RECENTLY_VIEWED_WORKS, RECOMMENDED_WORKS, FOLLOWED_ARTISTS, RELATED_ARTISTS, FOLLOWED_GALLERIES, SAVED_WORKS, LIVE_AUCTIONS, CURRENT_FAIRS, FOLLOWED_GENES], exclude: [FOLLOWED_ARTISTS, GENERIC_GENES]) {\n id\n ...ArtworkRail_rail\n }\n artist_modules: artistModules {\n id\n ...ArtistRail_rail\n }\n fairs_module: fairsModule {\n ...FairsRail_fairs_module\n }\n}\n\nfragment ArtworkRail_rail on HomePageArtworkModule {\n title\n key\n results {\n href\n image {\n imageURL\n }\n id\n }\n context {\n __typename\n ... on HomePageRelatedArtistArtworkModule {\n __typename\n artist {\n slug\n internalID\n href\n id\n }\n basedOn {\n name\n id\n }\n }\n ... on HomePageFollowedArtistArtworkModule {\n artist {\n href\n id\n }\n }\n ... on Fair {\n href\n }\n ... on Gene {\n href\n }\n ... on Sale {\n href\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment ArtistRail_rail on HomePageArtistModule {\n id\n key\n results {\n id\n internalID\n ...ArtistCard_artist\n }\n}\n\nfragment FairsRail_fairs_module on HomePageFairsModule {\n results {\n id\n slug\n profile {\n slug\n id\n }\n name\n exhibitionPeriod\n image {\n url(version: \"large\")\n }\n followedArtistArtworks: filterArtworksConnection(first: 2, includeArtworksByFollowedArtists: true) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n otherArtworks: filterArtworksConnection(first: 2) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n }\n}\n\nfragment ArtistCard_artist on Artist {\n id\n slug\n internalID\n href\n name\n formattedNationalityAndBirthday\n avatar: image {\n url(version: \"small\")\n }\n artworksConnection(first: 3) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n }\n}\n", "a20d025f689f651d4dd80e2d49b49880": "query ForYouRefetchQuery {\n forYou: homePage {\n ...ForYou_forYou\n }\n}\n\nfragment ForYou_forYou on HomePage {\n artwork_modules: artworkModules(maxRails: -1, maxFollowedGeneRails: -1, order: [ACTIVE_BIDS, RECENTLY_VIEWED_WORKS, RECOMMENDED_WORKS, FOLLOWED_ARTISTS, RELATED_ARTISTS, FOLLOWED_GALLERIES, SAVED_WORKS, LIVE_AUCTIONS, CURRENT_FAIRS, FOLLOWED_GENES], exclude: [FOLLOWED_ARTISTS, GENERIC_GENES]) {\n id\n ...ArtworkRail_rail\n }\n artist_modules: artistModules {\n id\n ...ArtistRail_rail\n }\n fairs_module: fairsModule {\n ...FairsRail_fairs_module\n }\n}\n\nfragment ArtworkRail_rail on HomePageArtworkModule {\n title\n key\n results {\n href\n image {\n imageURL\n }\n id\n }\n context {\n __typename\n ... on HomePageRelatedArtistArtworkModule {\n __typename\n artist {\n slug\n internalID\n href\n id\n }\n basedOn {\n name\n id\n }\n }\n ... on HomePageFollowedArtistArtworkModule {\n artist {\n href\n id\n }\n }\n ... on Fair {\n href\n }\n ... on Gene {\n href\n }\n ... on Sale {\n href\n }\n ... on Node {\n id\n }\n }\n}\n\nfragment ArtistRail_rail on HomePageArtistModule {\n id\n key\n results {\n id\n internalID\n ...ArtistCard_artist\n }\n}\n\nfragment FairsRail_fairs_module on HomePageFairsModule {\n results {\n id\n slug\n profile {\n slug\n id\n }\n name\n exhibitionPeriod\n image {\n url(version: \"large\")\n }\n followedArtistArtworks: filterArtworksConnection(first: 2, includeArtworksByFollowedArtists: true) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n otherArtworks: filterArtworksConnection(first: 2) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n id\n }\n }\n}\n\nfragment ArtistCard_artist on Artist {\n id\n slug\n internalID\n href\n name\n formattedNationalityAndBirthday\n avatar: image {\n url(version: \"small\")\n }\n artworksConnection(first: 3) {\n edges {\n node {\n image {\n url(version: \"large\")\n }\n id\n }\n }\n }\n}\n" -} \ No newline at end of file +} diff --git a/src/data/convection.graphql b/src/data/convection.graphql index 9226f7d2a0..36a11fbe99 100644 --- a/src/data/convection.graphql +++ b/src/data/convection.graphql @@ -2,9 +2,9 @@ input AddAssetToConsignmentSubmissionInput { # A unique identifier for the client performing the mutation. clientMutationId: String - submission_id: ID! - gemini_token: String! - asset_type: String + submissionID: ID! + geminiToken: String! + assetType: String } # Autogenerated return type of AddAssetToConsignmentSubmission @@ -25,6 +25,7 @@ type Asset { # Uniq ID for this asset id: ID! + submissionID: ID submission_id: ID! } @@ -46,26 +47,26 @@ enum Category { OTHER } -# Autogenerated input type of CreateConsignmentSubmission -input CreateConsignmentSubmissionInput { +# Autogenerated input type of CreateSubmissionMutation +input CreateSubmissionMutationInput { # A unique identifier for the client performing the mutation. clientMutationId: String - additional_info: String - artist_id: String! - authenticity_certificate: Boolean + additionalInfo: String + artistID: String! + authenticityCertificate: Boolean category: Category currency: String depth: String - dimensions_metric: String + dimensionsMetric: String edition: Boolean - edition_number: String - edition_size: Int + editionNumber: String + editionSize: Int height: String - location_city: String - location_country: String - location_state: String + locationCity: String + locationCountry: String + locationState: String medium: String - minimum_price_dollars: Int + minimumPriceDollars: Int provenance: String signature: Boolean state: State @@ -74,25 +75,19 @@ input CreateConsignmentSubmissionInput { year: String } -# Autogenerated return type of CreateConsignmentSubmission -type CreateConsignmentSubmissionPayload { +# Autogenerated return type of CreateSubmissionMutation +type CreateSubmissionMutationPayload { # A unique identifier for the client performing the mutation. clientMutationId: String - consignment_submission: Submission + consignmentSubmission: Submission } # Mutation root for this schema type Mutation { # Create an asset - addAssetToConsignmentSubmission( - input: AddAssetToConsignmentSubmissionInput - ): AddAssetToConsignmentSubmissionPayload - createConsignmentSubmission( - input: CreateConsignmentSubmissionInput - ): CreateConsignmentSubmissionPayload - updateConsignmentSubmission( - input: UpdateConsignmentSubmissionInput - ): UpdateConsignmentSubmissionPayload + addAssetToConsignmentSubmission(input: AddAssetToConsignmentSubmissionInput): AddAssetToConsignmentSubmissionPayload + createConsignmentSubmission(input: CreateSubmissionMutationInput): CreateSubmissionMutationPayload + updateConsignmentSubmission(input: UpdateSubmissionMutationInput): UpdateSubmissionMutationPayload } # Information about pagination in a connection. @@ -164,6 +159,7 @@ type Submission { # Uniq ID for this submission id: ID! + internalID: ID location_city: String location_country: String location_state: String @@ -196,27 +192,27 @@ type SubmissionEdge { node: Submission } -# Autogenerated input type of UpdateConsignmentSubmission -input UpdateConsignmentSubmissionInput { +# Autogenerated input type of UpdateSubmissionMutation +input UpdateSubmissionMutationInput { # A unique identifier for the client performing the mutation. clientMutationId: String id: ID! - additional_info: String - artist_id: String - authenticity_certificate: Boolean + additionalInfo: String + artistID: String + authenticityCertificate: Boolean category: Category currency: String depth: String - dimensions_metric: String + dimensionsMetric: String edition: Boolean - edition_number: String - edition_size: Int + editionNumber: String + editionSize: Int height: String - location_city: String - location_country: String - location_state: String + locationCity: String + locationCountry: String + locationState: String medium: String - minimum_price_dollars: Int + minimumPriceDollars: Int provenance: String signature: Boolean state: State @@ -225,9 +221,9 @@ input UpdateConsignmentSubmissionInput { year: String } -# Autogenerated return type of UpdateConsignmentSubmission -type UpdateConsignmentSubmissionPayload { +# Autogenerated return type of UpdateSubmissionMutation +type UpdateSubmissionMutationPayload { # A unique identifier for the client performing the mutation. clientMutationId: String - consignment_submission: Submission + consignmentSubmission: Submission } diff --git a/src/schema/v1/me/__tests__/consignments/add_asset_to_submission_mutation.test.js b/src/schema/v1/me/__tests__/consignments/add_asset_to_submission_mutation.test.js index 05369e7201..21675dd3ef 100644 --- a/src/schema/v1/me/__tests__/consignments/add_asset_to_submission_mutation.test.js +++ b/src/schema/v1/me/__tests__/consignments/add_asset_to_submission_mutation.test.js @@ -2,7 +2,8 @@ import { runAuthenticatedQuery } from "schema/v1/test/utils" import gql from "lib/gql" -describe("addAssetToConsignmentSubmission", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("addAssetToConsignmentSubmission", () => { it("creates a submission and returns its new data payload", () => { const mutation = gql` mutation { diff --git a/src/schema/v1/me/__tests__/consignments/create_submission_mutation.test.js b/src/schema/v1/me/__tests__/consignments/create_submission_mutation.test.js index 25712d16f1..a6ead0586a 100644 --- a/src/schema/v1/me/__tests__/consignments/create_submission_mutation.test.js +++ b/src/schema/v1/me/__tests__/consignments/create_submission_mutation.test.js @@ -4,7 +4,8 @@ import { config as createSubmissionMutation } from "schema/v1/me/consignments/cr import gql from "lib/gql" -describe("UpdateSubmissionMutation", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("UpdateSubmissionMutation", () => { it("does not include the id param", () => { const mutation = createSubmissionMutation expect(Object.keys(mutation.inputFields)).not.toContain("id") diff --git a/src/schema/v1/me/__tests__/consignments/submissions.test.js b/src/schema/v1/me/__tests__/consignments/submissions.test.js index 61c9b9f72a..8f23c85b07 100644 --- a/src/schema/v1/me/__tests__/consignments/submissions.test.js +++ b/src/schema/v1/me/__tests__/consignments/submissions.test.js @@ -2,7 +2,8 @@ import { runAuthenticatedQuery } from "schema/v1/test/utils" import gql from "lib/gql" -describe("submissions", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("submissions", () => { it("asks for a user's submissions", () => { const mutation = gql` { diff --git a/src/schema/v1/me/__tests__/consignments/update_submission_mutation.test.js b/src/schema/v1/me/__tests__/consignments/update_submission_mutation.test.js index 7f80be29ef..a60899567e 100644 --- a/src/schema/v1/me/__tests__/consignments/update_submission_mutation.test.js +++ b/src/schema/v1/me/__tests__/consignments/update_submission_mutation.test.js @@ -3,7 +3,8 @@ import { runAuthenticatedQuery } from "schema/v1/test/utils" import { config as updateSubmissionMutation } from "schema/v1/me/consignments/update_submission_mutation" import gql from "lib/gql" -describe("UpdateSubmissionMutation", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("UpdateSubmissionMutation", () => { it("includes the id param", () => { const mutation = updateSubmissionMutation expect(Object.keys(mutation.inputFields)).toContain("id") diff --git a/src/schema/v2/asset_uploads/__tests__/create_asset_request_mutation.test.js b/src/schema/v2/asset_uploads/__tests__/create_asset_request_mutation.test.js index 444875de4a..fcb85834df 100644 --- a/src/schema/v2/asset_uploads/__tests__/create_asset_request_mutation.test.js +++ b/src/schema/v2/asset_uploads/__tests__/create_asset_request_mutation.test.js @@ -1,7 +1,8 @@ /* eslint-disable promise/always-return */ import { runAuthenticatedQuery } from "schema/v2/test/utils" -describe("addAssetToConsignmentSubmission", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("addAssetToConsignmentSubmission", () => { it("creates a submission and returns its new data payload", async () => { const mutation = ` mutation { diff --git a/src/schema/v2/asset_uploads/__tests__/finalize_asset_mutation.test.js b/src/schema/v2/asset_uploads/__tests__/finalize_asset_mutation.test.js index 84db6c8233..45aa6966ee 100644 --- a/src/schema/v2/asset_uploads/__tests__/finalize_asset_mutation.test.js +++ b/src/schema/v2/asset_uploads/__tests__/finalize_asset_mutation.test.js @@ -2,7 +2,8 @@ import { runAuthenticatedQuery } from "schema/v2/test/utils" import gql from "lib/gql" -describe("CreateGeminiEntryForAsset", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("CreateGeminiEntryForAsset", () => { it("creates a submission and returns its new data payload", () => { const mutation = gql` mutation { diff --git a/src/schema/v2/me/__tests__/consignments/add_asset_to_submission_mutation.test.js b/src/schema/v2/me/__tests__/consignments/add_asset_to_submission_mutation.test.js index 507fe62513..00a40b0ef3 100644 --- a/src/schema/v2/me/__tests__/consignments/add_asset_to_submission_mutation.test.js +++ b/src/schema/v2/me/__tests__/consignments/add_asset_to_submission_mutation.test.js @@ -2,7 +2,8 @@ import { runAuthenticatedQuery } from "schema/v2/test/utils" import gql from "lib/gql" -describe("addAssetToConsignmentSubmission", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("addAssetToConsignmentSubmission", () => { it("creates a submission and returns its new data payload", () => { const mutation = gql` mutation { diff --git a/src/schema/v2/me/__tests__/consignments/create_submission_mutation.test.js b/src/schema/v2/me/__tests__/consignments/create_submission_mutation.test.js index 2170bb30ef..923a1a6937 100644 --- a/src/schema/v2/me/__tests__/consignments/create_submission_mutation.test.js +++ b/src/schema/v2/me/__tests__/consignments/create_submission_mutation.test.js @@ -4,7 +4,8 @@ import { config as createSubmissionMutation } from "schema/v2/me/consignments/cr import gql from "lib/gql" -describe("UpdateSubmissionMutation", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("UpdateSubmissionMutation", () => { it("does not include the id param", () => { const mutation = createSubmissionMutation expect(Object.keys(mutation.inputFields)).not.toContain("id") diff --git a/src/schema/v2/me/__tests__/consignments/submissions.test.js b/src/schema/v2/me/__tests__/consignments/submissions.test.js index e8042618af..d8e5dfad98 100644 --- a/src/schema/v2/me/__tests__/consignments/submissions.test.js +++ b/src/schema/v2/me/__tests__/consignments/submissions.test.js @@ -2,7 +2,8 @@ import { runAuthenticatedQuery } from "schema/v2/test/utils" import gql from "lib/gql" -describe("submissions", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("submissions", () => { it("asks for a user's submissions", async () => { const mutation = gql` { diff --git a/src/schema/v2/me/__tests__/consignments/update_submission_mutation.test.js b/src/schema/v2/me/__tests__/consignments/update_submission_mutation.test.js index 2fe1e77cbc..c6da554eba 100644 --- a/src/schema/v2/me/__tests__/consignments/update_submission_mutation.test.js +++ b/src/schema/v2/me/__tests__/consignments/update_submission_mutation.test.js @@ -3,7 +3,8 @@ import { runAuthenticatedQuery } from "schema/v2/test/utils" import { config as updateSubmissionMutation } from "schema/v2/me/consignments/update_submission_mutation" import gql from "lib/gql" -describe("UpdateSubmissionMutation", () => { +// FIXME: We're now stitching. Remove these files once this work settles +xdescribe("UpdateSubmissionMutation", () => { it("includes the id param", () => { const mutation = updateSubmissionMutation expect(Object.keys(mutation.inputFields)).toContain("id") diff --git a/src/schema/v2/me/consignments/add_asset_to_submission_mutation.ts b/src/schema/v2/me/consignments/add_asset_to_submission_mutation.ts index f9007b4545..375a39153e 100644 --- a/src/schema/v2/me/consignments/add_asset_to_submission_mutation.ts +++ b/src/schema/v2/me/consignments/add_asset_to_submission_mutation.ts @@ -1,3 +1,7 @@ +/** + * FIXME: Deprecated. Remove once Convection stitching settles for a bit + */ + import { GraphQLString, GraphQLNonNull } from "graphql" import { mutationWithClientMutationId } from "graphql-relay" import { AssetType } from "./asset" diff --git a/src/schema/v2/me/consignments/create_submission_mutation.ts b/src/schema/v2/me/consignments/create_submission_mutation.ts index a84bb7aace..fa48e10e79 100644 --- a/src/schema/v2/me/consignments/create_submission_mutation.ts +++ b/src/schema/v2/me/consignments/create_submission_mutation.ts @@ -1,3 +1,7 @@ +/** + * FIXME: Deprecated. Remove once Convection stitching settles for a bit + */ + import { mutationWithClientMutationId, MutationConfig } from "graphql-relay" import { SubmissionType, diff --git a/src/schema/v2/me/consignments/update_submission_mutation.ts b/src/schema/v2/me/consignments/update_submission_mutation.ts index ce3ddf3298..0ee3744d91 100644 --- a/src/schema/v2/me/consignments/update_submission_mutation.ts +++ b/src/schema/v2/me/consignments/update_submission_mutation.ts @@ -1,3 +1,7 @@ +/** + * FIXME: Deprecated. Remove once Convection stitching settles for a bit + */ + import { mutationWithClientMutationId, MutationConfig } from "graphql-relay" import { SubmissionType, diff --git a/src/schema/v2/schema.ts b/src/schema/v2/schema.ts index 7e4162755d..3908c22807 100644 --- a/src/schema/v2/schema.ts +++ b/src/schema/v2/schema.ts @@ -58,9 +58,6 @@ import { UserField } from "./user" import UpdateConversationMutation from "./me/conversation/update_conversation_mutation" import SendConversationMessageMutation from "./me/conversation/send_message_mutation" import UpdateCollectorProfile from "./me/update_collector_profile" -import CreateSubmissionMutation from "./me/consignments/create_submission_mutation" -import UpdateSubmissionMutation from "./me/consignments/update_submission_mutation" -import AddAssetToConsignmentSubmission from "./me/consignments/add_asset_to_submission_mutation" import SaveArtworkMutation from "./me/save_artwork_mutation" import { endSaleMutation } from "./sale/end_sale_mutation" import CreateAssetRequestLoader from "./asset_uploads/create_asset_request_mutation" @@ -83,23 +80,10 @@ import { ShowArtworkGridType } from "./artwork/artworkContextGrids/ShowArtworkGr import ObjectIdentification from "./object_identification" import { ResolverContext } from "types/graphql" -import config from "config" import { ArtworkVersionType } from "./artwork_version" import { HighlightsField } from "./Highlights" import { startIdentityVerificationMutation } from "./startIdentityVerificationMutation" -const { ENABLE_CONSIGNMENTS_STITCHING } = config - -// If you're using stitching then we _don't_ want to include particular mutations -// which come from the stitching instead of our manual version -const stitchedMutations: any = {} - -if (!ENABLE_CONSIGNMENTS_STITCHING) { - stitchedMutations.createConsignmentSubmission = CreateSubmissionMutation - stitchedMutations.updateConsignmentSubmission = UpdateSubmissionMutation - stitchedMutations.addAssetToConsignmentSubmission = AddAssetToConsignmentSubmission -} - const PrincipalFieldDirective = new GraphQLDirective({ name: "principalField", locations: [DirectiveLocation.FIELD], @@ -194,7 +178,6 @@ export default new GraphQLSchema({ requestCredentialsForAssetUpload: CreateAssetRequestLoader, createGeminiEntryForAsset: CreateGeminiEntryForAsset, startIdentityVerification: startIdentityVerificationMutation, - ...stitchedMutations, }, }), query: new GraphQLObjectType({