Skip to content

Commit

Permalink
chore: update metaphysics graphql schema (#10741)
Browse files Browse the repository at this point in the history
* chore: update metaphysics graphql schema

* Update type info per schema changes

---------

Co-authored-by: Jon Allured <[email protected]>
  • Loading branch information
artsyit and jonallured authored Sep 10, 2024
1 parent 0f81b51 commit 6515014
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 262 deletions.
262 changes: 3 additions & 259 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8206,23 +8206,6 @@ type CreateSaleAgreementSuccess {
saleAgreement: SaleAgreement
}

# Autogenerated input type of CreateSavedSearch
input CreateSavedSearchInput {
attributes: SearchCriteriaAttributes!

# A unique identifier for the client performing the mutation.
clientMutationId: String
userAlertSettings: UserAlertSettingsInput
}

# Autogenerated return type of CreateSavedSearch
type CreateSavedSearchPayload {
# A unique identifier for the client performing the mutation.
clientMutationId: String
me: Me
savedSearchOrErrors: SearchCriteriaOrErrorsUnion!
}

# Autogenerated input type of CreateSmsSecondFactor
input CreateSmsSecondFactorInput {
attributes: SmsSecondFactorAttributes!
Expand Down Expand Up @@ -9029,22 +9012,6 @@ type Device {
token: String!
}

# Autogenerated input type of DisableSavedSearch
input DisableSavedSearchInput {
# A unique identifier for the client performing the mutation.
clientMutationId: String

# search criteria id
searchCriteriaID: String!
}

# Autogenerated return type of DisableSavedSearch
type DisableSavedSearchPayload {
# A unique identifier for the client performing the mutation.
clientMutationId: String
savedSearchOrErrors: SearchCriteriaOrErrorsUnion!
}

# Autogenerated input type of DisableSecondFactor
input DisableSecondFactorInput {
# A unique identifier for the client performing the mutation.
Expand Down Expand Up @@ -11977,20 +11944,15 @@ type MarketingCollectionGroup {
}

enum MarketingCollectionGroupTypeEnum {
# Artist-focused collections, not to be confused with actual ArtistSeries
ArtistSeries
FeaturedCollections
OtherCollections
}

type MarketingCollectionQuery {
artistIDs: [String!]
geneIDs: [String!]

# Is always null, will be eliminated later
id: ID

# Is always null, will be eliminated later
artistIDs: [String]
geneIDs: [String]
id: String
internalID: ID
keyword: String
tagID: String
Expand Down Expand Up @@ -12533,17 +12495,6 @@ type Me implements Node {
# If present, will search by term
term: String
): SaleRegistrationConnection
savedSearch(criteria: SearchCriteriaAttributes, id: ID): SearchCriteria
savedSearchesConnection(
after: String

# Returns saved searches associated with the provided artist IDs
artistIDs: [String!]
before: String
first: Int
last: Int
sort: SavedSearchesSortEnum
): SearchCriteriaConnection
secondFactors(kinds: [SecondFactorKind]): [SecondFactor]
shareFollows: Boolean!

Expand Down Expand Up @@ -13156,10 +13107,6 @@ type Mutation {

# Creates a static Markdown-backed sale agreement.
createSaleAgreement(input: CreateSaleAgreementMutationInput!): CreateSaleAgreementMutationPayload
createSavedSearch(
# Parameters for CreateSavedSearch
input: CreateSavedSearchInput!
): CreateSavedSearchPayload
createSmsSecondFactor(
# Parameters for CreateSmsSecondFactor
input: CreateSmsSecondFactorInput!
Expand Down Expand Up @@ -13283,10 +13230,6 @@ type Mutation {
# Parameters for DeliverSecondFactor
input: DeliverSecondFactorInput!
): DeliverSecondFactorPayload
disableSavedSearch(
# Parameters for DisableSavedSearch
input: DisableSavedSearchInput!
): DisableSavedSearchPayload
disableSecondFactor(
# Parameters for DisableSecondFactor
input: DisableSecondFactorInput!
Expand Down Expand Up @@ -13507,10 +13450,6 @@ type Mutation {

# Updates a saleAgreement.
updateSaleAgreement(input: UpdateSaleAgreementMutationInput!): UpdateSaleAgreementMutationPayload
updateSavedSearch(
# Parameters for UpdateSavedSearch
input: UpdateSavedSearchInput!
): UpdateSavedSearchPayload
updateSmsSecondFactor(
# Parameters for UpdateSmsSecondFactor
input: UpdateSmsSecondFactorInput!
Expand Down Expand Up @@ -15569,30 +15508,6 @@ type Query {
# Find partners by IDs
_unused_gravity_partners(ids: [ID!]!): [DoNotUseThisPartner!]

# Find a saved search by ID or criteria
_unused_gravity_savedSearch(criteria: SearchCriteriaAttributes, id: ID): SearchCriteria

# List of user's saved searches
_unused_gravity_savedSearchesConnection(
# Returns the elements in the list that come after the specified cursor.
after: String

# Returns saved searches associated with the provided artist IDs (or slugs)
artistIDs: [String!]

# Returns the elements in the list that come before the specified cursor.
before: String

# Returns the first _n_ elements from the list.
first: Int

# Returns the last _n_ elements from the list.
last: Int

# Returns saved searches sorted by input (default: by created date in descending order)
sort: SavedSearchesSortEnum
): SearchCriteriaConnection

# List enabled Two-Factor Authentication factors
_unused_gravity_secondFactors(kinds: [SecondFactorKind!] = [app, sms, backup]): [SecondFactor!]!

Expand Down Expand Up @@ -17767,23 +17682,6 @@ type SavedArtworksEdge {
node: Artwork
}

# Saved Search User Alert Settings
type SavedSearchUserAlertSettings {
details: String
email: Boolean!
frequency: UserSearchCriteriaFrequency!
name: String
push: Boolean!
}

enum SavedSearchesSortEnum {
# Sort by created date in descending order
CREATED_AT_DESC

# Sort by name in ascending order
NAME_ASC
}

enum SearchAggregation {
TYPE
}
Expand All @@ -17794,126 +17692,6 @@ type SearchAggregationResults {
slice: SearchAggregation
}

# Search criteria
type SearchCriteria {
acquireable: Boolean

# Medium slug
additionalGeneIDs: [String!]!

# Medium name
additionalGeneNames: [String!]!
artistID: String @deprecated(reason: "Deprecated in favor of artistIDs array")
artistIDs: [String!]
artistSeriesIDs: [String!]!
artistsConnection(
after: String
before: String
first: Int
ids: [String]
last: Int
sort: ArtistSorts
term: String
): ArtistConnection
atAuction: Boolean
attributionClass: [String!]!
colors: [String!]!
dimensionRange: String
displayName: String!

# Human readable price range value
formattedPriceRange: String
height: String
highPriceAmount(
decimal: String = "."

# Allows control of symbol position (%v = value, %s = symbol)
format: String = "%s%v"
precision: Int = 0
symbol: String
thousand: String = ","
): String
href: String!
inquireableOnly: Boolean
internalID: ID!
keyword: String

# Human-friendly labels that are added by Metaphysics to the upstream SearchCriteria type coming from Gravity
labels: [SearchCriteriaLabel!]!
locationCities: [String!]!
lowPriceAmount(
decimal: String = "."

# Allows control of symbol position (%v = value, %s = symbol)
format: String = "%s%v"
precision: Int = 0
symbol: String
thousand: String = ","
): String
majorPeriods: [String!]!
materialsTerms: [String!]!
offerable: Boolean
partnerIDs: [String!]!
priceRange: String
sizes: [String!]!

# Summary of the fields selected
summary: JSON
userAlertSettings: SavedSearchUserAlertSettings!
userSearchCriteriaCount: Int!
width: String
}

# Attributes for a search criteria
input SearchCriteriaAttributes {
acquireable: Boolean = null
additionalGeneIDs: [String!] = []

# DEPRECATED Please use artistIDs instead
artistID: String = null
artistIDs: [String!] = []
artistSeriesIDs: [String!] = []
atAuction: Boolean = null
attributionClass: [String!] = []
colors: [String!] = []
dimensionRange: String = null
height: String = null
inquireableOnly: Boolean = null
keyword: String = null
locationCities: [String!] = []
majorPeriods: [String!] = []
materialsTerms: [String!] = []
offerable: Boolean = null
partnerIDs: [String!] = []
priceRange: String = null
sizes: [String!] = []
width: String = null
}

# The connection type for SearchCriteria.
type SearchCriteriaConnection {
# A list of edges.
edges: [SearchCriteriaEdge]

# A list of nodes.
nodes: [SearchCriteria]
pageCursors: PageCursors

# Information to aid in pagination.
pageInfo: PageInfo!
totalCount: Int
totalPages: Int
}

# An edge in a connection.
type SearchCriteriaEdge {
# A cursor for use in pagination.
cursor: String!

# The item at the end of the edge.
node: SearchCriteria
}

enum SearchCriteriaFields {
acquireable
additionalGeneIDs
Expand Down Expand Up @@ -17949,9 +17727,6 @@ type SearchCriteriaLabel {
value: String!
}

# A search criteria or errors object
union SearchCriteriaOrErrorsUnion = Errors | SearchCriteria

enum SearchEntity {
ARTICLE
ARTIST
Expand Down Expand Up @@ -19596,23 +19371,6 @@ type UpdateSaleAgreementSuccess {
saleAgreement: SaleAgreement
}

# Autogenerated input type of UpdateSavedSearch
input UpdateSavedSearchInput {
attributes: SearchCriteriaAttributes

# A unique identifier for the client performing the mutation.
clientMutationId: String
searchCriteriaID: String!
userAlertSettings: UserAlertSettingsInput
}

# Autogenerated return type of UpdateSavedSearch
type UpdateSavedSearchPayload {
# A unique identifier for the client performing the mutation.
clientMutationId: String
savedSearchOrErrors: SearchCriteriaOrErrorsUnion!
}

# Autogenerated input type of UpdateSmsSecondFactor
input UpdateSmsSecondFactorInput {
attributes: SmsSecondFactorAttributes!
Expand Down Expand Up @@ -20153,15 +19911,6 @@ type UserAdminNotes {
internalID: ID!
}

# Settings for user saved search
input UserAlertSettingsInput {
details: String
email: Boolean
frequency: UserSearchCriteriaFrequency
name: String
push: Boolean
}

# A connection to a list of items.
type UserConnection {
# A list of edges.
Expand Down Expand Up @@ -20435,11 +20184,6 @@ type UserSaleProfile {
zip: String
}

enum UserSearchCriteriaFrequency {
daily
instant
}

union VanityURLEntityType = Fair | Partner

enum VerificationStatuses {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const FeaturedArtistCollectionFixture: FeaturedArtistsTestsQuery["rawResponse"][
},
featuredArtistExclusionIds: [],
query: {
id: "query-id",
artistIDs: [],
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class FullFeaturedArtistList extends React.Component<Props> {
// When a collection contains artistsIDs we want to only display those artists as featured
// instead of all the artists in the collection.
if (artistIDs.length > 0) {
// @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
return allArtists.filter((artist) => artistIDs.includes(artist?.internalID))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ export const FullFeaturedArtistListCollectionFixture: FullFeaturedArtistListTest
},
featuredArtistExclusionIds: [],
query: {
id: "query-id",
artistIDs: [],
},
}
Expand Down

0 comments on commit 6515014

Please sign in to comment.