diff --git a/.vscode/extensions.json b/.vscode/extensions.json index fb782c57155..44495e718b0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,6 @@ { // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format - "recommendations": ["Orta.vscode-ios-common-files", "Orta.vscode-danger", "artsy.artsy-studio-extension-pack"], + "recommendations": ["Orta.vscode-ios-common-files", "Orta.vscode-danger", "artsy.artsy-studio-extension-pack", "meta.relay"], "unwantedRecommendations": ["prisma.vscode-graphql"] } diff --git a/package.json b/package.json index 0e787509999..58f8927eba8 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "prepare": "patch-package && husky install", "prettier-project": "yarn run prettier-write 'src/**/*.{ts,tsx}'", "prettier-write": "prettier --write", - "relay": "relay-compiler", + "relay": "[ -f data/complete.queryMap.json ] || echo '{}' > data/complete.queryMap.json && relay-compiler", "setup:artsy": "./scripts/setup-env-for-artsy", "setup:oss": "./scripts/setup-env-for-oss", "setup:artsy:update!": "scripts/update-env-for-artsy", @@ -173,7 +173,7 @@ "react-native-svg": "9.13.3", "react-native-view-shot": "3.1.2", "react-native-webview": "11.3.1", - "react-relay": "12.0.0", + "react-relay": "14.0.0", "react-spring": "8.0.23", "react-tracking": "9.2.0", "react-use": "17.1.0", @@ -252,7 +252,7 @@ "babel-loader": "8.2.3", "babel-plugin-import-graphql": "2.8.1", "babel-plugin-module-resolver": "4.1.0", - "babel-plugin-relay": "12.0.0", + "babel-plugin-relay": "14.0.0", "chalk": "2.4.2", "check-dependencies": "1.1.0", "cheerio": "0.22.0", @@ -289,12 +289,11 @@ "react-test-renderer": "17.0.2", "recursive-readdir-sync": "1.0.6", "redux-flipper": "2.0.1", - "relay-compiler": "12.0.0", - "relay-compiler-language-typescript": "15.0.1", + "relay-compiler": "14.0.0", "relay-config": "12.0.1", "relay-mock-network-layer": "3.0.0", - "relay-runtime": "12.0.0", - "relay-test-utils": "12.0.0", + "relay-runtime": "14.0.0", + "relay-test-utils": "14.0.0", "rimraf": "3.0.2", "snapshot-diff": "0.2.2", "sponge": "0.1.0", diff --git a/patches/relay-compiler+12.0.0.patch b/patches/relay-compiler+12.0.0.patch deleted file mode 100644 index 236ab9d4b40..00000000000 --- a/patches/relay-compiler+12.0.0.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/node_modules/relay-compiler/bin/relay-compiler b/node_modules/relay-compiler/bin/relay-compiler -index 19536a6..5d1a89b 100755 ---- a/node_modules/relay-compiler/bin/relay-compiler -+++ b/node_modules/relay-compiler/bin/relay-compiler -@@ -291,7 +291,7 @@ function highlightSourceAtLocation(source, location) { - var columnOffset = location.line === 1 ? firstLineColumnOffset : 0; - var columnNum = location.column + columnOffset; - var lines = body.split(/\r\n|[\n\r]/g); -- return "".concat(source.name, " (").concat(lineNum, ":").concat(columnNum, ")\n") + printPrefixedLines([// Lines specified like this: ["prefix", "string"], -+ return "".concat(source.name, ":").concat(lineNum, ":").concat(columnNum, "\n") + printPrefixedLines([// Lines specified like this: ["prefix", "string"], - ["".concat(lineNum - 1, ": "), lines[lineIndex - 1]], ["".concat(lineNum, ": "), lines[lineIndex]], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1, ": "), lines[lineIndex + 1]]]); - } - -@@ -2373,7 +2373,7 @@ var CodegenDirectory = /*#__PURE__*/function () { - _proto.writeFile = function writeFile(filename, content) { - var _this2 = this; - -- var shouldRepersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; -+ var shouldRepersist = true; - Profiler.run('CodegenDirectory.writeFile', function () { - _this2._addGenerated(filename); - -@@ -2399,6 +2399,15 @@ var CodegenDirectory = /*#__PURE__*/function () { - - _proto._writeFile = function _writeFile(filePath, content) { - if (!this.onlyValidate) { -+ // Don't overwrite files that have not changed -+ // This fixes an issue that was causing metro to HMR way too often -+ // on android, and to fall back to a full refresh instead of a fast reload on iOS -+ if (this._filesystem.existsSync(filePath)) { -+ const existing = this._filesystem.readFileSync(filePath, 'utf8').toString() -+ if (existing === content) { -+ return -+ } -+ } - this._filesystem.writeFileSync(filePath, content, 'utf8'); - } - } -@@ -8439,7 +8448,12 @@ function getRelayFileWriter(baseDir, languagePlugin, noFutureProofEnums, outputD - } - - var data = JSON.stringify(object, null, 2); -- fs.writeFileSync(persistedQueryPath, data, 'utf8'); -+ if ( -+ !fs.existsSync(persistedQueryPath) || -+ data !== fs.readFileSync(persistedQueryPath, 'utf8').toString() -+ ) { -+ fs.writeFileSync(persistedQueryPath, data, 'utf8'); -+ } - } - - return results; -@@ -18775,10 +18789,11 @@ module.exports = function (tagFinder, getFileFilter) { - - var astDefinitions = []; - var sources = []; -- memoizedTagFinder(text, baseDir, file).forEach(function (template) { -- var source = new GraphQL.Source(template, file.relPath); -+ -+ memoizedTagFinder(text, baseDir, file).forEach(function (tag) { -+ var source = new GraphQL.Source(tag.template, path.join(path.relative(process.cwd(), baseDir), file.relPath), tag.sourceLocationOffset); - var ast = parseGraphQL(source); -- !ast.definitions.length ? true ? invariant(false, 'RelaySourceModuleParser: Expected GraphQL text to contain at least one ' + 'definition (fragment, mutation, query, subscription), got `%s`.', template) : undefined : void 0; -+ !ast.definitions.length ? true ? invariant(false, 'RelaySourceModuleParser: Expected GraphQL text to contain at least one ' + 'definition (fragment, mutation, query, subscription), got `%s`.', tag.template) : undefined : void 0; - sources.push(source.body); - astDefinitions.push.apply(astDefinitions, (0, _toConsumableArray2["default"])(ast.definitions)); - }); -@@ -18863,9 +18878,7 @@ function find(tagFinder, text, absPath) { - tags.forEach(function (tag) { - return validateTemplate(tag, moduleName, absPath); - }); -- return tags.map(function (tag) { -- return tag.template; -- }); -+ return tags; - } - - function validateTemplate(_ref, moduleName, filePath) { diff --git a/patches/relay-runtime+12.0.0.patch b/patches/relay-runtime+14.0.0.patch similarity index 100% rename from patches/relay-runtime+12.0.0.patch rename to patches/relay-runtime+14.0.0.patch diff --git a/relay.config.js b/relay.config.js index 6e13b51b62a..a19e53f28ef 100644 --- a/relay.config.js +++ b/relay.config.js @@ -3,17 +3,9 @@ module.exports = { schema: "./data/schema.graphql", language: "typescript", artifactDirectory: "./src/__generated__", - persistOutput: "./data/complete.queryMap.json", exclude: ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"], - customScalars: { - /** - * TODO: - * - * In reality this could also be a string when the `format` argument is used, but that's currently not done in - * Emission and currenty no support exists in relay-compiler to be able to deal with that. - * - * See https://github.com/facebook/relay/issues/2830 - */ - FormattedNumber: "Int", + persistConfig: { + file: "./data/complete.queryMap.json", + algorithm: "MD5", }, } diff --git a/src/app/AppRegistry.tsx b/src/app/AppRegistry.tsx index c35994c7b70..2d720900dfa 100644 --- a/src/app/AppRegistry.tsx +++ b/src/app/AppRegistry.tsx @@ -98,7 +98,7 @@ import { PrivacyRequest } from "./Scenes/PrivacyRequest" import { SaleQueryRenderer, SaleScreenQuery } from "./Scenes/Sale" import { SaleFAQ } from "./Scenes/SaleFAQ/SaleFAQ" import { SaleInfoQueryRenderer } from "./Scenes/SaleInfo" -import { SalesQueryRenderer, SalesScreenQuery } from "./Scenes/Sales" +import { SalesQueryRenderer, SalesScreenQuery } from "./Scenes/Sales/Sales" import { SavedAddressesQueryRenderer } from "./Scenes/SavedAddresses/SavedAddresses" import { SavedAddressesFormQueryRenderer } from "./Scenes/SavedAddresses/SavedAddressesForm" import { EditSavedSearchAlertQueryRenderer } from "./Scenes/SavedSearchAlert/EditSavedSearchAlert" diff --git a/src/app/Components/ArticleCard.tsx b/src/app/Components/ArticleCard.tsx index b212ec0e6cf..b0638ba66a2 100644 --- a/src/app/Components/ArticleCard.tsx +++ b/src/app/Components/ArticleCard.tsx @@ -1,4 +1,4 @@ -import { ArticleCard_article } from "__generated__/ArticleCard_article.graphql" +import { ArticleCard_article$data } from "__generated__/ArticleCard_article.graphql" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Flex, Spacer, Text } from "palette" @@ -9,7 +9,7 @@ const WIDTH = 295 const HEIGHT = 230 interface ArticleCardProps extends ViewProps { - article: ArticleCard_article + article: ArticleCard_article$data isFluid?: boolean onPress?(event: GestureResponderEvent): void } diff --git a/src/app/Components/Artist/Articles/Articles.tsx b/src/app/Components/Artist/Articles/Articles.tsx index a168a1c6270..bad349f2b4c 100644 --- a/src/app/Components/Artist/Articles/Articles.tsx +++ b/src/app/Components/Artist/Articles/Articles.tsx @@ -1,4 +1,4 @@ -import { Articles_articles } from "__generated__/Articles_articles.graphql" +import { Articles_articles$data } from "__generated__/Articles_articles.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" import { ArticleCardContainer } from "app/Components/ArticleCard" import { SectionTitle } from "app/Components/SectionTitle" @@ -8,7 +8,7 @@ import { View } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface Props { - articles: Articles_articles + articles: Articles_articles$data } class Articles extends Component { @@ -18,7 +18,7 @@ class Articles extends Component { return ( - + horizontal showsHorizontalScrollIndicator={false} ItemSeparatorComponent={() => } diff --git a/src/app/Components/Artist/ArtistAbout/ArtistAbout.tsx b/src/app/Components/Artist/ArtistAbout/ArtistAbout.tsx index 3f0dab9b4c8..130a45f76ec 100644 --- a/src/app/Components/Artist/ArtistAbout/ArtistAbout.tsx +++ b/src/app/Components/Artist/ArtistAbout/ArtistAbout.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtistAbout_artist } from "__generated__/ArtistAbout_artist.graphql" +import { ArtistAbout_artist$data } from "__generated__/ArtistAbout_artist.graphql" import { ArtistSeriesMoreSeriesFragmentContainer } from "app/Scenes/ArtistSeries/ArtistSeriesMoreSeries" import { extractNodes } from "app/utils/extractNodes" import React from "react" @@ -15,7 +15,7 @@ import Biography from "../Biography" import { ArtistAboutShowsFragmentContainer } from "./ArtistAboutShows" interface Props { - artist: ArtistAbout_artist + artist: ArtistAbout_artist$data } export const ArtistAbout: React.FC = ({ artist }) => { diff --git a/src/app/Components/Artist/ArtistAbout/ArtistAboutShows.tsx b/src/app/Components/Artist/ArtistAbout/ArtistAboutShows.tsx index f5fea4a67ea..c24db52d257 100644 --- a/src/app/Components/Artist/ArtistAbout/ArtistAboutShows.tsx +++ b/src/app/Components/Artist/ArtistAbout/ArtistAboutShows.tsx @@ -1,4 +1,4 @@ -import { ArtistAboutShows_artist } from "__generated__/ArtistAboutShows_artist.graphql" +import { ArtistAboutShows_artist$data } from "__generated__/ArtistAboutShows_artist.graphql" import { navigate } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" import { Button, Flex, Spacer, Text } from "palette" @@ -9,7 +9,7 @@ import { useScreenDimensions } from "shared/hooks" import { ArtistShowFragmentContainer } from "../ArtistShows/ArtistShow" interface Props { - artist: ArtistAboutShows_artist + artist: ArtistAboutShows_artist$data } const ArtistAboutShows: React.FC = ({ artist }) => { diff --git a/src/app/Components/Artist/ArtistArtworks/ArtistArtworks.tsx b/src/app/Components/Artist/ArtistArtworks/ArtistArtworks.tsx index 83f14a48519..90682fc211e 100644 --- a/src/app/Components/Artist/ArtistArtworks/ArtistArtworks.tsx +++ b/src/app/Components/Artist/ArtistArtworks/ArtistArtworks.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { ArtistArtworks_artist } from "__generated__/ArtistArtworks_artist.graphql" +import { ArtistArtworks_artist$data } from "__generated__/ArtistArtworks_artist.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { Aggregations } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { @@ -29,7 +29,7 @@ import { useTracking } from "react-tracking" import { SavedSearchButtonV2 } from "./SavedSearchButtonV2" interface ArtworksGridProps extends InfiniteScrollGridProps { - artist: ArtistArtworks_artist + artist: ArtistArtworks_artist$data searchCriteria: SearchCriteriaAttributes | null relay: RelayPaginationProp } diff --git a/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tests.tsx b/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tests.tsx index cfcd052c093..1e5573dc3ef 100644 --- a/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tests.tsx +++ b/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tests.tsx @@ -1,4 +1,4 @@ -import { ArtistCollectionsRailTestsQueryRawResponse } from "__generated__/ArtistCollectionsRailTestsQuery.graphql" +import { ArtistCollectionsRailTestsQuery } from "__generated__/ArtistCollectionsRailTestsQuery.graphql" import { GenericArtistSeriesRail } from "app/Components/GenericArtistSeriesRail" import { CardRailCard } from "app/Components/Home/CardRailCard" import { GlobalStoreProvider } from "app/store/GlobalStore" @@ -72,125 +72,126 @@ describe("Artist Series Rail", () => { }) }) -const artistMockData: ArtistCollectionsRailTestsQueryRawResponse["artist"] = { +const artistMockData: ArtistCollectionsRailTestsQuery["rawResponse"]["artist"] = { id: "sdfsdfsdfsdf", internalID: "artist0", slug: "david-hockney", } -const collectionsMockData: ArtistCollectionsRailTestsQueryRawResponse["marketingCollections"] = [ - { - id: "coll0", - slug: "cindy-sherman-untitled-film-stills", - title: "Cindy Sherman: Untitled Film Stills", - priceGuidance: 20000, - artworksConnection: { - id: "conn0", - edges: [ - { - node: { - id: "artwork0", - title: "Untitled (Film Still) Tray", - image: { - url: "https://cindy-sherman-untitled-film-stills/medium.jpg", +const collectionsMockData: ArtistCollectionsRailTestsQuery["rawResponse"]["marketingCollections"] = + [ + { + id: "coll0", + slug: "cindy-sherman-untitled-film-stills", + title: "Cindy Sherman: Untitled Film Stills", + priceGuidance: 20000, + artworksConnection: { + id: "conn0", + edges: [ + { + node: { + id: "artwork0", + title: "Untitled (Film Still) Tray", + image: { + url: "https://cindy-sherman-untitled-film-stills/medium.jpg", + }, }, }, - }, - { - node: { - id: "artwork1", - title: "Untitled (Film Still) Tray 2", - image: { - url: "https://cindy-sherman-untitled-film-stills-2/medium.jpg", + { + node: { + id: "artwork1", + title: "Untitled (Film Still) Tray 2", + image: { + url: "https://cindy-sherman-untitled-film-stills-2/medium.jpg", + }, }, }, - }, - { - node: { - id: "artwork2", - title: "Untitled (Film Still) Tray 3", - image: { - url: "https://cindy-sherman-untitled-film-stills-3/medium.jpg", + { + node: { + id: "artwork2", + title: "Untitled (Film Still) Tray 3", + image: { + url: "https://cindy-sherman-untitled-film-stills-3/medium.jpg", + }, }, }, - }, - ], + ], + }, }, - }, - { - id: "coll2", - slug: "damien-hirst-butterflies", - title: "Damien Hirst: Butterflies", - priceGuidance: 7500, - artworksConnection: { - id: "conn2", - edges: [ - { - node: { - id: "artwork0", - title: "Untitled (Film Still) Tray", - image: { - url: "https://damien-hirst-butterflies/larger.jpg", + { + id: "coll2", + slug: "damien-hirst-butterflies", + title: "Damien Hirst: Butterflies", + priceGuidance: 7500, + artworksConnection: { + id: "conn2", + edges: [ + { + node: { + id: "artwork0", + title: "Untitled (Film Still) Tray", + image: { + url: "https://damien-hirst-butterflies/larger.jpg", + }, }, }, - }, - { - node: { - id: "artwork1", - title: "Untitled (Film Still) Tray 2", - image: { - url: "https://damien-hirst-butterflies-2/larger.jpg", + { + node: { + id: "artwork1", + title: "Untitled (Film Still) Tray 2", + image: { + url: "https://damien-hirst-butterflies-2/larger.jpg", + }, }, }, - }, - { - node: { - id: "artwork2", - title: "Untitled (Film Still) Tray 3", - image: { - url: "https://damien-hirst-butterflies-3/larger.jpg", + { + node: { + id: "artwork2", + title: "Untitled (Film Still) Tray 3", + image: { + url: "https://damien-hirst-butterflies-3/larger.jpg", + }, }, }, - }, - ], + ], + }, }, - }, - { - id: "coll1", - slug: "hunt-slonem-bunnies", - title: "Hunt Slonem: Bunnies", - priceGuidance: 2000, - artworksConnection: { - id: "conn1", - edges: [ - { - node: { - id: "artwork0", - title: "Untitled", - image: { - url: "https://hunt-slonem-bunnies/medium.jpg", + { + id: "coll1", + slug: "hunt-slonem-bunnies", + title: "Hunt Slonem: Bunnies", + priceGuidance: 2000, + artworksConnection: { + id: "conn1", + edges: [ + { + node: { + id: "artwork0", + title: "Untitled", + image: { + url: "https://hunt-slonem-bunnies/medium.jpg", + }, }, }, - }, - { - node: { - id: "artwork1", - title: "Untitled2", - image: { - url: "https://hunt-slonem-bunnies-2/medium.jpg", + { + node: { + id: "artwork1", + title: "Untitled2", + image: { + url: "https://hunt-slonem-bunnies-2/medium.jpg", + }, }, }, - }, - { - node: { - id: "artwork2", - title: "Untitled3", - image: { - url: "https://hunt-slonem-bunnies-3/medium.jpg", + { + node: { + id: "artwork2", + title: "Untitled3", + image: { + url: "https://hunt-slonem-bunnies-3/medium.jpg", + }, }, }, - }, - ], + ], + }, }, - }, -] + ] diff --git a/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tsx b/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tsx index 230698809e9..35face8a4cb 100644 --- a/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tsx +++ b/src/app/Components/Artist/ArtistArtworks/ArtistCollectionsRail.tsx @@ -1,5 +1,5 @@ -import { ArtistAbout_artist } from "__generated__/ArtistAbout_artist.graphql" -import { ArtistCollectionsRail_artist } from "__generated__/ArtistCollectionsRail_artist.graphql" +import { ArtistAbout_artist$data } from "__generated__/ArtistAbout_artist.graphql" +import { ArtistCollectionsRail_artist$data } from "__generated__/ArtistCollectionsRail_artist.graphql" import { GenericArtistSeriesRail } from "app/Components/GenericArtistSeriesRail" import { SectionTitle } from "app/Components/SectionTitle" import { Schema } from "app/utils/track" @@ -9,8 +9,8 @@ import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" interface ArtistCollectionsRailProps { - collections: ArtistAbout_artist["iconicCollections"] - artist: ArtistCollectionsRail_artist + collections: ArtistAbout_artist$data["iconicCollections"] + artist: ArtistCollectionsRail_artist$data } export const ArtistCollectionsRail: React.FC = (props) => { diff --git a/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tests.tsx b/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tests.tsx index a2d96c21a44..b6dda53335a 100644 --- a/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tests.tsx +++ b/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tests.tsx @@ -1,4 +1,4 @@ -import { ArtistNotableWorksRailTestsQueryRawResponse } from "__generated__/ArtistNotableWorksRailTestsQuery.graphql" +import { ArtistNotableWorksRailTestsQuery } from "__generated__/ArtistNotableWorksRailTestsQuery.graphql" import { ArtistNotableWorksRailFragmentContainer } from "app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail" import { ArtworkRailCard } from "app/Components/ArtworkRail/ArtworkRailCard" import { PrefetchFlatList } from "app/Components/PrefetchFlatList" @@ -67,7 +67,7 @@ describe("Notable Works Rail", () => { }) }) -const artistMockData: ArtistNotableWorksRailTestsQueryRawResponse["artist"] = { +const artistMockData: ArtistNotableWorksRailTestsQuery["rawResponse"]["artist"] = { id: "an-id", internalID: "an-id", slug: "a-slug", diff --git a/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tsx b/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tsx index 15cc2ac2a05..fbfb57808df 100644 --- a/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tsx +++ b/src/app/Components/Artist/ArtistArtworks/ArtistNotableWorksRail.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtistNotableWorksRail_artist } from "__generated__/ArtistNotableWorksRail_artist.graphql" +import { ArtistNotableWorksRail_artist$data } from "__generated__/ArtistNotableWorksRail_artist.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -11,7 +11,7 @@ import { useTracking } from "react-tracking" import styled from "styled-components/native" interface ArtistNotableWorksRailProps { - artist: ArtistNotableWorksRail_artist + artist: ArtistNotableWorksRail_artist$data } const ArtistNotableWorksRail: React.FC = ({ artist }) => { diff --git a/src/app/Components/Artist/ArtistConsignButton.tsx b/src/app/Components/Artist/ArtistConsignButton.tsx index 3c148581304..c7e352ce2cc 100644 --- a/src/app/Components/Artist/ArtistConsignButton.tsx +++ b/src/app/Components/Artist/ArtistConsignButton.tsx @@ -5,13 +5,13 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" import styled from "styled-components/native" -import { ArtistConsignButton_artist } from "__generated__/ArtistConsignButton_artist.graphql" +import { ArtistConsignButton_artist$data } from "__generated__/ArtistConsignButton_artist.graphql" import { navigate } from "app/navigation/navigate" import { useSelectedTab } from "app/store/GlobalStore" import { Schema } from "app/utils/track" export interface ArtistConsignButtonProps { - artist: ArtistConsignButton_artist + artist: ArtistConsignButton_artist$data } export const ArtistConsignButton: React.FC = (props) => { diff --git a/src/app/Components/Artist/ArtistHeader.tsx b/src/app/Components/Artist/ArtistHeader.tsx index d4d38b9ef9f..2049f826396 100644 --- a/src/app/Components/Artist/ArtistHeader.tsx +++ b/src/app/Components/Artist/ArtistHeader.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtistHeader_artist } from "__generated__/ArtistHeader_artist.graphql" +import { ArtistHeader_artist$data } from "__generated__/ArtistHeader_artist.graphql" import { ArtistHeaderFollowArtistMutation } from "__generated__/ArtistHeaderFollowArtistMutation.graphql" import { formatLargeNumberOfItems } from "app/utils/formatLargeNumberOfItems" import { userHadMeaningfulInteraction } from "app/utils/userHadMeaningfulInteraction" @@ -14,7 +14,7 @@ import { Schema } from "../../utils/track" export const ARTIST_HEADER_HEIGHT = 156 interface Props { - artist: ArtistHeader_artist + artist: ArtistHeader_artist$data relay: RelayProp } diff --git a/src/app/Components/Artist/ArtistHeaderFloatingButtons.tsx b/src/app/Components/Artist/ArtistHeaderFloatingButtons.tsx index 6bfa75c529b..71acd2f7ba5 100644 --- a/src/app/Components/Artist/ArtistHeaderFloatingButtons.tsx +++ b/src/app/Components/Artist/ArtistHeaderFloatingButtons.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtistHeaderFloatingButtons_artist } from "__generated__/ArtistHeaderFloatingButtons_artist.graphql" +import { ArtistHeaderFloatingButtons_artist$data } from "__generated__/ArtistHeaderFloatingButtons_artist.graphql" import { ArtistHeaderButton } from "app/Components/Artist/ArtistHeaderButton" import { ShareSheet } from "app/Components/ShareSheet/ShareSheet" import { useStickyTabPageContext } from "app/Components/StickyTabPage/StickyTabPageContext" @@ -25,7 +25,7 @@ import Animated, { import { createFragmentContainer, graphql } from "react-relay" interface ArtistHeaderFloatingButtonsProps { - artist: ArtistHeaderFloatingButtons_artist + artist: ArtistHeaderFloatingButtons_artist$data } // Constants diff --git a/src/app/Components/Artist/ArtistInsights/ArtistInsights.tsx b/src/app/Components/Artist/ArtistInsights/ArtistInsights.tsx index 152f75eca37..ffa60510ef9 100644 --- a/src/app/Components/Artist/ArtistInsights/ArtistInsights.tsx +++ b/src/app/Components/Artist/ArtistInsights/ArtistInsights.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { ArtistInsights_artist } from "__generated__/ArtistInsights_artist.graphql" +import { ArtistInsights_artist$data } from "__generated__/ArtistInsights_artist.graphql" import { AnimatedArtworkFilterButton, ArtworkFilterNavigator, @@ -21,7 +21,7 @@ import { ArtistInsightsAuctionResultsPaginationContainer } from "./ArtistInsight import { MarketStatsQueryRenderer } from "./MarketStats" interface ArtistInsightsProps { - artist: ArtistInsights_artist + artist: ArtistInsights_artist$data relay: RelayProp tabIndex: number } diff --git a/src/app/Components/Artist/ArtistInsights/ArtistInsightsAuctionResults.tsx b/src/app/Components/Artist/ArtistInsights/ArtistInsightsAuctionResults.tsx index fb71900d666..60abad76b35 100644 --- a/src/app/Components/Artist/ArtistInsights/ArtistInsightsAuctionResults.tsx +++ b/src/app/Components/Artist/ArtistInsights/ArtistInsightsAuctionResults.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedInfoBubble } from "@artsy/cohesion" -import { ArtistInsightsAuctionResults_artist } from "__generated__/ArtistInsightsAuctionResults_artist.graphql" +import { ArtistInsightsAuctionResults_artist$data } from "__generated__/ArtistInsightsAuctionResults_artist.graphql" import { filterArtworksParams, FilterParamName, @@ -28,7 +28,7 @@ import { } from "../../Lists/AuctionResultListItem" interface Props { - artist: ArtistInsightsAuctionResults_artist + artist: ArtistInsightsAuctionResults_artist$data relay: RelayPaginationProp scrollToTop: () => void } diff --git a/src/app/Components/Artist/ArtistInsights/MarketStats.tests.tsx b/src/app/Components/Artist/ArtistInsights/MarketStats.tests.tsx index ae44988e719..6e339bc8188 100644 --- a/src/app/Components/Artist/ArtistInsights/MarketStats.tests.tsx +++ b/src/app/Components/Artist/ArtistInsights/MarketStats.tests.tsx @@ -1,4 +1,4 @@ -import { MarketStats_priceInsightsConnection } from "__generated__/MarketStats_priceInsightsConnection.graphql" +import { MarketStats_priceInsightsConnection$data } from "__generated__/MarketStats_priceInsightsConnection.graphql" import { InfoButton } from "app/Components/Buttons/InfoButton" import { extractText } from "app/tests/extractText" import { mockEnvironmentPayload } from "app/tests/mockEnvironmentPayload" @@ -58,7 +58,7 @@ describe("MarketStats", () => { describe("median sale over estimate icons", () => { function renderWithOnePriceInsightNode( nodeSpecs: Partial< - NonNullable[0]>["node"] + NonNullable[0]>["node"] > ) { const tree = renderWithWrappers().root diff --git a/src/app/Components/Artist/ArtistInsights/MarketStats.tsx b/src/app/Components/Artist/ArtistInsights/MarketStats.tsx index 1e638d5c0c8..3dc8520cbba 100644 --- a/src/app/Components/Artist/ArtistInsights/MarketStats.tsx +++ b/src/app/Components/Artist/ArtistInsights/MarketStats.tsx @@ -12,11 +12,12 @@ import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" import { useTracking } from "react-tracking" import RelayModernEnvironment from "relay-runtime/lib/store/RelayModernEnvironment" import { useScreenDimensions } from "shared/hooks" -import { MarketStats_priceInsightsConnection } from "../../../../__generated__/MarketStats_priceInsightsConnection.graphql" import { extractNodes } from "../../../utils/extractNodes" +import { MarketStats_priceInsightsConnection$data } from "__generated__/MarketStats_priceInsightsConnection.graphql" + interface MarketStatsProps { - priceInsightsConnection: MarketStats_priceInsightsConnection + priceInsightsConnection: MarketStats_priceInsightsConnection$data } const MarketStats: React.FC = ({ priceInsightsConnection }) => { diff --git a/src/app/Components/Artist/ArtistShows/ArtistShow.tsx b/src/app/Components/Artist/ArtistShows/ArtistShow.tsx index f694e0d8e67..517b3e344c4 100644 --- a/src/app/Components/Artist/ArtistShows/ArtistShow.tsx +++ b/src/app/Components/Artist/ArtistShows/ArtistShow.tsx @@ -5,13 +5,13 @@ import { createFragmentContainer, graphql } from "react-relay" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import Metadata from "./Metadata" -import { ArtistShow_show } from "__generated__/ArtistShow_show.graphql" +import { ArtistShow_show$data } from "__generated__/ArtistShow_show.graphql" import { navigate } from "app/navigation/navigate" import { hrefForPartialShow } from "app/utils/router" import { Touchable } from "palette" interface Props { - show: ArtistShow_show + show: ArtistShow_show$data styles?: { container?: ViewStyle image?: ViewStyle diff --git a/src/app/Components/Artist/ArtistShows/Metadata.tsx b/src/app/Components/Artist/ArtistShows/Metadata.tsx index c40e1c5667f..8c6edfd5cd4 100644 --- a/src/app/Components/Artist/ArtistShows/Metadata.tsx +++ b/src/app/Components/Artist/ArtistShows/Metadata.tsx @@ -3,12 +3,12 @@ import { createFragmentContainer, graphql } from "react-relay" import { View, ViewProps } from "react-native" -import { Metadata_show } from "__generated__/Metadata_show.graphql" +import { Metadata_show$data } from "__generated__/Metadata_show.graphql" import { capitalize } from "lodash" import { Sans } from "palette" interface Props extends ViewProps { - show: Metadata_show + show: Metadata_show$data } class Metadata extends React.Component { diff --git a/src/app/Components/Artist/ArtistShows/SmallList.tsx b/src/app/Components/Artist/ArtistShows/SmallList.tsx index dd4b85a3649..5b12307e260 100644 --- a/src/app/Components/Artist/ArtistShows/SmallList.tsx +++ b/src/app/Components/Artist/ArtistShows/SmallList.tsx @@ -4,10 +4,10 @@ import { createFragmentContainer, graphql } from "react-relay" import { ArtistShowFragmentContainer } from "./ArtistShow" -import { SmallList_shows } from "__generated__/SmallList_shows.graphql" +import { SmallList_shows$data } from "__generated__/SmallList_shows.graphql" interface Props extends ViewProps { - shows: SmallList_shows + shows: SmallList_shows$data } const SmallList: React.FC = ({ shows }) => { diff --git a/src/app/Components/Artist/ArtistShows/VariableSizeShowsList.tsx b/src/app/Components/Artist/ArtistShows/VariableSizeShowsList.tsx index 7e93bebc8a2..b71683a598d 100644 --- a/src/app/Components/Artist/ArtistShows/VariableSizeShowsList.tsx +++ b/src/app/Components/Artist/ArtistShows/VariableSizeShowsList.tsx @@ -3,14 +3,14 @@ import { createFragmentContainer, graphql } from "react-relay" import { LayoutChangeEvent, StyleSheet, View } from "react-native" -import { VariableSizeShowsList_shows } from "__generated__/VariableSizeShowsList_shows.graphql" +import { VariableSizeShowsList_shows$data } from "__generated__/VariableSizeShowsList_shows.graphql" import { Stack } from "app/Components/Stack" import { isPad } from "app/utils/hardware" import { chunk } from "lodash" import { ArtistShowFragmentContainer } from "./ArtistShow" interface Props { - shows: VariableSizeShowsList_shows + shows: VariableSizeShowsList_shows$data showSize: "medium" | "large" } diff --git a/src/app/Components/Artist/Biography.tsx b/src/app/Components/Artist/Biography.tsx index f079ccc79e9..2ac73d768a2 100644 --- a/src/app/Components/Artist/Biography.tsx +++ b/src/app/Components/Artist/Biography.tsx @@ -4,13 +4,13 @@ import { createFragmentContainer, graphql } from "react-relay" import removeMarkdown from "remove-markdown" -import { Biography_artist } from "__generated__/Biography_artist.graphql" +import { Biography_artist$data } from "__generated__/Biography_artist.graphql" import { Sans } from "palette" import { SectionTitle } from "../SectionTitle" import { Stack } from "../Stack" interface Props { - artist: Biography_artist + artist: Biography_artist$data } class Biography extends React.Component { diff --git a/src/app/Components/ArtistAutosuggest/ArtistAutosuggestResults.tsx b/src/app/Components/ArtistAutosuggest/ArtistAutosuggestResults.tsx index 11fa65b16b5..38fd96022e9 100644 --- a/src/app/Components/ArtistAutosuggest/ArtistAutosuggestResults.tsx +++ b/src/app/Components/ArtistAutosuggest/ArtistAutosuggestResults.tsx @@ -1,5 +1,5 @@ import { captureMessage } from "@sentry/react-native" -import { ArtistAutosuggestResults_results } from "__generated__/ArtistAutosuggestResults_results.graphql" +import { ArtistAutosuggestResults_results$data } from "__generated__/ArtistAutosuggestResults_results.graphql" import { ArtistAutosuggestResultsQuery } from "__generated__/ArtistAutosuggestResultsQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { ProvidePlaceholderContext } from "app/utils/placeholders" @@ -16,7 +16,7 @@ import { ArtistAutosuggestRow } from "./ArtistAutosuggestRow" export type ArtistAutosuggestResult = NonNullable< NonNullable< - NonNullable["edges"]>[0] + NonNullable["edges"]>[0] >["node"] > @@ -24,7 +24,7 @@ const INITIAL_BATCH_SIZE = 32 const ArtistAutosuggestResultsFlatList: React.FC<{ query: string - results: ArtistAutosuggestResults_results | null + results: ArtistAutosuggestResults_results$data | null onResultPress: (result: ArtistAutosuggestResult) => void relay: RelayPaginationProp }> = ({ query, results: latestResults, onResultPress }) => { diff --git a/src/app/Components/ArtistListItem.tsx b/src/app/Components/ArtistListItem.tsx index 35bda3ae033..8fd29c83ea9 100644 --- a/src/app/Components/ArtistListItem.tsx +++ b/src/app/Components/ArtistListItem.tsx @@ -1,4 +1,4 @@ -import { ArtistListItem_artist } from "__generated__/ArtistListItem_artist.graphql" +import { ArtistListItem_artist$data } from "__generated__/ArtistListItem_artist.graphql" import { ArtistListItemFollowArtistMutation } from "__generated__/ArtistListItemFollowArtistMutation.graphql" import { navigate } from "app/navigation/navigate" import { PlaceholderBox, PlaceholderText } from "app/utils/placeholders" @@ -10,7 +10,7 @@ import { commitMutation, createFragmentContainer, graphql, RelayProp } from "rea import RelayModernEnvironment from "relay-runtime/lib/store/RelayModernEnvironment" interface Props { - artist: ArtistListItem_artist + artist: ArtistListItem_artist$data relay: RelayProp Component?: any contextModule?: string diff --git a/src/app/Components/ArtworkGrids/ArtworkGridItem.tsx b/src/app/Components/ArtworkGrids/ArtworkGridItem.tsx index 165585929a5..b2d58d548da 100644 --- a/src/app/Components/ArtworkGrids/ArtworkGridItem.tsx +++ b/src/app/Components/ArtworkGrids/ArtworkGridItem.tsx @@ -1,5 +1,5 @@ import { ScreenOwnerType, tappedMainArtworkGrid } from "@artsy/cohesion" -import { ArtworkGridItem_artwork } from "__generated__/ArtworkGridItem_artwork.graphql" +import { ArtworkGridItem_artwork$data } from "__generated__/ArtworkGridItem_artwork.graphql" import { filterArtworksParams } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" @@ -22,7 +22,7 @@ import { LotCloseInfo } from "./LotCloseInfo" import { LotProgressBar } from "./LotProgressBar" export interface ArtworkProps { - artwork: ArtworkGridItem_artwork + artwork: ArtworkGridItem_artwork$data /** Overrides onPress and prevents the default behaviour. */ onPress?: (artworkID: string) => void trackingFlow?: string diff --git a/src/app/Components/ArtworkGrids/GenericGrid.tsx b/src/app/Components/ArtworkGrids/GenericGrid.tsx index 143048bbfd5..ac5255eff6f 100644 --- a/src/app/Components/ArtworkGrids/GenericGrid.tsx +++ b/src/app/Components/ArtworkGrids/GenericGrid.tsx @@ -1,4 +1,4 @@ -import { GenericGrid_artworks } from "__generated__/GenericGrid_artworks.graphql" +import { GenericGrid_artworks$data } from "__generated__/GenericGrid_artworks.graphql" import Spinner from "app/Components/Spinner" import { RandomNumberGenerator } from "app/utils/placeholders" import { times } from "lodash" @@ -9,7 +9,7 @@ import { Stack } from "../Stack" import Artwork, { ArtworkGridItemPlaceholder, ArtworkProps } from "./ArtworkGridItem" interface Props { - artworks: GenericGrid_artworks + artworks: GenericGrid_artworks$data sectionDirection?: "column" // FIXME: We don’t actually support more options atm sectionMargin?: number itemMargin?: number @@ -28,7 +28,7 @@ interface State { type PropsForArtwork = Omit -type GenericArtworkType = GenericGrid_artworks extends ReadonlyArray +type GenericArtworkType = GenericGrid_artworks$data extends ReadonlyArray ? GenericArtwork : never diff --git a/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tests.tsx b/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tests.tsx index 56bef6e525d..070c036ede6 100644 --- a/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tests.tsx +++ b/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tests.tsx @@ -1,7 +1,4 @@ -import { - InfiniteScrollArtworksGridTestsQuery, - InfiniteScrollArtworksGridTestsQueryResponse, -} from "__generated__/InfiniteScrollArtworksGridTestsQuery.graphql" +import { InfiniteScrollArtworksGridTestsQuery } from "__generated__/InfiniteScrollArtworksGridTestsQuery.graphql" import { InfiniteScrollArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" import { renderWithWrappers } from "app/tests/renderWithWrappers" import { Button } from "palette" @@ -86,7 +83,7 @@ describe("Artist Series Artworks", () => { }) }) -const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { +const artworksConnection: InfiniteScrollArtworksGridTestsQuery["response"] = { artworksConnection: { pageInfo: { hasNextPage: true, @@ -101,7 +98,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -111,7 +108,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -121,7 +118,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -131,7 +128,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -141,7 +138,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -151,7 +148,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -161,7 +158,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -171,7 +168,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -181,7 +178,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, { @@ -191,7 +188,7 @@ const artworksConnection: InfiniteScrollArtworksGridTestsQueryResponse = { image: { aspectRatio: 1.0, }, - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, }, ], diff --git a/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tsx b/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tsx index 89602ad5aa8..e919044aac3 100644 --- a/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tsx +++ b/src/app/Components/ArtworkGrids/InfiniteScrollArtworksGrid.tsx @@ -7,8 +7,8 @@ // 4. Update height of grid to encompass all items. import { ScreenOwnerType } from "@artsy/cohesion" -import { InfiniteScrollArtworksGrid_connection } from "__generated__/InfiniteScrollArtworksGrid_connection.graphql" -import { InfiniteScrollArtworksGrid_myCollectionConnection } from "__generated__/InfiniteScrollArtworksGrid_myCollectionConnection.graphql" +import { InfiniteScrollArtworksGrid_connection$data } from "__generated__/InfiniteScrollArtworksGrid_connection.graphql" +import { InfiniteScrollArtworksGrid_myCollectionConnection$data } from "__generated__/InfiniteScrollArtworksGrid_myCollectionConnection.graphql" import { PAGE_SIZE } from "app/Components/constants" import { MyCollectionArtworkGridItemFragmentContainer } from "app/Scenes/MyCollection/Screens/ArtworkList/MyCollectionArtworkGridItem" import { extractNodes } from "app/utils/extractNodes" @@ -122,16 +122,16 @@ export interface Props { interface PrivateProps { connection: - | InfiniteScrollArtworksGrid_connection - | InfiniteScrollArtworksGrid_myCollectionConnection + | InfiniteScrollArtworksGrid_connection$data + | InfiniteScrollArtworksGrid_myCollectionConnection$data loadMore: RelayPaginationProp["loadMore"] hasMore: RelayPaginationProp["hasMore"] isLoading?: RelayPaginationProp["isLoading"] } interface MapperProps extends Omit { - connection?: InfiniteScrollArtworksGrid_connection - myCollectionConnection?: InfiniteScrollArtworksGrid_myCollectionConnection + connection?: InfiniteScrollArtworksGrid_connection$data + myCollectionConnection?: InfiniteScrollArtworksGrid_myCollectionConnection$data } const InfiniteScrollArtworksGridMapper: React.FC> = ({ @@ -142,9 +142,9 @@ const InfiniteScrollArtworksGridMapper: React.FC { const theConnectionProp = !!connection ? connection : myCollectionConnection - type TheConnectionType = T extends InfiniteScrollArtworksGrid_connection - ? InfiniteScrollArtworksGrid_connection - : InfiniteScrollArtworksGrid_myCollectionConnection + type TheConnectionType = T extends InfiniteScrollArtworksGrid_connection$data + ? InfiniteScrollArtworksGrid_connection$data + : InfiniteScrollArtworksGrid_myCollectionConnection$data const isMyCollection = !!myCollectionConnection && !connection if (!theConnectionProp) { diff --git a/src/app/Components/ArtworkGrids/LotCloseInfo.tsx b/src/app/Components/ArtworkGrids/LotCloseInfo.tsx index 802b1fe20a0..783c918a2b3 100644 --- a/src/app/Components/ArtworkGrids/LotCloseInfo.tsx +++ b/src/app/Components/ArtworkGrids/LotCloseInfo.tsx @@ -1,12 +1,12 @@ -import { ArtworkGridItem_artwork } from "__generated__/ArtworkGridItem_artwork.graphql" +import { ArtworkGridItem_artwork$data } from "__generated__/ArtworkGridItem_artwork.graphql" import { getTimerInfo } from "app/utils/saleTime" import { Time, useTimer } from "app/utils/useTimer" import { Text } from "palette" import { CountdownTimerProps } from "../Countdown/CountdownTimer" interface LotCloseInfoProps { - saleArtwork: NonNullable - sale: NonNullable + saleArtwork: NonNullable + sale: NonNullable duration: CountdownTimerProps["duration"] /** Specific time lot sale ends, taking into account the current diff --git a/src/app/Components/ArtworkGrids/SaleArtworkGridItem.tsx b/src/app/Components/ArtworkGrids/SaleArtworkGridItem.tsx index 60c07b7d2d7..6aa8a2b9009 100644 --- a/src/app/Components/ArtworkGrids/SaleArtworkGridItem.tsx +++ b/src/app/Components/ArtworkGrids/SaleArtworkGridItem.tsx @@ -1,5 +1,5 @@ import { ScreenOwnerType, tappedMainArtworkGrid } from "@artsy/cohesion" -import { SaleArtworkGridItem_saleArtwork } from "__generated__/SaleArtworkGridItem_saleArtwork.graphql" +import { SaleArtworkGridItem_saleArtwork$data } from "__generated__/SaleArtworkGridItem_saleArtwork.graphql" import { filterArtworksParams } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" @@ -17,7 +17,7 @@ import { navigate } from "../../navigation/navigate" import { saleMessageOrBidInfo } from "./ArtworkGridItem" export interface ArtworkProps { - saleArtwork: SaleArtworkGridItem_saleArtwork + saleArtwork: SaleArtworkGridItem_saleArtwork$data // If it's not provided, then it will push just the one artwork // to the switchboard. onPress?: (artworkID: string) => void diff --git a/src/app/Components/ArtworkRail/ArtworkRail.tsx b/src/app/Components/ArtworkRail/ArtworkRail.tsx index b66c6f86334..fd46edeac7e 100644 --- a/src/app/Components/ArtworkRail/ArtworkRail.tsx +++ b/src/app/Components/ArtworkRail/ArtworkRail.tsx @@ -1,5 +1,5 @@ -import { LargeArtworkRail_artworks } from "__generated__/LargeArtworkRail_artworks.graphql" -import { SmallArtworkRail_artworks } from "__generated__/SmallArtworkRail_artworks.graphql" +import { LargeArtworkRail_artworks$data } from "__generated__/LargeArtworkRail_artworks.graphql" +import { SmallArtworkRail_artworks$data } from "__generated__/SmallArtworkRail_artworks.graphql" import { ArtworkCardSize, ArtworkRailCard } from "app/Components/ArtworkRail/ArtworkRailCard" import { PrefetchFlatList } from "app/Components/PrefetchFlatList" import { Spacer } from "palette" @@ -9,11 +9,11 @@ import { FlatList } from "react-native" const MAX_NUMBER_OF_ARTWORKS = 30 export interface ArtworkRailProps { - artworks: LargeArtworkRail_artworks | SmallArtworkRail_artworks + artworks: LargeArtworkRail_artworks$data | SmallArtworkRail_artworks$data listRef?: React.RefObject> size: ArtworkCardSize onPress?: ( - artwork: LargeArtworkRail_artworks[0] | SmallArtworkRail_artworks[0], + artwork: LargeArtworkRail_artworks$data[0] | SmallArtworkRail_artworks$data[0], index: number ) => void onEndReached?: () => void diff --git a/src/app/Components/ArtworkRail/ArtworkRailCard.tsx b/src/app/Components/ArtworkRail/ArtworkRailCard.tsx index 0479601c1b7..fa2a0e72a18 100644 --- a/src/app/Components/ArtworkRail/ArtworkRailCard.tsx +++ b/src/app/Components/ArtworkRail/ArtworkRailCard.tsx @@ -1,6 +1,6 @@ import { themeGet } from "@styled-system/theme-get" import { - ArtworkRailCard_artwork, + ArtworkRailCard_artwork$data, ArtworkRailCard_artwork$key, } from "__generated__/ArtworkRailCard_artwork.graphql" import { getUrgencyTag } from "app/utils/getUrgencyTag" @@ -90,7 +90,7 @@ export const ArtworkRailCard: React.FC = ({ } export interface ArtworkRailCardImageProps { - image: ArtworkRailCard_artwork["image"] + image: ArtworkRailCard_artwork$data["image"] size: ArtworkCardSize urgencyTag?: string | null } diff --git a/src/app/Components/AuctionResultsList.tsx b/src/app/Components/AuctionResultsList.tsx index fc69c17be4e..c4f824a5791 100644 --- a/src/app/Components/AuctionResultsList.tsx +++ b/src/app/Components/AuctionResultsList.tsx @@ -1,5 +1,5 @@ import { - AuctionResultListItem_auctionResult, + AuctionResultListItem_auctionResult$data, AuctionResultListItem_auctionResult$key, } from "__generated__/AuctionResultListItem_auctionResult.graphql" import { PlaceholderBox, PlaceholderText, ProvidePlaceholderContext } from "app/utils/placeholders" @@ -21,7 +21,7 @@ interface AuctionResultsListProps { handleRefresh: () => void onEndReached: () => void ListHeaderComponent?: React.FC - onItemPress: (item: AuctionResultListItem_auctionResult) => void + onItemPress: (item: AuctionResultListItem_auctionResult$data) => void isLoadingNext: boolean floatingHeaderTitle?: string } diff --git a/src/app/Components/Bidding/BidFlow.tests.tsx b/src/app/Components/Bidding/BidFlow.tests.tsx index 79fe3b11ca5..31d44533441 100644 --- a/src/app/Components/Bidding/BidFlow.tests.tsx +++ b/src/app/Components/Bidding/BidFlow.tests.tsx @@ -25,7 +25,7 @@ jest.mock("tipsi-stripe", () => ({ // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ import stripe from "tipsi-stripe" -import { BidderPositionQueryResponse } from "__generated__/BidderPositionQuery.graphql" +import { BidderPositionQuery$data } from "__generated__/BidderPositionQuery.graphql" import { extractText } from "app/tests/extractText" import { waitUntil } from "app/tests/waitUntil" import { Select } from "palette/elements/Select" @@ -245,6 +245,6 @@ const mockRequestResponses = { position: {}, }, }, - } as BidderPositionQueryResponse, + } as BidderPositionQuery$data, }, } diff --git a/src/app/Components/Bidding/Screens/BidResult.tests.tsx b/src/app/Components/Bidding/Screens/BidResult.tests.tsx index 74f0fc4e3d5..e80044f163d 100644 --- a/src/app/Components/Bidding/Screens/BidResult.tests.tsx +++ b/src/app/Components/Bidding/Screens/BidResult.tests.tsx @@ -1,4 +1,4 @@ -import { BidResult_sale_artwork } from "__generated__/BidResult_sale_artwork.graphql" +import { BidResult_sale_artwork$data } from "__generated__/BidResult_sale_artwork.graphql" import { dismissModal, navigate } from "app/navigation/navigate" import { __globalStoreTestUtils__ } from "app/store/GlobalStore" import { renderWithWrappers } from "app/tests/renderWithWrappers" @@ -15,7 +15,7 @@ const mockNavigator = { popToTop } const refreshBidderInfoMock = jest.fn() const refreshSaleArtworkInfoMock = jest.fn() -const saleArtwork: BidResult_sale_artwork = { +const saleArtwork: BidResult_sale_artwork$data = { increments: [ { display: "$10,000", @@ -48,7 +48,7 @@ const saleArtwork: BidResult_sale_artwork = { end_at: "2022-05-01T00:03:00+00:00", slug: "sale-id", }, -} as any as BidResult_sale_artwork +} as any as BidResult_sale_artwork$data describe("BidResult component", () => { Date.now = jest.fn(() => 1525983752116) diff --git a/src/app/Components/Bidding/Screens/BidResult.tsx b/src/app/Components/Bidding/Screens/BidResult.tsx index 8c3d98b91ca..1aa527b6738 100644 --- a/src/app/Components/Bidding/Screens/BidResult.tsx +++ b/src/app/Components/Bidding/Screens/BidResult.tsx @@ -13,16 +13,16 @@ import { Markdown } from "../../Markdown" import { Container } from "../Components/Containers" import { Timer } from "../Components/Timer" import { Title } from "../Components/Title" -import { BidderPositionResult } from "../types" -import { BidResult_sale_artwork } from "__generated__/BidResult_sale_artwork.graphql" +import { BidResult_sale_artwork$data } from "__generated__/BidResult_sale_artwork.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { unsafe__getEnvironment } from "app/store/GlobalStore" +import { BidderPositionResult } from "../types" const SHOW_TIMER_STATUSES = ["WINNING", "OUTBID", "RESERVE_NOT_MET"] interface BidResultProps { - sale_artwork: BidResult_sale_artwork + sale_artwork: BidResult_sale_artwork$data bidderPositionResult: BidderPositionResult navigator: NavigatorIOS refreshBidderInfo?: () => void diff --git a/src/app/Components/Bidding/Screens/ConfirmBid.tests.tsx b/src/app/Components/Bidding/Screens/ConfirmBid.tests.tsx index de3f04741e4..8dcdef17f99 100644 --- a/src/app/Components/Bidding/Screens/ConfirmBid.tests.tsx +++ b/src/app/Components/Bidding/Screens/ConfirmBid.tests.tsx @@ -1,8 +1,8 @@ -import { BidderPositionQueryResponse } from "__generated__/BidderPositionQuery.graphql" -import { ConfirmBid_sale_artwork } from "__generated__/ConfirmBid_sale_artwork.graphql" -import { ConfirmBidCreateBidderPositionMutationResponse } from "__generated__/ConfirmBidCreateBidderPositionMutation.graphql" -import { ConfirmBidCreateCreditCardMutationResponse } from "__generated__/ConfirmBidCreateCreditCardMutation.graphql" -import { ConfirmBidUpdateUserMutationResponse } from "__generated__/ConfirmBidUpdateUserMutation.graphql" +import { BidderPositionQuery$data } from "__generated__/BidderPositionQuery.graphql" +import { ConfirmBid_sale_artwork$data } from "__generated__/ConfirmBid_sale_artwork.graphql" +import { ConfirmBidCreateBidderPositionMutation } from "__generated__/ConfirmBidCreateBidderPositionMutation.graphql" +import { ConfirmBidCreateCreditCardMutation } from "__generated__/ConfirmBidCreateCreditCardMutation.graphql" +import { ConfirmBidUpdateUserMutation } from "__generated__/ConfirmBidUpdateUserMutation.graphql" import { FakeNavigator } from "app/Components/Bidding/Helpers/FakeNavigator" import { bidderPositionQuery } from "app/Components/Bidding/Screens/ConfirmBid/BidderPositionQuery" import { Modal } from "app/Components/Modal" @@ -982,7 +982,7 @@ const baseSaleArtwork = { lot_label: "538", } -const saleArtwork: ConfirmBid_sale_artwork = { +const saleArtwork: ConfirmBid_sale_artwork$data = { ...baseSaleArtwork, endAt: null, sale: { @@ -993,11 +993,10 @@ const saleArtwork: ConfirmBid_sale_artwork = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $fragmentRefs": null, // needs this to keep TS happy - // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, // needs this to keep TS happy } -const nonCascadeSaleArtwork: ConfirmBid_sale_artwork = { +const nonCascadeSaleArtwork: ConfirmBid_sale_artwork$data = { ...baseSaleArtwork, endAt: null, sale: { @@ -1009,11 +1008,10 @@ const nonCascadeSaleArtwork: ConfirmBid_sale_artwork = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $fragmentRefs": null, // needs this to keep TS happy - // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, // needs this to keep TS happy } -const cascadingEndTimeSaleArtwork: ConfirmBid_sale_artwork = { +const cascadingEndTimeSaleArtwork: ConfirmBid_sale_artwork$data = { ...saleArtwork, endAt: "2018-05-13T20:22:42+00:00", extendedBiddingEndAt: new Date(Date.now() + 10000).toISOString(), @@ -1025,7 +1023,6 @@ const cascadingEndTimeSaleArtwork: ConfirmBid_sale_artwork = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $fragmentRefs": null, // needs this to keep TS happy - // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, // needs this to keep TS happy } @@ -1036,7 +1033,7 @@ const mockRequestResponses = { phone: "111 222 4444", }, }, - } as ConfirmBidUpdateUserMutationResponse, + } as ConfirmBidUpdateUserMutation["response"], creatingCreditCardSuccess: { createCreditCard: { creditCardOrError: { @@ -1050,7 +1047,7 @@ const mockRequestResponses = { }, }, }, - } as ConfirmBidCreateCreditCardMutationResponse, + } as ConfirmBidCreateCreditCardMutation["response"], creatingCreditCardEmptyError: { createCreditCard: { creditCardOrError: { @@ -1061,7 +1058,7 @@ const mockRequestResponses = { }, }, }, - } as ConfirmBidCreateCreditCardMutationResponse, + } as ConfirmBidCreateCreditCardMutation["response"], creatingCreditCardError: { createCreditCard: { creditCardOrError: { @@ -1072,7 +1069,7 @@ const mockRequestResponses = { }, }, }, - } as ConfirmBidCreateCreditCardMutationResponse, + } as ConfirmBidCreateCreditCardMutation["response"], placingBid: { bidAccepted: { createBidderPosition: { @@ -1085,7 +1082,7 @@ const mockRequestResponses = { }, }, }, - } as ConfirmBidCreateBidderPositionMutationResponse, + } as ConfirmBidCreateBidderPositionMutation["response"], bidRejected: { createBidderPosition: { result: { @@ -1094,7 +1091,7 @@ const mockRequestResponses = { message_description_md: "Some markdown description", }, }, - } as ConfirmBidCreateBidderPositionMutationResponse, + } as ConfirmBidCreateBidderPositionMutation["response"], }, pollingForBid: { highestBidder: { @@ -1106,7 +1103,7 @@ const mockRequestResponses = { }, }, }, - } as BidderPositionQueryResponse, + } as BidderPositionQuery$data, outbid: { me: { bidder_position: { @@ -1116,7 +1113,7 @@ const mockRequestResponses = { }, }, }, - } as BidderPositionQueryResponse, + } as BidderPositionQuery$data, pending: { me: { bidder_position: { @@ -1126,7 +1123,7 @@ const mockRequestResponses = { status: "PENDING", }, }, - } as BidderPositionQueryResponse, + } as BidderPositionQuery$data, reserveNotMet: { me: { bidder_position: { @@ -1136,7 +1133,7 @@ const mockRequestResponses = { status: "RESERVE_NOT_MET", }, }, - } as BidderPositionQueryResponse, + } as BidderPositionQuery$data, }, } diff --git a/src/app/Components/Bidding/Screens/ConfirmBid/PriceSummary.tsx b/src/app/Components/Bidding/Screens/ConfirmBid/PriceSummary.tsx index 2534373b2f3..5d35f82dd1b 100644 --- a/src/app/Components/Bidding/Screens/ConfirmBid/PriceSummary.tsx +++ b/src/app/Components/Bidding/Screens/ConfirmBid/PriceSummary.tsx @@ -6,15 +6,11 @@ import { Bid } from "app/Components/Bidding/types" import { defaultEnvironment } from "app/relay/createEnvironment" import renderWithLoadProgress from "app/utils/renderWithLoadProgress" -import { PriceSummary_calculatedCost } from "__generated__/PriceSummary_calculatedCost.graphql" -import { - PriceSummaryQuery, - PriceSummaryQueryResponse, - PriceSummaryQueryVariables, -} from "__generated__/PriceSummaryQuery.graphql" +import { PriceSummary_calculatedCost$data } from "__generated__/PriceSummary_calculatedCost.graphql" +import { PriceSummaryQuery } from "__generated__/PriceSummaryQuery.graphql" interface PriceSummaryViewProps { - calculatedCost: PriceSummary_calculatedCost + calculatedCost: PriceSummary_calculatedCost$data bid: Bid } @@ -70,7 +66,7 @@ const PriceSummaryFragmentContainer = createFragmentContainer(_PriceSummary, { `, }) -interface PriceSummaryProps extends Partial { +interface PriceSummaryProps extends Partial { bid: Bid } @@ -93,9 +89,11 @@ export const PriceSummary = ({ saleArtworkId, bid }: PriceSummaryProps) => ( saleArtworkId, bidAmountMinor: bid.cents, }} - // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ - render={renderWithLoadProgress(({ node: { calculatedCost } }) => ( - - ))} + render={renderWithLoadProgress( + // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ + ({ node: { calculatedCost } }) => ( + + ) + )} /> ) diff --git a/src/app/Components/Bidding/Screens/ConfirmBid/index.tsx b/src/app/Components/Bidding/Screens/ConfirmBid/index.tsx index 89353111f73..2f3f6423c4b 100644 --- a/src/app/Components/Bidding/Screens/ConfirmBid/index.tsx +++ b/src/app/Components/Bidding/Screens/ConfirmBid/index.tsx @@ -1,10 +1,7 @@ -import { BidderPositionQueryResponse } from "__generated__/BidderPositionQuery.graphql" -import { ConfirmBid_me } from "__generated__/ConfirmBid_me.graphql" -import { ConfirmBid_sale_artwork } from "__generated__/ConfirmBid_sale_artwork.graphql" -import { - ConfirmBidCreateBidderPositionMutation, - ConfirmBidCreateBidderPositionMutationResponse, -} from "__generated__/ConfirmBidCreateBidderPositionMutation.graphql" +import { BidderPositionQuery } from "__generated__/BidderPositionQuery.graphql" +import { ConfirmBid_me$data } from "__generated__/ConfirmBid_me.graphql" +import { ConfirmBid_sale_artwork$data } from "__generated__/ConfirmBid_sale_artwork.graphql" +import { ConfirmBidCreateBidderPositionMutation } from "__generated__/ConfirmBidCreateBidderPositionMutation.graphql" import { ConfirmBidCreateCreditCardMutation } from "__generated__/ConfirmBidCreateCreditCardMutation.graphql" import { ConfirmBidUpdateUserMutation } from "__generated__/ConfirmBidUpdateUserMutation.graphql" import { BidInfoRow } from "app/Components/Bidding/Components/BidInfoRow" @@ -35,12 +32,12 @@ import { PayloadError } from "relay-runtime" import stripe from "tipsi-stripe" type BidderPositionResult = NonNullable< - NonNullable["result"] + NonNullable["result"] > export interface ConfirmBidProps extends ViewProps { - sale_artwork: ConfirmBid_sale_artwork - me: ConfirmBid_me + sale_artwork: ConfirmBid_sale_artwork$data + me: ConfirmBid_me$data relay: RelayRefetchProp navigator?: NavigatorIOS refreshSaleArtwork?: () => void @@ -317,7 +314,7 @@ export class ConfirmBid extends React.Component this.presentErrorResult(error)) } - checkBidderPosition(data: BidderPositionQueryResponse | undefined) { + checkBidderPosition(data: BidderPositionQuery["response"] | undefined) { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ const { bidder_position } = data.me diff --git a/src/app/Components/Bidding/Screens/Registration.tests.tsx b/src/app/Components/Bidding/Screens/Registration.tests.tsx index f76875d7f6e..ea77352d8d8 100644 --- a/src/app/Components/Bidding/Screens/Registration.tests.tsx +++ b/src/app/Components/Bidding/Screens/Registration.tests.tsx @@ -1,6 +1,4 @@ import { RenderAPI } from "@testing-library/react-native" -import { Registration_me } from "__generated__/Registration_me.graphql" -import { Registration_sale } from "__generated__/Registration_sale.graphql" import { RegistrationResult, RegistrationStatus, @@ -21,6 +19,8 @@ import { BillingAddress } from "./BillingAddress" import { CreditCardForm } from "./CreditCardForm" import { Registration } from "./Registration" +import { Registration_me$data } from "__generated__/Registration_me.graphql" +import { Registration_sale$data } from "__generated__/Registration_sale.graphql" // This lets us import the actual react-relay module, and replace specific functions within it with mocks. jest.unmock("react-relay") @@ -698,7 +698,7 @@ const stripeToken = { extra: null, } -const sale: Partial = { +const sale: Partial = { slug: "sale-id", liveStartAt: "2029-06-11T01:00:00+00:00", endAt: null, @@ -751,7 +751,7 @@ const initialProps = { navigator: mockNavigator, } as any -const me: Partial = { +const me: Partial = { hasCreditCards: false, identityVerified: false, phoneNumber: { diff --git a/src/app/Components/Bidding/Screens/Registration.tsx b/src/app/Components/Bidding/Screens/Registration.tsx index 7db8f90411e..8fe0d7e1401 100644 --- a/src/app/Components/Bidding/Screens/Registration.tsx +++ b/src/app/Components/Bidding/Screens/Registration.tsx @@ -1,6 +1,6 @@ import { captureException } from "@sentry/react-native" -import { Registration_me } from "__generated__/Registration_me.graphql" -import { Registration_sale } from "__generated__/Registration_sale.graphql" +import { Registration_me$data } from "__generated__/Registration_me.graphql" +import { Registration_sale$data } from "__generated__/Registration_sale.graphql" import { RegistrationCreateBidderMutation } from "__generated__/RegistrationCreateBidderMutation.graphql" import { RegistrationCreateCreditCardMutation } from "__generated__/RegistrationCreateCreditCardMutation.graphql" import { RegistrationQuery } from "__generated__/RegistrationQuery.graphql" @@ -35,8 +35,8 @@ import { Address, PaymentCardTextFieldParams, StripeToken } from "../types" import { RegistrationResult, RegistrationStatus } from "./RegistrationResult" export interface RegistrationProps extends ViewProps { - sale: Registration_sale - me: Registration_me + sale: Registration_sale$data + me: Registration_me$data relay: RelayProp navigator?: NavigatorIOS } diff --git a/src/app/Components/Bidding/Screens/SelectMaxBid.tests.tsx b/src/app/Components/Bidding/Screens/SelectMaxBid.tests.tsx index 7b2a5a97e9a..ebd9c56a495 100644 --- a/src/app/Components/Bidding/Screens/SelectMaxBid.tests.tsx +++ b/src/app/Components/Bidding/Screens/SelectMaxBid.tests.tsx @@ -10,8 +10,8 @@ import { FakeNavigator } from "../Helpers/FakeNavigator" import Spinner from "app/Components/Spinner" import { Button } from "palette" -import { SelectMaxBid_me } from "__generated__/SelectMaxBid_me.graphql" -import { SelectMaxBid_sale_artwork } from "__generated__/SelectMaxBid_sale_artwork.graphql" +import { SelectMaxBid_me$data } from "__generated__/SelectMaxBid_me.graphql" +import { SelectMaxBid_sale_artwork$data } from "__generated__/SelectMaxBid_sale_artwork.graphql" import { ActivityIndicator } from "react-native" import { SelectMaxBid } from "./SelectMaxBid" @@ -19,7 +19,7 @@ jest.mock("tipsi-stripe", () => ({ setOptions: jest.fn() })) const Me = { has_qualified_credit_cards: true, -} as any as SelectMaxBid_me +} as any as SelectMaxBid_me$data const SaleArtwork = { id: "sale-artwork-id", @@ -58,7 +58,7 @@ const SaleArtwork = { cents: 5500000, }, ], -} as any as SelectMaxBid_sale_artwork +} as any as SelectMaxBid_sale_artwork$data let fakeNavigator: FakeNavigator let fakeRelay: { diff --git a/src/app/Components/Bidding/Screens/SelectMaxBid.tsx b/src/app/Components/Bidding/Screens/SelectMaxBid.tsx index 2706c032345..fe02faf84ac 100644 --- a/src/app/Components/Bidding/Screens/SelectMaxBid.tsx +++ b/src/app/Components/Bidding/Screens/SelectMaxBid.tsx @@ -9,8 +9,8 @@ import { Button, Flex } from "palette" import { ConfirmBidScreen } from "./ConfirmBid" -import { SelectMaxBid_me } from "__generated__/SelectMaxBid_me.graphql" -import { SelectMaxBid_sale_artwork } from "__generated__/SelectMaxBid_sale_artwork.graphql" +import { SelectMaxBid_me$data } from "__generated__/SelectMaxBid_me.graphql" +import { SelectMaxBid_sale_artwork$data } from "__generated__/SelectMaxBid_sale_artwork.graphql" import { SelectMaxBidQuery } from "__generated__/SelectMaxBidQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { dismissModal } from "app/navigation/navigate" @@ -21,8 +21,8 @@ import { Select } from "palette/elements/Select" import { ScreenDimensionsContext } from "shared/hooks" interface SelectMaxBidProps extends ViewProps { - sale_artwork: SelectMaxBid_sale_artwork - me: SelectMaxBid_me + sale_artwork: SelectMaxBid_sale_artwork$data + me: SelectMaxBid_me$data navigator: NavigatorIOS relay: RelayRefetchProp } diff --git a/src/app/Components/CreditCardDetails.tsx b/src/app/Components/CreditCardDetails.tsx index 8b010bf435f..a04de791988 100644 --- a/src/app/Components/CreditCardDetails.tsx +++ b/src/app/Components/CreditCardDetails.tsx @@ -1,13 +1,13 @@ import React from "react" -import { CreditCardDetails_card } from "__generated__/CreditCardDetails_card.graphql" +import { CreditCardDetails_card$data } from "__generated__/CreditCardDetails_card.graphql" import { bullet, CreditCardIcon, Flex, Sans } from "palette" import { createFragmentContainer, graphql } from "react-relay" const CreditCardDetails = ({ card: { brand, lastDigits, expirationMonth, expirationYear }, }: { - card: CreditCardDetails_card + card: CreditCardDetails_card$data }) => ( diff --git a/src/app/Components/DetailedLocationAutocomplete.tsx b/src/app/Components/DetailedLocationAutocomplete.tsx index 4ee11f9e6e1..44a180d4cc1 100644 --- a/src/app/Components/DetailedLocationAutocomplete.tsx +++ b/src/app/Components/DetailedLocationAutocomplete.tsx @@ -1,4 +1,4 @@ -import { MyProfileEditForm_me } from "__generated__/MyProfileEditForm_me.graphql" +import { MyProfileEditForm_me$data } from "__generated__/MyProfileEditForm_me.graphql" import { getLocationDetails, getLocationPredictions, @@ -123,5 +123,5 @@ export const DetailedLocationAutocomplete: React.FC +export const buildLocationDisplay = (location: MyProfileEditForm_me$data["location"]): string => [location?.city, location?.state, location?.country].filter((x) => x).join(", ") diff --git a/src/app/Components/Gene/About.tsx b/src/app/Components/Gene/About.tsx index 15eb3298e66..0aebdd7bbd3 100644 --- a/src/app/Components/Gene/About.tsx +++ b/src/app/Components/Gene/About.tsx @@ -4,12 +4,12 @@ import { createFragmentContainer, graphql } from "react-relay" import RelatedArtists from "../RelatedArtists/RelatedArtists" import Biography from "./Biography" -import { About_gene } from "__generated__/About_gene.graphql" +import { About_gene$data } from "__generated__/About_gene.graphql" import { Separator } from "palette" import { StickyTabPageScrollView } from "../StickyTabPage/StickyTabPageScrollView" interface Props { - gene: About_gene + gene: About_gene$data } const About: React.FC = ({ gene }) => { diff --git a/src/app/Components/Gene/Biography.tsx b/src/app/Components/Gene/Biography.tsx index 51136dc2662..8232556f286 100644 --- a/src/app/Components/Gene/Biography.tsx +++ b/src/app/Components/Gene/Biography.tsx @@ -3,13 +3,13 @@ import { Dimensions, View, ViewStyle } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import removeMarkdown from "remove-markdown" -import { Biography_gene } from "__generated__/Biography_gene.graphql" +import { Biography_gene$data } from "__generated__/Biography_gene.graphql" import { Sans } from "palette" const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 interface Props extends ViewStyle { - gene: Biography_gene + gene: Biography_gene$data } const Biography: React.FC = ({ gene }) => { diff --git a/src/app/Components/Gene/GeneArtworks.tsx b/src/app/Components/Gene/GeneArtworks.tsx index dc49340bd80..165a26541ef 100644 --- a/src/app/Components/Gene/GeneArtworks.tsx +++ b/src/app/Components/Gene/GeneArtworks.tsx @@ -1,4 +1,4 @@ -import { GeneArtworks_gene } from "__generated__/GeneArtworks_gene.graphql" +import { GeneArtworks_gene$data } from "__generated__/GeneArtworks_gene.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { ArtworkFiltersStoreProvider } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { ArtworksFilterHeader } from "app/Components/ArtworkGrids/ArtworksFilterHeader" @@ -14,7 +14,7 @@ import { useTracking } from "react-tracking" import { useArtworkFilters, useSelectedFiltersCount } from "../ArtworkFilter/useArtworkFilters" interface GeneArtworksContainerProps { - gene: GeneArtworks_gene + gene: GeneArtworks_gene$data relay: RelayPaginationProp } diff --git a/src/app/Components/Gene/Header.tsx b/src/app/Components/Gene/Header.tsx index a2a3cb1d7c1..56663de0d5a 100644 --- a/src/app/Components/Gene/Header.tsx +++ b/src/app/Components/Gene/Header.tsx @@ -1,4 +1,4 @@ -import { Header_gene } from "__generated__/Header_gene.graphql" +import { Header_gene$data } from "__generated__/Header_gene.graphql" import { HeaderFollowGeneMutation } from "__generated__/HeaderFollowGeneMutation.graphql" import { Box, FollowButton, Sans } from "palette" import React from "react" @@ -6,7 +6,7 @@ import { commitMutation, createFragmentContainer, graphql, RelayProp } from "rea import { Schema, Track, track as _track } from "../../utils/track" interface Props { - gene: Header_gene + gene: Header_gene$data shortForm: boolean relay: RelayProp } diff --git a/src/app/Components/GenericArtistSeriesRail.tsx b/src/app/Components/GenericArtistSeriesRail.tsx index 882a9456b5c..a226eb492bd 100644 --- a/src/app/Components/GenericArtistSeriesRail.tsx +++ b/src/app/Components/GenericArtistSeriesRail.tsx @@ -1,6 +1,6 @@ -import { ArtistAbout_artist } from "__generated__/ArtistAbout_artist.graphql" -import { ArtistCollectionsRail_collections } from "__generated__/ArtistCollectionsRail_collections.graphql" -import { CollectionArtistSeriesRail_collectionGroup } from "__generated__/CollectionArtistSeriesRail_collectionGroup.graphql" +import { ArtistAbout_artist$data } from "__generated__/ArtistAbout_artist.graphql" +import { ArtistCollectionsRail_collections$data } from "__generated__/ArtistCollectionsRail_collections.graphql" +import { CollectionArtistSeriesRail_collectionGroup$data } from "__generated__/CollectionArtistSeriesRail_collectionGroup.graphql" import { CARD_RAIL_ARTWORKS_HEIGHT as ARTWORKS_HEIGHT, CardRailArtworkImageContainer as ArtworkImageContainer, @@ -21,16 +21,16 @@ import styled from "styled-components/native" interface GenericArtistSeriesRailProps { collections: - | CollectionArtistSeriesRail_collectionGroup["members"] - | ArtistAbout_artist["iconicCollections"] + | CollectionArtistSeriesRail_collectionGroup$data["members"] + | ArtistAbout_artist$data["iconicCollections"] contextScreenOwnerType: Schema.OwnerEntityTypes.Collection | Schema.OwnerEntityTypes.Artist contextScreenOwnerId: string contextScreenOwnerSlug: string } type GenericArtistSeriesItem = - | CollectionArtistSeriesRail_collectionGroup["members"][0] - | ArtistCollectionsRail_collections[0] + | CollectionArtistSeriesRail_collectionGroup$data["members"][0] + | ArtistCollectionsRail_collections$data[0] export const GenericArtistSeriesRail: React.FC = (props) => { const color = useColor() diff --git a/src/app/Components/Home/ArtistRails/ArtistCard.tsx b/src/app/Components/Home/ArtistRails/ArtistCard.tsx index 205ff6cd90c..6bbb0bcaa7e 100644 --- a/src/app/Components/Home/ArtistRails/ArtistCard.tsx +++ b/src/app/Components/Home/ArtistRails/ArtistCard.tsx @@ -1,4 +1,4 @@ -import { ArtistCard_artist } from "__generated__/ArtistCard_artist.graphql" +import { ArtistCard_artist$data } from "__generated__/ArtistCard_artist.graphql" import React from "react" import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" @@ -10,7 +10,7 @@ import { CloseIcon, Flex, FollowButton, Text, Touchable, useColor } from "palett const ARTIST_CARD_WIDTH = 295 interface ArtistCardProps { - artist: ArtistCard_artist + artist: ArtistCard_artist$data onDismiss?: () => void onFollow?: () => void onPress?: () => void diff --git a/src/app/Components/Home/ArtistRails/ArtistRail.tsx b/src/app/Components/Home/ArtistRails/ArtistRail.tsx index 27178d559b2..d303121c121 100644 --- a/src/app/Components/Home/ArtistRails/ArtistRail.tsx +++ b/src/app/Components/Home/ArtistRails/ArtistRail.tsx @@ -15,13 +15,10 @@ import { import HomeAnalytics from "app/Scenes/Home/homeAnalytics" import { useTracking } from "react-tracking" -import { ArtistCard_artist } from "__generated__/ArtistCard_artist.graphql" -import { ArtistRail_rail } from "__generated__/ArtistRail_rail.graphql" +import { ArtistCard_artist$data } from "__generated__/ArtistCard_artist.graphql" +import { ArtistRail_rail$data } from "__generated__/ArtistRail_rail.graphql" import { ArtistRailFollowMutation } from "__generated__/ArtistRailFollowMutation.graphql" -import { - ArtistRailNewSuggestionQuery, - ArtistRailNewSuggestionQueryResponse, -} from "__generated__/ArtistRailNewSuggestionQuery.graphql" +import { ArtistRailNewSuggestionQuery } from "__generated__/ArtistRailNewSuggestionQuery.graphql" import { Disappearable } from "app/Components/Disappearable" import { SectionTitle } from "app/Components/SectionTitle" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -35,7 +32,7 @@ import { CardRailFlatList, INTER_CARD_PADDING } from "../CardRailFlatList" import { ArtistCard } from "./ArtistCard" interface SuggestedArtist - extends Pick> { + extends Pick> { _disappearable: Disappearable | null } @@ -43,7 +40,7 @@ interface Props extends ViewProps { title: string subtitle?: string relay: RelayProp - rail: ArtistRail_rail + rail: ArtistRail_rail$data mb?: number } @@ -102,7 +99,7 @@ const ArtistRail: React.FC = (props) => { ).toPromise() const artist = - (result as ArtistRailNewSuggestionQueryResponse).artist?.related?.suggestedConnection + (result as ArtistRailNewSuggestionQuery["response"]).artist?.related?.suggestedConnection ?.edges?.[0]?.node ?? null return ( @@ -114,6 +111,7 @@ const ArtistRail: React.FC = (props) => { basedOn: artist.basedOn ?? (basedOnArtist.isFollowed ? { name: basedOnArtist.name } : basedOnArtist.basedOn), + " $fragmentType": null as any, } ) } catch (e) { diff --git a/src/app/Components/Home/ArtistRails/RecommendedArtistsRail.tsx b/src/app/Components/Home/ArtistRails/RecommendedArtistsRail.tsx index 9ff0fe3c937..7821e5f4bbf 100644 --- a/src/app/Components/Home/ArtistRails/RecommendedArtistsRail.tsx +++ b/src/app/Components/Home/ArtistRails/RecommendedArtistsRail.tsx @@ -1,6 +1,6 @@ import { ActionType, OwnerType } from "@artsy/cohesion" -import { ArtistCard_artist } from "__generated__/ArtistCard_artist.graphql" -import { RecommendedArtistsRail_me } from "__generated__/RecommendedArtistsRail_me.graphql" +import { ArtistCard_artist$data } from "__generated__/ArtistCard_artist.graphql" +import { RecommendedArtistsRail_me$data } from "__generated__/RecommendedArtistsRail_me.graphql" import { RecommendedArtistsRailFollowMutation } from "__generated__/RecommendedArtistsRailFollowMutation.graphql" import { SectionTitle } from "app/Components/SectionTitle" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -28,7 +28,7 @@ interface RecommendedArtistsRailProps extends ViewProps { title: string subtitle?: string relay: RelayPaginationProp - me: RecommendedArtistsRail_me + me: RecommendedArtistsRail_me$data mb?: number } @@ -72,7 +72,7 @@ export const RecommendedArtistsRail: React.FC { + const handleFollowChange = (artist: ArtistCard_artist$data) => { trackEvent( tracks.tapFollowOrUnfollowArtist(!!artist.isFollowed, artist.internalID, artist.slug) ) @@ -85,7 +85,7 @@ export const RecommendedArtistsRail: React.FC - + listRef={listRef} prefetchUrlExtractor={(item) => item?.href!} prefetchVariablesExtractor={defaultArtistVariables} @@ -179,7 +179,7 @@ export const tracks = { }), } -const followOrUnfollowArtist = (followArtist: ArtistCard_artist) => { +const followOrUnfollowArtist = (followArtist: ArtistCard_artist$data) => { return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` diff --git a/src/app/Components/Home/HeroUnit.tsx b/src/app/Components/Home/HeroUnit.tsx index aa87759f5e6..615f96764be 100644 --- a/src/app/Components/Home/HeroUnit.tsx +++ b/src/app/Components/Home/HeroUnit.tsx @@ -1,5 +1,5 @@ -import { HomeHero_homePage } from "__generated__/HomeHero_homePage.graphql" -import { Trove_trove } from "__generated__/Trove_trove.graphql" +import { HomeHero_homePage$data } from "__generated__/HomeHero_homePage.graphql" +import { Trove_trove$data } from "__generated__/Trove_trove.graphql" import { isPad } from "app/utils/hardware" import { Flex, Text, Touchable, useColor } from "palette" import React, { useState } from "react" @@ -9,7 +9,7 @@ import { useScreenDimensions } from "shared/hooks" import OpaqueImageView from "../OpaqueImageView/OpaqueImageView" type UnitType = NonNullable< - NonNullable[0] + NonNullable[0] > interface Props { diff --git a/src/app/Components/Lists/AuctionResultListItem.tsx b/src/app/Components/Lists/AuctionResultListItem.tsx index 9a781f62229..9e6290435fd 100644 --- a/src/app/Components/Lists/AuctionResultListItem.tsx +++ b/src/app/Components/Lists/AuctionResultListItem.tsx @@ -1,4 +1,4 @@ -import { AuctionResultListItem_auctionResult } from "__generated__/AuctionResultListItem_auctionResult.graphql" +import { AuctionResultListItem_auctionResult$data } from "__generated__/AuctionResultListItem_auctionResult.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { auctionResultHasPrice, auctionResultText } from "app/Scenes/AuctionResult/helpers" import { QAInfoManualPanel, QAInfoRow } from "app/utils/QAInfo" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { AuctionResultsMidEstimate } from "../AuctionResult/AuctionResultMidEstimate" interface Props { - auctionResult: AuctionResultListItem_auctionResult + auctionResult: AuctionResultListItem_auctionResult$data onPress: () => void showArtistName?: boolean withHorizontalPadding?: boolean diff --git a/src/app/Components/Lists/ShowItemRow.tsx b/src/app/Components/Lists/ShowItemRow.tsx index ca1f4a1e680..8ed2992b96d 100644 --- a/src/app/Components/Lists/ShowItemRow.tsx +++ b/src/app/Components/Lists/ShowItemRow.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { ShowItemRow_show } from "__generated__/ShowItemRow_show.graphql" +import { ShowItemRow_show$data } from "__generated__/ShowItemRow_show.graphql" import { ShowItemRowMutation } from "__generated__/ShowItemRowMutation.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { Pin } from "app/Icons/Pin" @@ -15,7 +15,7 @@ import { commitMutation, createFragmentContainer, graphql, RelayProp } from "rea import styled from "styled-components/native" interface Props { - show: ShowItemRow_show + show: ShowItemRow_show$data relay?: RelayProp onSaveStarted?: () => void onSaveEnded?: () => void diff --git a/src/app/Components/LocationMap/LocationMap.tsx b/src/app/Components/LocationMap/LocationMap.tsx index 42011472228..7f8311f7f18 100644 --- a/src/app/Components/LocationMap/LocationMap.tsx +++ b/src/app/Components/LocationMap/LocationMap.tsx @@ -2,7 +2,7 @@ import { useActionSheet } from "@expo/react-native-action-sheet" import Clipboard from "@react-native-community/clipboard" import MapboxGL from "@react-native-mapbox-gl/maps" import { themeGet } from "@styled-system/theme-get" -import { LocationMap_location } from "__generated__/LocationMap_location.graphql" +import { LocationMap_location$data } from "__generated__/LocationMap_location.graphql" import { Pin } from "app/Icons/Pin" import { ArtsyMapStyleURL } from "app/Scenes/Map/GlobalMap" import { Box, Flex, Text } from "palette" @@ -20,7 +20,7 @@ const MapWrapper = styled(Flex)` ` interface Props { - location: LocationMap_location + location: LocationMap_location$data partnerName: string | null } diff --git a/src/app/Components/LotsByArtistsYouFollowRail/LotsByFollowedArtistsRail.tsx b/src/app/Components/LotsByArtistsYouFollowRail/LotsByFollowedArtistsRail.tsx index cc3bb3c2bd9..b4f16eb6d9c 100644 --- a/src/app/Components/LotsByArtistsYouFollowRail/LotsByFollowedArtistsRail.tsx +++ b/src/app/Components/LotsByArtistsYouFollowRail/LotsByFollowedArtistsRail.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { LotsByFollowedArtistsRail_me } from "__generated__/LotsByFollowedArtistsRail_me.graphql" +import { LotsByFollowedArtistsRail_me$data } from "__generated__/LotsByFollowedArtistsRail_me.graphql" import { CardRailFlatList } from "app/Components/Home/CardRailFlatList" import { SaleArtworkTileRailCardContainer } from "app/Components/SaleArtworkTileRailCard" import { SectionTitle } from "app/Components/SectionTitle" @@ -14,7 +14,7 @@ export const PAGE_SIZE = 6 interface Props { title: string - me: LotsByFollowedArtistsRail_me + me: LotsByFollowedArtistsRail_me$data relay: RelayPaginationProp mb?: number } diff --git a/src/app/Components/PartnerEntityHeader.tsx b/src/app/Components/PartnerEntityHeader.tsx index 8af797428b1..0c8bfdc2dcf 100644 --- a/src/app/Components/PartnerEntityHeader.tsx +++ b/src/app/Components/PartnerEntityHeader.tsx @@ -1,4 +1,4 @@ -import { PartnerEntityHeader_partner } from "__generated__/PartnerEntityHeader_partner.graphql" +import { PartnerEntityHeader_partner$data } from "__generated__/PartnerEntityHeader_partner.graphql" import { navigate } from "app/navigation/navigate" import { PartnerFollowButtonFragmentContainer as PartnerFollowButton } from "app/Scenes/Partner/Components/PartnerFollowButton" import { limitWithCount } from "app/utils/limitWithCount" @@ -9,7 +9,7 @@ import { TouchableWithoutFeedback } from "react-native" import { createFragmentContainer, graphql } from "react-relay" export interface PartnerEntityHeaderProps extends BoxProps { - partner: PartnerEntityHeader_partner + partner: PartnerEntityHeader_partner$data } export const PartnerEntityHeader: React.FC = ({ partner, ...rest }) => { diff --git a/src/app/Components/RelatedArtists/RelatedArtist.tsx b/src/app/Components/RelatedArtists/RelatedArtist.tsx index ad8d12723a0..688ce80861d 100644 --- a/src/app/Components/RelatedArtists/RelatedArtist.tsx +++ b/src/app/Components/RelatedArtists/RelatedArtist.tsx @@ -1,4 +1,4 @@ -import { RelatedArtist_artist } from "__generated__/RelatedArtist_artist.graphql" +import { RelatedArtist_artist$data } from "__generated__/RelatedArtist_artist.graphql" import { navigate } from "app/navigation/navigate" import { ClassTheme, Sans, Spacer } from "palette" import React, { Component } from "react" @@ -7,7 +7,7 @@ import { createFragmentContainer, graphql } from "react-relay" import ImageView from "../OpaqueImageView/OpaqueImageView" interface Props { - artist: RelatedArtist_artist + artist: RelatedArtist_artist$data imageSize: { width: number } @@ -46,7 +46,7 @@ class RelatedArtist extends Component { ) } - artworksString(counts: RelatedArtist_artist["counts"]) { + artworksString(counts: RelatedArtist_artist$data["counts"]) { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ const totalWorks = counts.artworks ? // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ diff --git a/src/app/Components/RelatedArtists/RelatedArtists.tsx b/src/app/Components/RelatedArtists/RelatedArtists.tsx index aa098053459..e0a0e0b079b 100644 --- a/src/app/Components/RelatedArtists/RelatedArtists.tsx +++ b/src/app/Components/RelatedArtists/RelatedArtists.tsx @@ -5,13 +5,13 @@ import { LayoutChangeEvent, View } from "react-native" import RelatedArtist from "./RelatedArtist" -import { RelatedArtists_artists } from "__generated__/RelatedArtists_artists.graphql" +import { RelatedArtists_artists$data } from "__generated__/RelatedArtists_artists.graphql" import { chunk } from "lodash" import { SectionTitle } from "../SectionTitle" import { Stack } from "../Stack" interface Props { - artists: RelatedArtists_artists + artists: RelatedArtists_artists$data } interface State { diff --git a/src/app/Components/SaleArtworkTileRailCard/SaleArtworkTileRailCard.tsx b/src/app/Components/SaleArtworkTileRailCard/SaleArtworkTileRailCard.tsx index dc0c4fe355a..b66c467456a 100644 --- a/src/app/Components/SaleArtworkTileRailCard/SaleArtworkTileRailCard.tsx +++ b/src/app/Components/SaleArtworkTileRailCard/SaleArtworkTileRailCard.tsx @@ -6,7 +6,7 @@ import { TappedEntityGroupArgs, } from "@artsy/cohesion" import { themeGet } from "@styled-system/theme-get" -import { SaleArtworkTileRailCard_saleArtwork } from "__generated__/SaleArtworkTileRailCard_saleArtwork.graphql" +import { SaleArtworkTileRailCard_saleArtwork$data } from "__generated__/SaleArtworkTileRailCard_saleArtwork.graphql" import { Box, Flex, Text, useColor } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" @@ -24,7 +24,7 @@ const SaleArtworkCard = styled.TouchableHighlight.attrs(() => ({ export interface SaleArtworkTileRailCardProps { onPress: () => void - saleArtwork: SaleArtworkTileRailCard_saleArtwork + saleArtwork: SaleArtworkTileRailCard_saleArtwork$data useCustomSaleMessage?: boolean useSquareAspectRatio?: boolean contextScreenOwnerType?: ScreenOwnerType diff --git a/src/app/Components/Show/ShowArtistsPreview.tsx b/src/app/Components/Show/ShowArtistsPreview.tsx index 7b095495e8a..3c2204b6f93 100644 --- a/src/app/Components/Show/ShowArtistsPreview.tsx +++ b/src/app/Components/Show/ShowArtistsPreview.tsx @@ -1,4 +1,4 @@ -import { ShowArtistsPreview_show } from "__generated__/ShowArtistsPreview_show.graphql" +import { ShowArtistsPreview_show$data } from "__generated__/ShowArtistsPreview_show.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { CaretButton } from "app/Components/Buttons/CaretButton" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - show: ShowArtistsPreview_show + show: ShowArtistsPreview_show$data onViewAllArtistsPressed: () => void Component?: any } diff --git a/src/app/Components/Show/ShowArtworksPreview.tsx b/src/app/Components/Show/ShowArtworksPreview.tsx index f01817329e2..38c77be04c1 100644 --- a/src/app/Components/Show/ShowArtworksPreview.tsx +++ b/src/app/Components/Show/ShowArtworksPreview.tsx @@ -1,4 +1,4 @@ -import { ShowArtworksPreview_show } from "__generated__/ShowArtworksPreview_show.graphql" +import { ShowArtworksPreview_show$data } from "__generated__/ShowArtworksPreview_show.graphql" import GenericGrid from "app/Components/ArtworkGrids/GenericGrid" import { CaretButton } from "app/Components/Buttons/CaretButton" import { extractNodes } from "app/utils/extractNodes" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql, RelayProp } from "react-relay" interface Props { onViewAllArtworksPressed: () => void - show: ShowArtworksPreview_show + show: ShowArtworksPreview_show$data title?: string relay: RelayProp } diff --git a/src/app/Components/ShowCard.tsx b/src/app/Components/ShowCard.tsx index b8a549c46b6..35fe8934577 100644 --- a/src/app/Components/ShowCard.tsx +++ b/src/app/Components/ShowCard.tsx @@ -1,4 +1,4 @@ -import { ShowCard_show } from "__generated__/ShowCard_show.graphql" +import { ShowCard_show$data } from "__generated__/ShowCard_show.graphql" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Flex, Spacer, Text, Touchable } from "palette" @@ -10,7 +10,7 @@ const WIDTH = 295 const HEIGHT = 230 interface ShowCardProps extends ViewProps { - show: ShowCard_show + show: ShowCard_show$data onPress?(event: GestureResponderEvent): void } diff --git a/src/app/Components/Tag/About.tsx b/src/app/Components/Tag/About.tsx index 831bc65092b..1086df7461a 100644 --- a/src/app/Components/Tag/About.tsx +++ b/src/app/Components/Tag/About.tsx @@ -1,4 +1,4 @@ -import { About_tag } from "__generated__/About_tag.graphql" +import { About_tag$data } from "__generated__/About_tag.graphql" import { Text } from "palette" import React from "react" import { View } from "react-native" @@ -8,7 +8,7 @@ import removeMarkdown from "remove-markdown" import { StickyTabPageScrollView } from "../StickyTabPage/StickyTabPageScrollView" interface AboutProps { - tag: About_tag + tag: About_tag$data } const sideMargin = DeviceInfo.getDeviceType() === "Handset" ? 0 : 50 diff --git a/src/app/Components/Tag/TagArtworks.tsx b/src/app/Components/Tag/TagArtworks.tsx index 52169cfdd0c..9d6c6ea76de 100644 --- a/src/app/Components/Tag/TagArtworks.tsx +++ b/src/app/Components/Tag/TagArtworks.tsx @@ -1,4 +1,4 @@ -import { TagArtworks_tag } from "__generated__/TagArtworks_tag.graphql" +import { TagArtworks_tag$data } from "__generated__/TagArtworks_tag.graphql" import { ArtworksFilterHeader } from "app/Components/ArtworkGrids/ArtworksFilterHeader" import { FilteredArtworkGridZeroState } from "app/Components/ArtworkGrids/FilteredArtworkGridZeroState" import { InfiniteScrollArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" @@ -15,7 +15,7 @@ import { StickyTabPageFlatListContext } from "../StickyTabPage/StickyTabPageFlat import { StickyTabPageScrollView } from "../StickyTabPage/StickyTabPageScrollView" interface TagArtworksContainerProps { - tag: TagArtworks_tag + tag: TagArtworks_tag$data relay: RelayPaginationProp } diff --git a/src/app/Components/WorksForYou/Notification.tsx b/src/app/Components/WorksForYou/Notification.tsx index d96106ff2f1..80854a4698f 100644 --- a/src/app/Components/WorksForYou/Notification.tsx +++ b/src/app/Components/WorksForYou/Notification.tsx @@ -11,14 +11,14 @@ import { createFragmentContainer, graphql } from "react-relay" import GenericGrid from "../ArtworkGrids/GenericGrid" -import { Notification_notification } from "__generated__/Notification_notification.graphql" +import { Notification_notification$data } from "__generated__/Notification_notification.graphql" import { navigate } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" import { ClassTheme, Sans } from "palette" interface Props { // Special notifications will pass down an artistHref. Otherwise, grab it from the artworks. - notification: Notification_notification & { artistHref?: string } + notification: Notification_notification$data & { artistHref?: string } width: number } diff --git a/src/app/Containers/Inbox.tsx b/src/app/Containers/Inbox.tsx index 3a2f12cd843..f284ba693df 100644 --- a/src/app/Containers/Inbox.tsx +++ b/src/app/Containers/Inbox.tsx @@ -1,5 +1,5 @@ import { ActionType } from "@artsy/cohesion" -import { Inbox_me } from "__generated__/Inbox_me.graphql" +import { Inbox_me$data } from "__generated__/Inbox_me.graphql" import { InboxQuery } from "__generated__/InboxQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { ConversationsContainer } from "app/Scenes/Inbox/Components/Conversations/Conversations" @@ -66,7 +66,7 @@ interface State { } interface Props { - me: Inbox_me + me: Inbox_me$data relay: RelayRefetchProp isVisible: boolean } diff --git a/src/app/Containers/Inquiry.tsx b/src/app/Containers/Inquiry.tsx index cb08b71de9d..40faf49dd6e 100644 --- a/src/app/Containers/Inquiry.tsx +++ b/src/app/Containers/Inquiry.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { Inquiry_artwork } from "__generated__/Inquiry_artwork.graphql" +import { Inquiry_artwork$data } from "__generated__/Inquiry_artwork.graphql" import { InquiryQuery } from "__generated__/InquiryQuery.graphql" import { dismissModal } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -121,7 +121,7 @@ export const BottomAlignedButton: React.FC = ({ ) interface Props { - artwork: Inquiry_artwork + artwork: Inquiry_artwork$data } interface State { diff --git a/src/app/Containers/WorksForYou.tsx b/src/app/Containers/WorksForYou.tsx index 7063ae4abc9..c0e06bfd778 100644 --- a/src/app/Containers/WorksForYou.tsx +++ b/src/app/Containers/WorksForYou.tsx @@ -1,5 +1,5 @@ import * as Analytics from "@artsy/cohesion" -import { WorksForYou_me } from "__generated__/WorksForYou_me.graphql" +import { WorksForYou_me$data } from "__generated__/WorksForYou_me.graphql" import { WorksForYouQuery } from "__generated__/WorksForYouQuery.graphql" import { PAGE_SIZE } from "app/Components/constants" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -18,7 +18,7 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp interface Props { relay: RelayPaginationProp - me: WorksForYou_me + me: WorksForYou_me$data } interface State { diff --git a/src/app/Scenes/Articles/ArticlesList.tsx b/src/app/Scenes/Articles/ArticlesList.tsx index c185596d288..8ed297cfa41 100644 --- a/src/app/Scenes/Articles/ArticlesList.tsx +++ b/src/app/Scenes/Articles/ArticlesList.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { ArticleCard_article } from "__generated__/ArticleCard_article.graphql" +import { ArticleCard_article$data } from "__generated__/ArticleCard_article.graphql" import { ArticleCardContainer } from "app/Components/ArticleCard" import { PlaceholderBox, @@ -15,7 +15,7 @@ import { ActivityIndicator, FlatList, RefreshControl } from "react-native" import { useTracking } from "react-tracking" import { useScreenDimensions } from "shared/hooks" interface ArticlesListProps { - articles: ArticleCard_article[] + articles: ArticleCard_article$data[] isLoading: () => boolean hasMore: () => boolean refreshing: boolean diff --git a/src/app/Scenes/Artist/Artist.tsx b/src/app/Scenes/Artist/Artist.tsx index 6f526914c7b..0b5bd3c968b 100644 --- a/src/app/Scenes/Artist/Artist.tsx +++ b/src/app/Scenes/Artist/Artist.tsx @@ -1,11 +1,5 @@ -import { - ArtistAboveTheFoldQuery, - ArtistAboveTheFoldQueryVariables, -} from "__generated__/ArtistAboveTheFoldQuery.graphql" -import { - ArtistBelowTheFoldQuery, - ArtistBelowTheFoldQueryVariables, -} from "__generated__/ArtistBelowTheFoldQuery.graphql" +import { ArtistAboveTheFoldQuery } from "__generated__/ArtistAboveTheFoldQuery.graphql" +import { ArtistBelowTheFoldQuery } from "__generated__/ArtistBelowTheFoldQuery.graphql" import { ArtistAboutContainer } from "app/Components/Artist/ArtistAbout/ArtistAbout" import ArtistArtworks from "app/Components/Artist/ArtistArtworks/ArtistArtworks" import { ArtistHeaderFragmentContainer } from "app/Components/Artist/ArtistHeader" @@ -124,13 +118,12 @@ export const Artist: React.FC = (props) => { ) } -interface ArtistQueryRendererProps - extends ArtistAboveTheFoldQueryVariables, - ArtistBelowTheFoldQueryVariables { +interface ArtistQueryRendererProps { environment?: RelayModernEnvironment initialTab?: string searchCriteriaID?: string search_criteria_id?: string + artistID: string } export const ArtistScreenQuery = graphql` diff --git a/src/app/Scenes/ArtistArticles/ArtistArticles.tsx b/src/app/Scenes/ArtistArticles/ArtistArticles.tsx index a84dace7ec0..69c4bb77de7 100644 --- a/src/app/Scenes/ArtistArticles/ArtistArticles.tsx +++ b/src/app/Scenes/ArtistArticles/ArtistArticles.tsx @@ -1,4 +1,4 @@ -import { ArtistArticles_artist } from "__generated__/ArtistArticles_artist.graphql" +import { ArtistArticles_artist$data } from "__generated__/ArtistArticles_artist.graphql" import { ArtistArticlesResultQuery } from "__generated__/ArtistArticlesResultQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { extractNodes } from "app/utils/extractNodes" @@ -13,7 +13,7 @@ import { ArticlesList, ArticlesPlaceholder } from "../Articles/ArticlesList" const PAGE_SIZE = 10 interface ArticlesProps { - artist: ArtistArticles_artist + artist: ArtistArticles_artist$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/ArtistSeries/ArtistSeries.tsx b/src/app/Scenes/ArtistSeries/ArtistSeries.tsx index 5711dcf1aaf..59fe7c2037b 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeries.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeries.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { ArtistSeries_artistSeries } from "__generated__/ArtistSeries_artistSeries.graphql" +import { ArtistSeries_artistSeries$data } from "__generated__/ArtistSeries_artistSeries.graphql" import { ArtistSeriesQuery } from "__generated__/ArtistSeriesQuery.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { @@ -24,7 +24,7 @@ import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" import { useTracking } from "react-tracking" interface ArtistSeriesProps { - artistSeries: ArtistSeries_artistSeries + artistSeries: ArtistSeries_artistSeries$data } export const ArtistSeries: React.FC = (props) => { diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx index 866c68c06fb..255cbfabc56 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { ArtistSeriesArtworks_artistSeries } from "__generated__/ArtistSeriesArtworks_artistSeries.graphql" +import { ArtistSeriesArtworks_artistSeries$data } from "__generated__/ArtistSeriesArtworks_artistSeries.graphql" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { useArtworkFilters } from "app/Components/ArtworkFilter/useArtworkFilters" import { FilteredArtworkGridZeroState } from "app/Components/ArtworkGrids/FilteredArtworkGridZeroState" @@ -12,7 +12,7 @@ import { createPaginationContainer, graphql, RelayPaginationProp } from "react-r import { useTracking } from "react-tracking" interface ArtistSeriesArtworksProps { - artistSeries: ArtistSeriesArtworks_artistSeries + artistSeries: ArtistSeriesArtworks_artistSeries$data relay: RelayPaginationProp } @@ -98,7 +98,7 @@ export const ArtistSeriesArtworksFragmentContainer = createPaginationContainer( slug internalID artistSeriesArtworks: filterArtworksConnection( - first: 20 + first: $count after: $cursor aggregations: [ COLOR diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tests.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tests.tsx index 56ffcce1781..46b69871c90 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tests.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tests.tsx @@ -1,7 +1,4 @@ -import { - ArtistSeriesFullArtistSeriesListTestsQuery, - ArtistSeriesFullArtistSeriesListTestsQueryRawResponse, -} from "__generated__/ArtistSeriesFullArtistSeriesListTestsQuery.graphql" +import { ArtistSeriesFullArtistSeriesListTestsQuery } from "__generated__/ArtistSeriesFullArtistSeriesListTestsQuery.graphql" import { ArtistSeriesFullArtistSeriesListFragmentContainer } from "app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList" import { ArtistSeriesListItem } from "app/Scenes/ArtistSeries/ArtistSeriesListItem" import { extractText } from "app/tests/extractText" @@ -90,7 +87,7 @@ describe("Full Artist Series List", () => { }) }) -const ArtistSeriesFullArtistSeriesListFixture: ArtistSeriesFullArtistSeriesListTestsQueryRawResponse = +const ArtistSeriesFullArtistSeriesListFixture: ArtistSeriesFullArtistSeriesListTestsQuery["rawResponse"] = { artist: { id: "yayoi-kusama", diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tsx index f75f8988be7..d8e7f99753e 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesFullArtistSeriesList.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtistSeriesFullArtistSeriesList_artist } from "__generated__/ArtistSeriesFullArtistSeriesList_artist.graphql" +import { ArtistSeriesFullArtistSeriesList_artist$data } from "__generated__/ArtistSeriesFullArtistSeriesList_artist.graphql" import { ArtistSeriesFullArtistSeriesListQuery } from "__generated__/ArtistSeriesFullArtistSeriesListQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { ArtistSeriesListItem } from "app/Scenes/ArtistSeries/ArtistSeriesListItem" @@ -12,7 +12,7 @@ import { ScrollView } from "react-native" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" interface FullArtistSeriesListProps { - artist: ArtistSeriesFullArtistSeriesList_artist + artist: ArtistSeriesFullArtistSeriesList_artist$data } export const FullArtistSeriesList: React.FC = ({ artist }) => { diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tests.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tests.tsx index 8c5573f1acc..02cd88c89de 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tests.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tests.tsx @@ -1,7 +1,4 @@ -import { - ArtistSeriesHeaderTestsQuery, - ArtistSeriesHeaderTestsQueryRawResponse, -} from "__generated__/ArtistSeriesHeaderTestsQuery.graphql" +import { ArtistSeriesHeaderTestsQuery } from "__generated__/ArtistSeriesHeaderTestsQuery.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ArtistSeriesHeaderFragmentContainer } from "app/Scenes/ArtistSeries/ArtistSeriesHeader" import { renderWithWrappers } from "app/tests/renderWithWrappers" @@ -60,7 +57,7 @@ describe("Artist Series Header", () => { }) }) -const ArtistSeriesHeaderFixture: ArtistSeriesHeaderTestsQueryRawResponse = { +const ArtistSeriesHeaderFixture: ArtistSeriesHeaderTestsQuery["rawResponse"] = { artistSeries: { image: { url: "https://www.imagesofpumpkins.cloudfront.net/primary/square.jpg", diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tsx index 4c43e09134b..0c53966a1a2 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesHeader.tsx @@ -1,11 +1,11 @@ -import { ArtistSeriesHeader_artistSeries } from "__generated__/ArtistSeriesHeader_artistSeries.graphql" +import { ArtistSeriesHeader_artistSeries$data } from "__generated__/ArtistSeriesHeader_artistSeries.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { Flex } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ArtistSeriesHeaderProps { - artistSeries: ArtistSeriesHeader_artistSeries + artistSeries: ArtistSeriesHeader_artistSeries$data } export const ArtistSeriesHeader: React.FC = ({ artistSeries }) => { const url = artistSeries.image?.url! diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tests.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tests.tsx index 56894d4b294..4c6e69fc3a0 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tests.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tests.tsx @@ -1,7 +1,4 @@ -import { - ArtistSeriesMetaTestsQuery, - ArtistSeriesMetaTestsQueryRawResponse, -} from "__generated__/ArtistSeriesMetaTestsQuery.graphql" +import { ArtistSeriesMetaTestsQuery } from "__generated__/ArtistSeriesMetaTestsQuery.graphql" import { navigate } from "app/navigation/navigate" import { ArtistSeriesMeta, @@ -113,7 +110,7 @@ describe("Artist Series Meta", () => { }) }) -const ArtistSeriesFixture: ArtistSeriesMetaTestsQueryRawResponse = { +const ArtistSeriesFixture: ArtistSeriesMetaTestsQuery["rawResponse"] = { artistSeries: { internalID: "as1234", slug: "cool-artist-series", diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tsx index 219ba314a0e..124ee291f8f 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesMeta.tsx @@ -5,7 +5,7 @@ import { OwnerType, unfollowedArtist, } from "@artsy/cohesion" -import { ArtistSeriesMeta_artistSeries } from "__generated__/ArtistSeriesMeta_artistSeries.graphql" +import { ArtistSeriesMeta_artistSeries$data } from "__generated__/ArtistSeriesMeta_artistSeries.graphql" import { ArtistSeriesMetaFollowMutation } from "__generated__/ArtistSeriesMetaFollowMutation.graphql" import { ReadMore } from "app/Components/ReadMore" import { navigate } from "app/navigation/navigate" @@ -17,7 +17,7 @@ import { commitMutation, createFragmentContainer, graphql, RelayProp } from "rea import { useTracking } from "react-tracking" interface ArtistSeriesMetaProps { - artistSeries: ArtistSeriesMeta_artistSeries + artistSeries: ArtistSeriesMeta_artistSeries$data relay: RelayProp } diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tests.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tests.tsx index 317e57804d3..5d89dd2faea 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tests.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tests.tsx @@ -1,8 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { - ArtistSeriesMoreSeriesTestsQuery, - ArtistSeriesMoreSeriesTestsQueryRawResponse, -} from "__generated__/ArtistSeriesMoreSeriesTestsQuery.graphql" +import { ArtistSeriesMoreSeriesTestsQuery } from "__generated__/ArtistSeriesMoreSeriesTestsQuery.graphql" import { ArtistSeriesListItem } from "app/Scenes/ArtistSeries/ArtistSeriesListItem" import { ArtistSeriesMoreSeries, @@ -136,7 +133,7 @@ describe("ArtistSeriesMoreSeries", () => { }) }) -const ArtistSeriesMoreSeriesNoSeriesFixture: ArtistSeriesMoreSeriesTestsQueryRawResponse = { +const ArtistSeriesMoreSeriesNoSeriesFixture: ArtistSeriesMoreSeriesTestsQuery["rawResponse"] = { artistSeries: { artist: [ { @@ -152,7 +149,7 @@ const ArtistSeriesMoreSeriesNoSeriesFixture: ArtistSeriesMoreSeriesTestsQueryRaw }, } -const ArtistSeriesMoreSeriesFixture: ArtistSeriesMoreSeriesTestsQueryRawResponse = { +const ArtistSeriesMoreSeriesFixture: ArtistSeriesMoreSeriesTestsQuery["rawResponse"] = { artistSeries: { artist: [ { @@ -229,7 +226,7 @@ const ArtistSeriesMoreSeriesFixture: ArtistSeriesMoreSeriesTestsQueryRawResponse }, } -const ArtistSeriesMoreSeriesBelowViewAllThresholdFixture: ArtistSeriesMoreSeriesTestsQueryRawResponse = +const ArtistSeriesMoreSeriesBelowViewAllThresholdFixture: ArtistSeriesMoreSeriesTestsQuery["rawResponse"] = { artistSeries: { artist: [ diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tsx index 5faba5f7aff..17ad77ee7e9 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesMoreSeries.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, ScreenOwnerType } from "@artsy/cohesion" -import { ArtistSeriesMoreSeries_artist } from "__generated__/ArtistSeriesMoreSeries_artist.graphql" +import { ArtistSeriesMoreSeries_artist$data } from "__generated__/ArtistSeriesMoreSeries_artist.graphql" import { navigate } from "app/navigation/navigate" import { ArtistSeriesListItem } from "app/Scenes/ArtistSeries/ArtistSeriesListItem" import { Flex, FlexProps, Sans } from "palette" @@ -9,11 +9,11 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" export type ArtistSeriesConnectionEdge = NonNullable< - NonNullable["edges"] + NonNullable["edges"] >[0] interface ArtistSeriesMoreSeriesProps extends FlexProps { - artist: ArtistSeriesMoreSeries_artist | null | undefined + artist: ArtistSeriesMoreSeries_artist$data | null | undefined artistSeriesHeader: string contextScreenOwnerType: ScreenOwnerType contextScreenOwnerId: string diff --git a/src/app/Scenes/ArtistShows/ArtistShows2.tests.tsx b/src/app/Scenes/ArtistShows/ArtistShows2.tests.tsx index 828dcea0891..d62a0d612c7 100644 --- a/src/app/Scenes/ArtistShows/ArtistShows2.tests.tsx +++ b/src/app/Scenes/ArtistShows/ArtistShows2.tests.tsx @@ -22,7 +22,7 @@ describe("ArtistShows2", () => { query ArtistShows2TestsQuery($artistID: String!) @relay_test_operation { artist(id: $artistID) { slug - ...ArtistShows2_artist @arguments(artistID: $artistID) + ...ArtistShows2_artist } } `} diff --git a/src/app/Scenes/ArtistShows/ArtistShows2.tsx b/src/app/Scenes/ArtistShows/ArtistShows2.tsx index fdecf34972f..577db316795 100644 --- a/src/app/Scenes/ArtistShows/ArtistShows2.tsx +++ b/src/app/Scenes/ArtistShows/ArtistShows2.tsx @@ -1,4 +1,4 @@ -import { ArtistShows2_artist } from "__generated__/ArtistShows2_artist.graphql" +import { ArtistShows2_artist$data } from "__generated__/ArtistShows2_artist.graphql" import { PAGE_SIZE } from "app/Components/constants" import { defaultEnvironment } from "app/relay/createEnvironment" import { extractNodes } from "app/utils/extractNodes" @@ -14,7 +14,7 @@ import { ArtistShows2Query } from "../../../__generated__/ArtistShows2Query.grap import { ArtistShowFragmentContainer } from "../../Components/Artist/ArtistShows/ArtistShow" interface Props { - artist: ArtistShows2_artist + artist: ArtistShows2_artist$data relay: RelayPaginationProp } @@ -101,7 +101,6 @@ export const ArtistShows2PaginationContainer = createPaginationContainer( count: { type: "Int", defaultValue: 10 } status: { type: "String", defaultValue: "closed" } cursor: { type: "String" } - artistID: { type: "String!" } ) { slug name @@ -140,8 +139,7 @@ export const ArtistShows2PaginationContainer = createPaginationContainer( $status: String! ) { artist(id: $artistID) { - ...ArtistShows2_artist - @arguments(count: $count, cursor: $cursor, artistID: $artistID, status: $status) + ...ArtistShows2_artist @arguments(count: $count, cursor: $cursor, status: $status) } } `, @@ -157,7 +155,7 @@ export const ArtistShows2QueryRenderer: React.FC<{ artistID: string }> = ({ arti query ArtistShows2Query($artistID: String!) { artist(id: $artistID) { slug - ...ArtistShows2_artist @arguments(artistID: $artistID) + ...ArtistShows2_artist } } `} diff --git a/src/app/Scenes/Artwork/Artwork.tsx b/src/app/Scenes/Artwork/Artwork.tsx index e6d6146e8c6..97fb689d20a 100644 --- a/src/app/Scenes/Artwork/Artwork.tsx +++ b/src/app/Scenes/Artwork/Artwork.tsx @@ -1,7 +1,7 @@ import { OwnerType } from "@artsy/cohesion" -import { Artwork_artworkAboveTheFold } from "__generated__/Artwork_artworkAboveTheFold.graphql" -import { Artwork_artworkBelowTheFold } from "__generated__/Artwork_artworkBelowTheFold.graphql" -import { Artwork_me } from "__generated__/Artwork_me.graphql" +import { Artwork_artworkAboveTheFold$data } from "__generated__/Artwork_artworkAboveTheFold.graphql" +import { Artwork_artworkBelowTheFold$data } from "__generated__/Artwork_artworkBelowTheFold.graphql" +import { Artwork_me$data } from "__generated__/Artwork_me.graphql" import { ArtworkAboveTheFoldQuery } from "__generated__/ArtworkAboveTheFoldQuery.graphql" import { ArtworkBelowTheFoldQuery } from "__generated__/ArtworkBelowTheFoldQuery.graphql" import { ArtworkMarkAsRecentlyViewedQuery } from "__generated__/ArtworkMarkAsRecentlyViewedQuery.graphql" @@ -45,9 +45,9 @@ import { PartnerCardFragmentContainer as PartnerCard } from "./Components/Partne import { Questions } from "./Components/Questions" interface ArtworkProps { - artworkAboveTheFold: Artwork_artworkAboveTheFold | null - artworkBelowTheFold: Artwork_artworkBelowTheFold | null - me: Artwork_me | null + artworkAboveTheFold: Artwork_artworkAboveTheFold$data | null + artworkBelowTheFold: Artwork_artworkBelowTheFold$data | null + me: Artwork_me$data | null isVisible: boolean relay: RelayRefetchProp tracking?: TrackingProp diff --git a/src/app/Scenes/Artwork/Components/AboutArtist.tsx b/src/app/Scenes/Artwork/Components/AboutArtist.tsx index 299bea60076..b32aca4a8b0 100644 --- a/src/app/Scenes/Artwork/Components/AboutArtist.tsx +++ b/src/app/Scenes/Artwork/Components/AboutArtist.tsx @@ -1,4 +1,4 @@ -import { AboutArtist_artwork } from "__generated__/AboutArtist_artwork.graphql" +import { AboutArtist_artwork$data } from "__generated__/AboutArtist_artwork.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { ReadMore } from "app/Components/ReadMore" import { truncatedTextLimit } from "app/utils/hardware" @@ -8,7 +8,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface AboutArtistProps { - artwork: AboutArtist_artwork + artwork: AboutArtist_artwork$data } export const AboutArtist: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/AboutWork.tests.tsx b/src/app/Scenes/Artwork/Components/AboutWork.tests.tsx index ebe842c933c..1fa1308465e 100644 --- a/src/app/Scenes/Artwork/Components/AboutWork.tests.tsx +++ b/src/app/Scenes/Artwork/Components/AboutWork.tests.tsx @@ -1,4 +1,4 @@ -import { AboutWork_artwork } from "__generated__/AboutWork_artwork.graphql" +import { AboutWork_artwork$data } from "__generated__/AboutWork_artwork.graphql" import { renderWithWrappersTL } from "app/tests/renderWithWrappers" import React from "react" import { AboutWork } from "./AboutWork" @@ -52,10 +52,10 @@ describe("AboutWork", () => { }) }) -const aboutWorkArtwork: AboutWork_artwork = { +const aboutWorkArtwork: AboutWork_artwork$data = { additionalInformation: "This is some information about the artwork by the gallery. It has to be at least 320 characters in order to test that the read more component truncates possibly. So here is soem lorem ipsum: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", description: "This is some information about the artwork by Artsy.", isInAuction: false, - " $refType": "AboutWork_artwork", + " $fragmentType": "AboutWork_artwork", } diff --git a/src/app/Scenes/Artwork/Components/AboutWork.tsx b/src/app/Scenes/Artwork/Components/AboutWork.tsx index d4ca3e6eda1..26844d694cb 100644 --- a/src/app/Scenes/Artwork/Components/AboutWork.tsx +++ b/src/app/Scenes/Artwork/Components/AboutWork.tsx @@ -1,4 +1,4 @@ -import { AboutWork_artwork } from "__generated__/AboutWork_artwork.graphql" +import { AboutWork_artwork$data } from "__generated__/AboutWork_artwork.graphql" import { ReadMore } from "app/Components/ReadMore" import { truncatedTextLimit } from "app/utils/hardware" import { Schema } from "app/utils/track" @@ -7,7 +7,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface AboutWorkProps { - artwork: AboutWork_artwork + artwork: AboutWork_artwork$data } export const AboutWork: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/ArtworkActions.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkActions.tests.tsx index bab97d63e21..d010638c4e1 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkActions.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkActions.tests.tsx @@ -1,5 +1,5 @@ -import { ArtworkActions_artwork } from "__generated__/ArtworkActions_artwork.graphql" -import { ArtworkActionsTestsQueryRawResponse } from "__generated__/ArtworkActionsTestsQuery.graphql" +import { ArtworkActions_artwork$data } from "__generated__/ArtworkActions_artwork.graphql" +import { ArtworkActionsTestsQuery$data } from "__generated__/ArtworkActionsTestsQuery.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { __globalStoreTestUtils__ } from "app/store/GlobalStore" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" @@ -135,7 +135,7 @@ describe("ArtworkActions", () => { } } `, - mockData: { artwork: mockArtworkData } as ArtworkActionsTestsQueryRawResponse, + mockData: { artwork: mockArtworkData } as ArtworkActionsTestsQuery$data, mockMutationResults: { saveArtwork: mockSaveResults }, }) } @@ -205,7 +205,7 @@ describe("ArtworkActions", () => { } } `, - mockData: { artwork: artworkActionsArtwork }, // Enable/fix this when making large change to these components/fixtures: as ArtworkActionsTestsErrorQueryRawResponse, + mockData: { artwork: artworkActionsArtwork }, // Enable/fix this when making large change to these components/fixtures: as ArtworkActionsTestsErrorQuery, mockMutationResults: { saveArtwork: () => { return Promise.reject(new Error("failed to fetch")) @@ -229,7 +229,7 @@ describe("ArtworkActions", () => { }) }) -const artworkActionsArtwork: ArtworkActions_artwork = { +const artworkActionsArtwork: ArtworkActions_artwork$data = { id: "artwork12345", internalID: "12345", title: "test title", @@ -254,5 +254,5 @@ const artworkActionsArtwork: ArtworkActions_artwork = { is_hangable: true, heightCm: 10, widthCm: 10, - " $refType": "ArtworkActions_artwork", + " $fragmentType": "ArtworkActions_artwork", } diff --git a/src/app/Scenes/Artwork/Components/ArtworkActions.tsx b/src/app/Scenes/Artwork/Components/ArtworkActions.tsx index 43607af69b0..c63dbd6d38a 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkActions.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkActions.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" -import { ArtworkActions_artwork } from "__generated__/ArtworkActions_artwork.graphql" +import { ArtworkActions_artwork$data } from "__generated__/ArtworkActions_artwork.graphql" import { ArtworkActionsSaveMutation } from "__generated__/ArtworkActionsSaveMutation.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { unsafe__getEnvironment } from "app/store/GlobalStore" @@ -27,7 +27,7 @@ import { commitMutation, createFragmentContainer, graphql, RelayProp } from "rea import styled from "styled-components/native" interface ArtworkActionsProps { - artwork: ArtworkActions_artwork + artwork: ArtworkActions_artwork$data relay?: RelayProp shareOnPress: () => void } @@ -35,7 +35,7 @@ interface ArtworkActionsProps { export const shareContent = ( title: string, href: string, - artists: ArtworkActions_artwork["artists"] + artists: ArtworkActions_artwork$data["artists"] ) => { let computedTitle: string | null if (artists && artists.length) { diff --git a/src/app/Scenes/Artwork/Components/ArtworkDetails.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkDetails.tests.tsx index 23303c108f3..f400c53e0b0 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkDetails.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkDetails.tests.tsx @@ -1,4 +1,4 @@ -import { ArtworkDetails_artwork } from "__generated__/ArtworkDetails_artwork.graphql" +import { ArtworkDetails_artwork$data } from "__generated__/ArtworkDetails_artwork.graphql" import { __globalStoreTestUtils__, GlobalStoreProvider } from "app/store/GlobalStore" // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ import { mount } from "enzyme" @@ -9,7 +9,7 @@ import { ArtworkDetails } from "./ArtworkDetails" jest.unmock("react-relay") describe("Artwork Details", () => { - const mountArtworkDetails = (artwork: ArtworkDetails_artwork) => + const mountArtworkDetails = (artwork: ArtworkDetails_artwork$data) => mount( @@ -19,7 +19,7 @@ describe("Artwork Details", () => { ) it("renders the data if available", () => { - const testArtwork: ArtworkDetails_artwork = { + const testArtwork: ArtworkDetails_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, category: "Oil on canvas", @@ -48,7 +48,7 @@ describe("Artwork Details", () => { }) it("hides certificate of authenticity, framed, and signature fields if null", () => { - const testArtwork: ArtworkDetails_artwork = { + const testArtwork: ArtworkDetails_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, category: "Oil on canvas", @@ -75,7 +75,7 @@ describe("Artwork Details", () => { }) it("shows condition description if present and lot condition report disabled", () => { - const testArtwork: ArtworkDetails_artwork = { + const testArtwork: ArtworkDetails_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, category: "Oil on canvas", @@ -106,7 +106,7 @@ describe("Artwork Details", () => { it("shows request condition report if lot condition report enabled and feature flag is enabled", () => { __globalStoreTestUtils__?.injectFeatureFlags({ AROptionsLotConditionReport: true }) - const testArtwork: ArtworkDetails_artwork = { + const testArtwork: ArtworkDetails_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, category: "Oil on canvas", @@ -139,7 +139,7 @@ describe("Artwork Details", () => { it("does not show request condition report if lot condition report enabled and feature flag is disabled", () => { __globalStoreTestUtils__?.injectFeatureFlags({ AROptionsLotConditionReport: false }) - const testArtwork: ArtworkDetails_artwork = { + const testArtwork: ArtworkDetails_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, category: "Oil on canvas", diff --git a/src/app/Scenes/Artwork/Components/ArtworkDetails.tsx b/src/app/Scenes/Artwork/Components/ArtworkDetails.tsx index 71eb18129f3..a9e3590b537 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkDetails.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkDetails.tsx @@ -1,4 +1,4 @@ -import { ArtworkDetails_artwork } from "__generated__/ArtworkDetails_artwork.graphql" +import { ArtworkDetails_artwork$data } from "__generated__/ArtworkDetails_artwork.graphql" import { navigate } from "app/navigation/navigate" import { useFeatureFlag } from "app/store/GlobalStore" import { Schema } from "app/utils/track" @@ -10,7 +10,7 @@ import { ArtworkDetailsRow } from "./ArtworkDetailsRow" import { RequestConditionReportQueryRenderer } from "./RequestConditionReport" interface ArtworkDetailsProps { - artwork: ArtworkDetails_artwork + artwork: ArtworkDetails_artwork$data } export const ArtworkDetails: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/AuctionFaqSection.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/AuctionFaqSection.tsx index 549091c892f..5ccb2c011b1 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/AuctionFaqSection.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/AuctionFaqSection.tsx @@ -1,4 +1,4 @@ -import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" +import { ArtworkExtraLinks_artwork$data } from "__generated__/ArtworkExtraLinks_artwork.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { navigate } from "app/navigation/navigate" import { sendEmail } from "app/utils/sendEmail" @@ -10,7 +10,7 @@ import { useTracking } from "react-tracking" import { partnerName } from "./partnerName" interface AuctionFaqSectionProps { - artwork: ArtworkExtraLinks_artwork + artwork: ArtworkExtraLinks_artwork$data auctionState: AuctionTimerState } diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/FaqAndSpecialistSection.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/FaqAndSpecialistSection.tsx index cbdc5ff267b..2443b9465e2 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/FaqAndSpecialistSection.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/FaqAndSpecialistSection.tsx @@ -1,4 +1,4 @@ -import { FaqAndSpecialistSection_artwork } from "__generated__/FaqAndSpecialistSection_artwork.graphql" +import { FaqAndSpecialistSection_artwork$data } from "__generated__/FaqAndSpecialistSection_artwork.graphql" import { navigate } from "app/navigation/navigate" import { sendEmail } from "app/utils/sendEmail" import { Schema } from "app/utils/track" @@ -9,7 +9,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface FaqAndSpecialistSectionProps { - artwork: FaqAndSpecialistSection_artwork + artwork: FaqAndSpecialistSection_artwork$data } const FaqAndSpecialistSection: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tests.tsx index 4ab041ee9c9..799d8fbec95 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tests.tsx @@ -1,5 +1,5 @@ import { fireEvent } from "@testing-library/react-native" -import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" +import { ArtworkExtraLinks_artwork$data } from "__generated__/ArtworkExtraLinks_artwork.graphql" import { ArtworkFixture } from "app/__fixtures__/ArtworkFixture" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { ModalStack } from "app/navigation/ModalStack" @@ -11,6 +11,7 @@ import { } from "app/store/GlobalStore" import { mockTrackEvent } from "app/tests/globallyMockedStuff" import { renderWithWrappersTL } from "app/tests/renderWithWrappers" +import { CleanRelayFragment } from "app/utils/relayHelpers" // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ import { mount } from "enzyme" import { Sans, Theme } from "palette" @@ -30,14 +31,14 @@ function getWrapper({ artwork, auctionState, }: { - artwork: ArtworkExtraLinks_artwork + artwork: CleanRelayFragment auctionState?: AuctionTimerState }) { return mount( - + @@ -231,7 +232,7 @@ describe("ArtworkExtraLinks", () => { }) describe("FAQ and specialist Auction links", () => { - const artwork: ArtworkExtraLinks_artwork = { + const artwork = { ...ArtworkFixture, isForSale: true, isInAuction: true, @@ -323,7 +324,10 @@ describe("ArtworkExtraLinks", () => { - + @@ -394,7 +398,10 @@ describe("ArtworkExtraLinks", () => { - + diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tsx index fb92775f14f..1431bc00a84 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/index.tsx @@ -1,4 +1,4 @@ -import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" +import { ArtworkExtraLinks_artwork$data } from "__generated__/ArtworkExtraLinks_artwork.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { navigate } from "app/navigation/navigate" import { useFeatureFlag, useSelectedTab } from "app/store/GlobalStore" @@ -12,7 +12,7 @@ import { AuctionFaqSection } from "./AuctionFaqSection" import { FaqAndSpecialistSectionFragmentContainer as FaqAndSpecialistSection } from "./FaqAndSpecialistSection" export interface ArtworkExtraLinksProps { - artwork: ArtworkExtraLinks_artwork + artwork: ArtworkExtraLinks_artwork$data auctionState: AuctionTimerState } diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tests.tsx index 144b0366187..f9e3592f3eb 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tests.tsx @@ -1,8 +1,8 @@ -import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" +import { ArtworkExtraLinks_artwork$data } from "__generated__/ArtworkExtraLinks_artwork.graphql" import { partnerName } from "./partnerName" describe("partnerName", () => { - const sale = { isBenefit: false, partner: null } as ArtworkExtraLinks_artwork["sale"] + const sale = { isBenefit: false, partner: null } as ArtworkExtraLinks_artwork$data["sale"] it(`returns "Artsy's" if the sale is a benefit auction`, () => { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ diff --git a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tsx b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tsx index 3778139756b..f1fd34ebf0a 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkExtraLinks/partnerName.tsx @@ -1,10 +1,10 @@ -import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" -import { ConfirmBid_sale_artwork } from "__generated__/ConfirmBid_sale_artwork.graphql" +import { ArtworkExtraLinks_artwork$data } from "__generated__/ArtworkExtraLinks_artwork.graphql" +import { ConfirmBid_sale_artwork$data } from "__generated__/ConfirmBid_sale_artwork.graphql" import { isEmpty } from "lodash" type SaleWithPartner = - | NonNullable - | NonNullable + | NonNullable + | NonNullable export const partnerName = ({ isBenefit, partner }: SaleWithPartner) => { if (isBenefit || isEmpty(partner)) { diff --git a/src/app/Scenes/Artwork/Components/ArtworkHeader.tsx b/src/app/Scenes/Artwork/Components/ArtworkHeader.tsx index 8945d0daa48..e8dbcf16caf 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkHeader.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkHeader.tsx @@ -1,6 +1,6 @@ import { ContextModule, CustomService, OwnerType, share } from "@artsy/cohesion" import Clipboard from "@react-native-community/clipboard" -import { ArtworkHeader_artwork } from "__generated__/ArtworkHeader_artwork.graphql" +import { ArtworkHeader_artwork$data } from "__generated__/ArtworkHeader_artwork.graphql" import { CustomShareSheet, CustomShareSheetItem } from "app/Components/CustomShareSheet" import { useToast } from "app/Components/Toast/toastHook" import { unsafe__getEnvironment, useDevToggle } from "app/store/GlobalStore" @@ -30,7 +30,7 @@ import { ImageCarouselFragmentContainer } from "./ImageCarousel/ImageCarousel" import { InstagramStoryViewShot } from "./InstagramStoryViewShot" interface ArtworkHeaderProps { - artwork: ArtworkHeader_artwork + artwork: ArtworkHeader_artwork$data } export const ArtworkHeader: React.FC = (props) => { diff --git a/src/app/Scenes/Artwork/Components/ArtworkHistory.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkHistory.tests.tsx index 7d5ea224f1c..81e2579368a 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkHistory.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkHistory.tests.tsx @@ -1,4 +1,4 @@ -import { ArtworkHistory_artwork } from "__generated__/ArtworkHistory_artwork.graphql" +import { ArtworkHistory_artwork$data } from "__generated__/ArtworkHistory_artwork.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ import { mount } from "enzyme" @@ -22,7 +22,7 @@ describe("Artwork History", () => {
- +
@@ -46,7 +46,7 @@ describe("Artwork History", () => {
- +
@@ -69,7 +69,7 @@ describe("Artwork History", () => {
- +
diff --git a/src/app/Scenes/Artwork/Components/ArtworkHistory.tsx b/src/app/Scenes/Artwork/Components/ArtworkHistory.tsx index 97cdb4c4149..c1c85646082 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkHistory.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkHistory.tsx @@ -1,4 +1,4 @@ -import { ArtworkHistory_artwork } from "__generated__/ArtworkHistory_artwork.graphql" +import { ArtworkHistory_artwork$data } from "__generated__/ArtworkHistory_artwork.graphql" import { ReadMore } from "app/Components/ReadMore" import { truncatedTextLimit } from "app/utils/hardware" import { Schema } from "app/utils/track" @@ -7,7 +7,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ArtworkHistoryProps { - artwork: ArtworkHistory_artwork + artwork: ArtworkHistory_artwork$data } export const ArtworkHistory: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/ArtworkTombstone.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworkTombstone.tests.tsx index 30d59628f0b..12cce8193a4 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkTombstone.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkTombstone.tests.tsx @@ -1,4 +1,4 @@ -import { ArtworkTombstone_artwork } from "__generated__/ArtworkTombstone_artwork.graphql" +import { ArtworkTombstone_artwork$data } from "__generated__/ArtworkTombstone_artwork.graphql" import { ArtworkFixture } from "app/__fixtures__/ArtworkFixture" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { navigate } from "app/navigation/navigate" @@ -319,7 +319,7 @@ describe("ArtworkTombstone", () => { }) }) -const artworkTombstoneArtwork: ArtworkTombstone_artwork = { +const artworkTombstoneArtwork: ArtworkTombstone_artwork$data = { ...ArtworkFixture, title: "Hello im a title", medium: "Painting", @@ -328,27 +328,27 @@ const artworkTombstoneArtwork: ArtworkTombstone_artwork = { { name: "Andy Warhol", href: "/artist/andy-warhol", - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, { name: "Alex Katz", href: "/artist/alex-katz", - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, { name: "Pablo Picasso", href: "/artist/pablo-picasso", - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, { name: "Banksy", href: "/artist/banksy", - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, { name: "Barbara Kruger", href: "/artist/barbara-kruger", - " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, }, ], cultural_maker: null, @@ -361,9 +361,10 @@ const artworkTombstoneArtwork: ArtworkTombstone_artwork = { shortArrayDescription: ["This work is part of", "a limited edition set"], }, certificateOfAuthenticity: { - __typename: "Certificate", + label: "A Certificate", + __typename: "ArtworkInfoRow", }, - " $refType": null as any, + " $fragmentType": "ArtworkTombstone_artwork", } const artworkTombstoneAuctionArtwork = { diff --git a/src/app/Scenes/Artwork/Components/ArtworkTombstone.tsx b/src/app/Scenes/Artwork/Components/ArtworkTombstone.tsx index 47bb6add70d..bcee0315df6 100644 --- a/src/app/Scenes/Artwork/Components/ArtworkTombstone.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworkTombstone.tsx @@ -1,4 +1,4 @@ -import { ArtworkTombstone_artwork } from "__generated__/ArtworkTombstone_artwork.graphql" +import { ArtworkTombstone_artwork$data } from "__generated__/ArtworkTombstone_artwork.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { navigate } from "app/navigation/navigate" import { Schema, track } from "app/utils/track" @@ -10,10 +10,10 @@ import { CascadingEndTimesBanner } from "./CascadingEndTimesBanner" import { CertificateAuthenticityModal } from "./CertificateAuthenticityModal" import { FollowArtistLinkFragmentContainer as FollowArtistLink } from "./FollowArtistLink" -type Artist = NonNullable[0]> +type Artist = NonNullable[0]> export interface ArtworkTombstoneProps { - artwork: ArtworkTombstone_artwork + artwork: ArtworkTombstone_artwork$data } export interface ArtworkTombstoneState { @@ -275,6 +275,7 @@ export const ArtworkTombstoneFragmentContainer = createFragmentContainer(Artwork name } certificateOfAuthenticity { + label __typename } sale { diff --git a/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tests.tsx b/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tests.tsx index 9e61585bad5..ea2dc1f0ec2 100644 --- a/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tests.tsx @@ -1,7 +1,4 @@ -import { - ArtworksInSeriesRailTestsQuery, - ArtworksInSeriesRailTestsQueryRawResponse, -} from "__generated__/ArtworksInSeriesRailTestsQuery.graphql" +import { ArtworksInSeriesRailTestsQuery } from "__generated__/ArtworksInSeriesRailTestsQuery.graphql" import { ArtworkRailCard } from "app/Components/ArtworkRail/ArtworkRailCard" import { navigate } from "app/navigation/navigate" import { mockTrackEvent } from "app/tests/globallyMockedStuff" @@ -111,7 +108,7 @@ describe("ArtworksInSeriesRail", () => { }) }) - const ArtworksInSeriesRailFixture: ArtworksInSeriesRailTestsQueryRawResponse = { + const ArtworksInSeriesRailFixture: ArtworksInSeriesRailTestsQuery["rawResponse"] = { artwork: { id: "asdf123", internalID: "artwork124", diff --git a/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tsx b/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tsx index 443e1221c59..9200d0cce1c 100644 --- a/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tsx +++ b/src/app/Scenes/Artwork/Components/ArtworksInSeriesRail.tsx @@ -1,6 +1,6 @@ import { ActionType, ContextModule, OwnerType, ScreenOwnerType } from "@artsy/cohesion" import { - ArtworksInSeriesRail_artwork, + ArtworksInSeriesRail_artwork$data, ArtworksInSeriesRail_artwork$key, } from "__generated__/ArtworksInSeriesRail_artwork.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" @@ -74,7 +74,7 @@ const artworkFragment = graphql` const tracks = { tappedHeader: ( - sourceArtwork: ArtworksInSeriesRail_artwork, + sourceArtwork: ArtworksInSeriesRail_artwork$data, destination: { internalID: string; slug: string } ) => ({ action: ActionType.tappedArtworkGroup, @@ -88,7 +88,7 @@ const tracks = { type: "viewAll", }), tappedArtwork: ( - sourceArtwork: ArtworksInSeriesRail_artwork, + sourceArtwork: ArtworksInSeriesRail_artwork$data, destination: { internalID: string; slug: string } ) => ({ action: ActionType.tappedArtworkGroup, diff --git a/src/app/Scenes/Artwork/Components/AuctionPrice.tests.tsx b/src/app/Scenes/Artwork/Components/AuctionPrice.tests.tsx index 01b7ae4695f..5a24e6b512c 100644 --- a/src/app/Scenes/Artwork/Components/AuctionPrice.tests.tsx +++ b/src/app/Scenes/Artwork/Components/AuctionPrice.tests.tsx @@ -1,4 +1,4 @@ -import { AuctionPriceTestsQueryRawResponse } from "__generated__/AuctionPriceTestsQuery.graphql" +import { AuctionPriceTestsQuery$data } from "__generated__/AuctionPriceTestsQuery.graphql" import { AuctionPreview, AuctionPreviewNoStartingBid, @@ -43,7 +43,7 @@ describe("AuctionPrice", () => { `, mockData: { artwork: response, - } as AuctionPriceTestsQueryRawResponse, + } as AuctionPriceTestsQuery$data, }) } diff --git a/src/app/Scenes/Artwork/Components/AuctionPrice.tsx b/src/app/Scenes/Artwork/Components/AuctionPrice.tsx index 4967da6efb5..2ff8b31fe19 100644 --- a/src/app/Scenes/Artwork/Components/AuctionPrice.tsx +++ b/src/app/Scenes/Artwork/Components/AuctionPrice.tsx @@ -1,4 +1,4 @@ -import { AuctionPrice_artwork } from "__generated__/AuctionPrice_artwork.graphql" +import { AuctionPrice_artwork$data } from "__generated__/AuctionPrice_artwork.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { navigate } from "app/navigation/navigate" import { get } from "app/utils/get" @@ -8,7 +8,7 @@ import { Text } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface AuctionPriceProps { - artwork: AuctionPrice_artwork + artwork: AuctionPrice_artwork$data auctionState: AuctionTimerState } @@ -67,7 +67,6 @@ export class AuctionPrice extends React.Component { const myMaxBid = get(myMostRecent, (bid) => bid.maxBid.display) // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ const bidsCount = get(artwork, (a) => a.saleArtwork.counts.bidderPositions) - // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ const bidsPresent = bidsCount > 0 const bidText = this.bidText(bidsPresent, bidsCount) ? this.bidText(bidsPresent, bidsCount) diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tests.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tests.tsx index de44e67b3f8..3bb0b09b96f 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tests.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tests.tsx @@ -1,4 +1,7 @@ -import { BidButtonTestsQueryRawResponse } from "__generated__/BidButtonTestsQuery.graphql" +import { + BidButtonTestsQuery, + BidButtonTestsQuery$data, +} from "__generated__/BidButtonTestsQuery.graphql" import { ArtworkFromAuctionPreview, ArtworkFromClosedAuction, @@ -30,7 +33,7 @@ const merge: (...args: object[]) => any = _merge const realNow = Settings.now const realDefaultZone = Settings.defaultZone -const meFixture: BidButtonTestsQueryRawResponse["me"] = { +const meFixture: BidButtonTestsQuery["rawResponse"]["me"] = { id: "id", identityVerified: false, } @@ -68,7 +71,7 @@ describe("BidButton", () => { } } `, - mockData: { artwork, me } as BidButtonTestsQueryRawResponse, + mockData: { artwork, me } as BidButtonTestsQuery$data, }) } diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tsx index 06b7b4be795..dbbafddc284 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/BidButton.tsx @@ -1,6 +1,6 @@ import { ActionType } from "@artsy/cohesion" -import { BidButton_artwork } from "__generated__/BidButton_artwork.graphql" -import { BidButton_me } from "__generated__/BidButton_me.graphql" +import { BidButton_artwork$data } from "__generated__/BidButton_artwork.graphql" +import { BidButton_me$data } from "__generated__/BidButton_me.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { navigate } from "app/navigation/navigate" import { bidderNeedsIdentityVerification } from "app/utils/auction" @@ -14,8 +14,8 @@ import track from "react-tracking" export const PREDICTION_URL = "https://live.artsy.net" export interface BidButtonProps { - artwork: BidButton_artwork - me: BidButton_me + artwork: BidButton_artwork$data + me: BidButton_me$data auctionState: AuctionTimerState relay: RelayProp } @@ -100,7 +100,7 @@ export class BidButton extends React.Component { renderIsPreview( // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ - registrationStatus: BidButton_artwork["sale"]["registrationStatus"], + registrationStatus: BidButton_artwork$data["sale"]["registrationStatus"], needsIdentityVerification: boolean ) { return ( diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/BuyNowButton.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/BuyNowButton.tsx index aaf6b159a43..ef2b37f2ac4 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/BuyNowButton.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/BuyNowButton.tsx @@ -1,5 +1,5 @@ import { ActionType, OwnerType, TappedBuyNow } from "@artsy/cohesion" -import { BuyNowButton_artwork } from "__generated__/BuyNowButton_artwork.graphql" +import { BuyNowButton_artwork$data } from "__generated__/BuyNowButton_artwork.graphql" import { BuyNowButtonOrderMutation } from "__generated__/BuyNowButtonOrderMutation.graphql" import { navigate } from "app/navigation/navigate" import { Track, track as _track } from "app/utils/track" @@ -9,7 +9,7 @@ import { Alert } from "react-native" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" export interface BuyNowButtonProps { - artwork: BuyNowButton_artwork + artwork: BuyNowButton_artwork$data relay: RelayProp variant?: ButtonProps["variant"] // EditionSetID is passed down from the edition selected by the user diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/CollapsibleArtworkDetails.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/CollapsibleArtworkDetails.tsx index 02f58806f71..117f2fe29ad 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/CollapsibleArtworkDetails.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/CollapsibleArtworkDetails.tsx @@ -1,4 +1,4 @@ -import { CollapsibleArtworkDetails_artwork } from "__generated__/CollapsibleArtworkDetails_artwork.graphql" +import { CollapsibleArtworkDetails_artwork$data } from "__generated__/CollapsibleArtworkDetails_artwork.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import ChevronIcon from "app/Icons/ChevronIcon" import { ArtworkDetailsRow } from "app/Scenes/Artwork/Components/ArtworkDetailsRow" @@ -9,11 +9,11 @@ import { LayoutAnimation, ScrollView, TouchableOpacity } from "react-native" import { createFragmentContainer, graphql } from "react-relay" export interface CollapsibleArtworkDetailsProps { - artwork: CollapsibleArtworkDetails_artwork + artwork: CollapsibleArtworkDetails_artwork$data hasSeparator?: boolean } -const artworkDetailItems = (artwork: CollapsibleArtworkDetails_artwork) => { +const artworkDetailItems = (artwork: CollapsibleArtworkDetails_artwork$data) => { const items = [ { title: "Price", value: artwork.saleMessage }, { title: "Medium", value: artwork.category }, diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tests.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tests.tsx index 35c3488fbd3..a9d77a30512 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tests.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tests.tsx @@ -1,5 +1,5 @@ -import { CommercialButtonsTestsMutationQueryRawResponse } from "__generated__/CommercialButtonsTestsMutationQuery.graphql" -import { CommercialButtonsTestsRenderQueryRawResponse } from "__generated__/CommercialButtonsTestsRenderQuery.graphql" +import { CommercialButtonsTestsMutationQuery$data } from "__generated__/CommercialButtonsTestsMutationQuery.graphql" +import { CommercialButtonsTestsRenderQuery$data } from "__generated__/CommercialButtonsTestsRenderQuery.graphql" import { ArtworkFixture } from "app/__fixtures__/ArtworkFixture" import { navigate } from "app/navigation/navigate" import { __globalStoreTestUtils__, GlobalStoreProvider } from "app/store/GlobalStore" @@ -35,7 +35,7 @@ const componentWithQuery = async ({ } } `, - mockData: { artwork: mockArtworkData } as CommercialButtonsTestsMutationQueryRawResponse, + mockData: { artwork: mockArtworkData } as CommercialButtonsTestsMutationQuery$data, mockMutationResults: { commerceCreateOrderWithArtwork: mockOrderMutationResults, commerceCreateOfferOrderWithArtwork: mockOfferMutationResults, @@ -80,7 +80,7 @@ const relayComponent = async ({ artwork }) => { } } `, - mockData: { artwork } as CommercialButtonsTestsRenderQueryRawResponse, + mockData: { artwork } as CommercialButtonsTestsRenderQuery$data, }) } diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tsx index 93c3ec87b00..b5e8537bf25 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/CommercialButtons.tsx @@ -1,5 +1,5 @@ -import { CommercialButtons_artwork } from "__generated__/CommercialButtons_artwork.graphql" -import { CommercialButtons_me } from "__generated__/CommercialButtons_me.graphql" +import { CommercialButtons_artwork$data } from "__generated__/CommercialButtons_artwork.graphql" +import { CommercialButtons_me$data } from "__generated__/CommercialButtons_me.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { Spacer } from "palette" import React from "react" @@ -10,8 +10,8 @@ import { InquiryButtonsFragmentContainer } from "./InquiryButtons" import { MakeOfferButtonFragmentContainer } from "./MakeOfferButton" export interface CommercialButtonProps { - artwork: CommercialButtons_artwork - me: CommercialButtons_me + artwork: CommercialButtons_artwork$data + me: CommercialButtons_me$data // EditionSetID is passed down from the edition selected by the user editionSetID?: string auctionState: AuctionTimerState diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryButtons.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryButtons.tsx index 46691b4a8b4..916eb2b4afe 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryButtons.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryButtons.tsx @@ -1,5 +1,5 @@ import { ActionType, OwnerType, TappedContactGallery } from "@artsy/cohesion" -import { InquiryButtons_artwork } from "__generated__/InquiryButtons_artwork.graphql" +import { InquiryButtons_artwork$data } from "__generated__/InquiryButtons_artwork.graphql" import { InquirySuccessNotification } from "app/Scenes/Artwork/Components/CommercialButtons/InquirySuccessNotification" import { ArtworkInquiryContext, @@ -13,7 +13,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" import { InquiryModalFragmentContainer } from "./InquiryModal" export type InquiryButtonsProps = Omit & { - artwork: InquiryButtons_artwork + artwork: InquiryButtons_artwork$data } export interface InquiryButtonsState { diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tests.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tests.tsx index 477f1a6137b..7cda8aa6497 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tests.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tests.tsx @@ -3,10 +3,7 @@ jest.mock("app/utils/googleMaps", () => ({ getLocationDetails: jest.fn(), })) -import { - InquiryModalTestsQuery, - InquiryModalTestsQueryResponse, -} from "__generated__/InquiryModalTestsQuery.graphql" +import { InquiryModalTestsQuery } from "__generated__/InquiryModalTestsQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { extractText } from "app/tests/extractText" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" @@ -32,7 +29,7 @@ const toggleVisibility = jest.fn() const onMutationSuccessful = jest.fn() // An app shell that holds modal visibility properties -const FakeApp = (props: InquiryModalTestsQueryResponse) => { +const FakeApp = (props: InquiryModalTestsQuery["response"]) => { const [modalIsVisible, setModalIsVisible] = React.useState(true) toggleVisibility.mockImplementation(() => setModalIsVisible(!modalIsVisible)) const modalProps = { @@ -52,7 +49,7 @@ const FakeApp = (props: InquiryModalTestsQueryResponse) => { } interface RenderComponentProps { - props: InquiryModalTestsQueryResponse | null + props: InquiryModalTestsQuery["response"] | null error: Error | null } diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tsx index 55416e1c0c3..d872858b4d4 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/InquiryModal.tsx @@ -1,4 +1,4 @@ -import { InquiryModal_artwork } from "__generated__/InquiryModal_artwork.graphql" +import { InquiryModal_artwork$data } from "__generated__/InquiryModal_artwork.graphql" import { FancyModal } from "app/Components/FancyModal/FancyModal" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import ChevronIcon from "app/Icons/ChevronIcon" @@ -19,7 +19,7 @@ import { CollapsibleArtworkDetailsFragmentContainer } from "./CollapsibleArtwork import { ShippingModal } from "./ShippingModal" interface InquiryModalProps { - artwork: InquiryModal_artwork + artwork: InquiryModal_artwork$data closeModal?: () => void exitModal?: () => void toggleVisibility: () => void diff --git a/src/app/Scenes/Artwork/Components/CommercialButtons/MakeOfferButton.tsx b/src/app/Scenes/Artwork/Components/CommercialButtons/MakeOfferButton.tsx index d98a7e28366..ba0f3da9b9f 100644 --- a/src/app/Scenes/Artwork/Components/CommercialButtons/MakeOfferButton.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialButtons/MakeOfferButton.tsx @@ -1,5 +1,5 @@ import { ActionType, OwnerType, TappedMakeOffer } from "@artsy/cohesion" -import { MakeOfferButton_artwork } from "__generated__/MakeOfferButton_artwork.graphql" +import { MakeOfferButton_artwork$data } from "__generated__/MakeOfferButton_artwork.graphql" import { MakeOfferButtonOrderMutation } from "__generated__/MakeOfferButtonOrderMutation.graphql" import { navigate } from "app/navigation/navigate" import { Track, track as _track } from "app/utils/track" @@ -10,7 +10,7 @@ import { Alert } from "react-native" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" export interface MakeOfferButtonProps { - artwork: MakeOfferButton_artwork + artwork: MakeOfferButton_artwork$data relay: RelayProp // EditionSetID is passed down from the edition selected by the user editionSetID: string | null diff --git a/src/app/Scenes/Artwork/Components/CommercialEditionSetInformation.tsx b/src/app/Scenes/Artwork/Components/CommercialEditionSetInformation.tsx index 9d94d9c5050..0bd11859553 100644 --- a/src/app/Scenes/Artwork/Components/CommercialEditionSetInformation.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialEditionSetInformation.tsx @@ -1,4 +1,4 @@ -import { CommercialEditionSetInformation_artwork } from "__generated__/CommercialEditionSetInformation_artwork.graphql" +import { CommercialEditionSetInformation_artwork$data } from "__generated__/CommercialEditionSetInformation_artwork.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { Box, Flex, RadioButton, Sans, Spacer, Text } from "palette" import React from "react" @@ -7,10 +7,10 @@ import { createFragmentContainer, graphql } from "react-relay" import { CommercialPartnerInformationFragmentContainer as CommercialPartnerInformation } from "./CommercialPartnerInformation" // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ -type EditionSet = CommercialEditionSetInformation_artwork["editionSets"][0] +type EditionSet = CommercialEditionSetInformation_artwork$data["editionSets"][0] interface Props { - artwork: CommercialEditionSetInformation_artwork + artwork: CommercialEditionSetInformation_artwork$data setEditionSetId: (editionSetID: string) => void } diff --git a/src/app/Scenes/Artwork/Components/CommercialInformation.tsx b/src/app/Scenes/Artwork/Components/CommercialInformation.tsx index 5696a8a4bd1..5a4a9677761 100644 --- a/src/app/Scenes/Artwork/Components/CommercialInformation.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialInformation.tsx @@ -1,5 +1,5 @@ -import { CommercialInformation_artwork } from "__generated__/CommercialInformation_artwork.graphql" -import { CommercialInformation_me } from "__generated__/CommercialInformation_me.graphql" +import { CommercialInformation_artwork$data } from "__generated__/CommercialInformation_artwork.graphql" +import { CommercialInformation_me$data } from "__generated__/CommercialInformation_me.graphql" import { AuctionTimerState, Countdown, @@ -28,8 +28,8 @@ import { CommercialPartnerInformationFragmentContainer as CommercialPartnerInfor import { CreateArtworkAlertButtonsSectionFragmentContainer as CreateArtworkAlertButtonsSection } from "./CreateArtworkAlertButtonsSection" interface CommercialInformationProps extends CountdownTimerProps { - artwork: CommercialInformation_artwork - me: CommercialInformation_me + artwork: CommercialInformation_artwork$data + me: CommercialInformation_me$data hasStarted?: boolean tracking?: TrackingProp biddingEndAt?: string diff --git a/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tests.tsx b/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tests.tsx index 6fd62389940..7348ae143dc 100644 --- a/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tests.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tests.tsx @@ -1,4 +1,4 @@ -import { CommercialPartnerInformation_artwork } from "__generated__/CommercialPartnerInformation_artwork.graphql" +import { CommercialPartnerInformation_artwork$data } from "__generated__/CommercialPartnerInformation_artwork.graphql" import { __globalStoreTestUtils__, GlobalStoreProvider } from "app/store/GlobalStore" import { renderWithWrappersTL } from "app/tests/renderWithWrappers" // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ @@ -124,7 +124,7 @@ describe("CommercialPartnerInformation", () => { }) }) -const CommercialPartnerInformationArtwork: CommercialPartnerInformation_artwork = { +const CommercialPartnerInformationArtwork: CommercialPartnerInformation_artwork$data = { availability: "for sale", isAcquireable: true, isForSale: true, @@ -135,5 +135,5 @@ const CommercialPartnerInformationArtwork: CommercialPartnerInformation_artwork name: "Bob's Gallery", }, priceIncludesTaxDisplay: "VAT included in price", - " $refType": "CommercialPartnerInformation_artwork", + " $fragmentType": "CommercialPartnerInformation_artwork", } diff --git a/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tsx b/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tsx index c46be21bf41..d11fbcf26fa 100644 --- a/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tsx +++ b/src/app/Scenes/Artwork/Components/CommercialPartnerInformation.tsx @@ -1,4 +1,4 @@ -import { CommercialPartnerInformation_artwork } from "__generated__/CommercialPartnerInformation_artwork.graphql" +import { CommercialPartnerInformation_artwork$data } from "__generated__/CommercialPartnerInformation_artwork.graphql" import { navigate } from "app/navigation/navigate" import { useFeatureFlag } from "app/store/GlobalStore" import { LinkText, Spacer, Text } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - artwork: CommercialPartnerInformation_artwork + artwork: CommercialPartnerInformation_artwork$data } export const CommercialPartnerInformation: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/ContextCard.tsx b/src/app/Scenes/Artwork/Components/ContextCard.tsx index 245b312fdc5..72f971bfdf8 100644 --- a/src/app/Scenes/Artwork/Components/ContextCard.tsx +++ b/src/app/Scenes/Artwork/Components/ContextCard.tsx @@ -1,4 +1,4 @@ -import { ContextCard_artwork } from "__generated__/ContextCard_artwork.graphql" +import { ContextCard_artwork$data } from "__generated__/ContextCard_artwork.graphql" import { ContextCardFollowMutation } from "__generated__/ContextCardFollowMutation.graphql" import { navigate } from "app/navigation/navigate" import { Schema, Track, track as _track } from "app/utils/track" @@ -8,7 +8,7 @@ import { TouchableWithoutFeedback } from "react-native" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" interface ContextCardProps { - artwork: ContextCard_artwork + artwork: ContextCard_artwork$data relay: RelayProp } @@ -16,7 +16,7 @@ interface ContextCardState { isSaving: boolean } -type Show = Extract, { __typename: "Show" }> +type Show = Extract, { __typename: "Show" }> const track: Track = _track as any diff --git a/src/app/Scenes/Artwork/Components/CreateArtworkAlertButtonsSection.tsx b/src/app/Scenes/Artwork/Components/CreateArtworkAlertButtonsSection.tsx index e191f4234d8..050f8c1c168 100644 --- a/src/app/Scenes/Artwork/Components/CreateArtworkAlertButtonsSection.tsx +++ b/src/app/Scenes/Artwork/Components/CreateArtworkAlertButtonsSection.tsx @@ -5,7 +5,7 @@ import { ScreenOwnerType, TappedCreateAlert, } from "@artsy/cohesion" -import { CreateArtworkAlertButtonsSection_artwork } from "__generated__/CreateArtworkAlertButtonsSection_artwork.graphql" +import { CreateArtworkAlertButtonsSection_artwork$data } from "__generated__/CreateArtworkAlertButtonsSection_artwork.graphql" import { CreateSavedSearchModal } from "app/Components/Artist/ArtistArtworks/CreateSavedSearchModal" import { Aggregations } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { @@ -22,7 +22,7 @@ import { useTracking } from "react-tracking" import { InquiryButtonsFragmentContainer } from "./CommercialButtons/InquiryButtons" export interface CreateArtworkAlertButtonsSectionProps { - artwork: CreateArtworkAlertButtonsSection_artwork + artwork: CreateArtworkAlertButtonsSection_artwork$data // FIXME:- state manager can return a string different from AuctionTimerState // Check CountdownTimer.tsx auctionState?: AuctionTimerState | string diff --git a/src/app/Scenes/Artwork/Components/CreateArtworkAlertSection.tsx b/src/app/Scenes/Artwork/Components/CreateArtworkAlertSection.tsx index b9726ea35d2..36d4728c093 100644 --- a/src/app/Scenes/Artwork/Components/CreateArtworkAlertSection.tsx +++ b/src/app/Scenes/Artwork/Components/CreateArtworkAlertSection.tsx @@ -5,7 +5,7 @@ import { ScreenOwnerType, TappedCreateAlert, } from "@artsy/cohesion" -import { CreateArtworkAlertSection_artwork } from "__generated__/CreateArtworkAlertSection_artwork.graphql" +import { CreateArtworkAlertSection_artwork$data } from "__generated__/CreateArtworkAlertSection_artwork.graphql" import { CreateSavedSearchModal } from "app/Components/Artist/ArtistArtworks/CreateSavedSearchModal" import { Aggregations } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { @@ -20,7 +20,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface CreateArtworkAlertSectionProps { - artwork: CreateArtworkAlertSection_artwork | null + artwork: CreateArtworkAlertSection_artwork$data | null } export const CreateArtworkAlertSection: FC = ({ artwork }) => { diff --git a/src/app/Scenes/Artwork/Components/FollowArtistLink.tests.tsx b/src/app/Scenes/Artwork/Components/FollowArtistLink.tests.tsx index 50cbb920de7..3f6166191b5 100644 --- a/src/app/Scenes/Artwork/Components/FollowArtistLink.tests.tsx +++ b/src/app/Scenes/Artwork/Components/FollowArtistLink.tests.tsx @@ -1,5 +1,4 @@ -import { FollowArtistLinkTestsErrorQueryRawResponse } from "__generated__/FollowArtistLinkTestsErrorQuery.graphql" -import { FollowArtistLinkTestsQueryRawResponse } from "__generated__/FollowArtistLinkTestsQuery.graphql" +import { FollowArtistLinkTestsQuery$data } from "__generated__/FollowArtistLinkTestsQuery.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" import { renderRelayTree } from "app/tests/renderRelayTree" @@ -51,7 +50,7 @@ describe("FollowArtistLink", () => { } } `, - mockData: { artist: mockArtistData } as FollowArtistLinkTestsQueryRawResponse, + mockData: { artist: mockArtistData } as FollowArtistLinkTestsQuery$data, mockMutationResults: { followArtist: mockFollowResults }, }) } @@ -117,7 +116,9 @@ describe("FollowArtistLink", () => { } } `, - mockData: { artist: followArtistLinkArtist } as FollowArtistLinkTestsErrorQueryRawResponse, + mockData: { + artist: followArtistLinkArtist, + } as any, mockMutationResults: { FollowArtistLinkFragmentContainer: () => { return Promise.reject(new Error("failed to fetch")) diff --git a/src/app/Scenes/Artwork/Components/FollowArtistLink.tsx b/src/app/Scenes/Artwork/Components/FollowArtistLink.tsx index 3921e5806df..bc4b69b4619 100644 --- a/src/app/Scenes/Artwork/Components/FollowArtistLink.tsx +++ b/src/app/Scenes/Artwork/Components/FollowArtistLink.tsx @@ -1,4 +1,4 @@ -import { FollowArtistLink_artist } from "__generated__/FollowArtistLink_artist.graphql" +import { FollowArtistLink_artist$data } from "__generated__/FollowArtistLink_artist.graphql" import { FollowArtistLinkMutation } from "__generated__/FollowArtistLinkMutation.graphql" import { Schema, track } from "app/utils/track" import { Sans, Touchable } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" interface Props { - artist: FollowArtistLink_artist + artist: FollowArtistLink_artist$data relay: RelayProp contextModule?: string } diff --git a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tests.tsx b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tests.tsx index 440ad8102bc..f23f6999864 100644 --- a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tests.tsx +++ b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tests.tsx @@ -1,4 +1,4 @@ -import { ImageCarouselTestsQueryRawResponse } from "__generated__/ImageCarouselTestsQuery.graphql" +import { ImageCarouselTestsQuery } from "__generated__/ImageCarouselTestsQuery.graphql" import { renderRelayTree } from "app/tests/renderRelayTree" import { renderWithWrappers } from "app/tests/renderWithWrappers" import React from "react" @@ -18,7 +18,7 @@ jest.unmock("react-relay") const deepZoomFixture: NonNullable< NonNullable< - NonNullable["images"]>[0] + NonNullable["images"]>[0] >["deepZoom"] > = { image: { @@ -32,7 +32,7 @@ const deepZoomFixture: NonNullable< }, } -const artworkFixture: ImageCarouselTestsQueryRawResponse["artwork"] = { +const artworkFixture: ImageCarouselTestsQuery["rawResponse"]["artwork"] = { id: "artwork-id", images: [ { @@ -111,7 +111,7 @@ describe("ImageCarouselFragmentContainer", () => { `, mockData: { artwork, - }, // Enable/fix this when making large change to these components/fixtures: as ImageCarouselTestsQueryRawResponse, + }, // Enable/fix this when making large change to these components/fixtures: as ImageCarouselTestsQuery, }) } // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ diff --git a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tsx b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tsx index 080adcc8b68..7fe149fcc49 100644 --- a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tsx +++ b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarousel.tsx @@ -1,5 +1,5 @@ import { captureMessage } from "@sentry/react-native" -import { ImageCarousel_images } from "__generated__/ImageCarousel_images.graphql" +import { ImageCarousel_images$data } from "__generated__/ImageCarousel_images.graphql" import { createGeminiUrl } from "app/Components/OpaqueImageView/createGeminiUrl" import { isPad } from "app/utils/hardware" import { Flex } from "palette" @@ -28,7 +28,7 @@ interface MappedImageDescriptor extends Pick { export interface ImageCarouselProps { /** CarouselImageDescriptor for when you want to display local images */ - images: ImageCarousel_images | CarouselImageDescriptor[] + images: ImageCarousel_images$data | CarouselImageDescriptor[] cardHeight: number onImageIndexChange?: (imageIndex: number) => void paginationIndicatorType?: IndicatorType @@ -169,6 +169,6 @@ function getBestImageVersionForThumbnail(imageVersions: readonly string[]) { return "normalized" } -const imageHasVersions = (image: CarouselImageDescriptor | ImageCarousel_images[number]) => { +const imageHasVersions = (image: CarouselImageDescriptor | ImageCarousel_images$data[number]) => { return image.imageVersions && image.imageVersions.length } diff --git a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarouselContext.tsx b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarouselContext.tsx index fa267fe2fb1..64e3446f71e 100644 --- a/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarouselContext.tsx +++ b/src/app/Scenes/Artwork/Components/ImageCarousel/ImageCarouselContext.tsx @@ -1,4 +1,4 @@ -import { ImageCarousel_images } from "__generated__/ImageCarousel_images.graphql" +import { ImageCarousel_images$data } from "__generated__/ImageCarousel_images.graphql" import { Schema } from "app/utils/track" import React, { useMemo, useRef } from "react" import { Animated, FlatList, View } from "react-native" @@ -6,7 +6,7 @@ import { useTracking } from "react-tracking" import { GlobalState, useGlobalState } from "../../../../utils/useGlobalState" export type ImageDescriptor = Pick< - ImageCarousel_images[number], + ImageCarousel_images$data[number], "deepZoom" | "height" | "width" | "url" > diff --git a/src/app/Scenes/Artwork/Components/OtherWorks/OtherWorks.tsx b/src/app/Scenes/Artwork/Components/OtherWorks/OtherWorks.tsx index 9bfb0de5c96..1f89e6a9af0 100644 --- a/src/app/Scenes/Artwork/Components/OtherWorks/OtherWorks.tsx +++ b/src/app/Scenes/Artwork/Components/OtherWorks/OtherWorks.tsx @@ -1,5 +1,5 @@ -import { Artwork_artworkBelowTheFold } from "__generated__/Artwork_artworkBelowTheFold.graphql" -import { OtherWorks_artwork } from "__generated__/OtherWorks_artwork.graphql" +import { Artwork_artworkBelowTheFold$data } from "__generated__/Artwork_artworkBelowTheFold.graphql" +import { OtherWorks_artwork$data } from "__generated__/OtherWorks_artwork.graphql" import GenericGrid from "app/Components/ArtworkGrids/GenericGrid" import { extractNodes } from "app/utils/extractNodes" import { Schema } from "app/utils/track" @@ -10,8 +10,10 @@ import { createFragmentContainer, graphql } from "react-relay" import { ContextGridCTA } from "./ContextGridCTA" import { Header } from "./Header" -type OtherWorksGrid = NonNullable[number]> -type ArtworkGrid = NonNullable[number]> +type OtherWorksGrid = NonNullable[number]> +type ArtworkGrid = NonNullable< + NonNullable[number] +> type Grid = OtherWorksGrid | ArtworkGrid export const populatedGrids = (grids?: ReadonlyArray | null) => { @@ -22,7 +24,9 @@ export const populatedGrids = (grids?: ReadonlyArray | null) => { } } -export const OtherWorksFragmentContainer = createFragmentContainer<{ artwork: OtherWorks_artwork }>( +export const OtherWorksFragmentContainer = createFragmentContainer<{ + artwork: OtherWorks_artwork$data +}>( (props) => { const grids = props.artwork.contextGrids const gridsToShow = populatedGrids(grids) as ReadonlyArray diff --git a/src/app/Scenes/Artwork/Components/PartnerCard.tests.tsx b/src/app/Scenes/Artwork/Components/PartnerCard.tests.tsx index 0bfb98b5ca7..fdeb2afc6f2 100644 --- a/src/app/Scenes/Artwork/Components/PartnerCard.tests.tsx +++ b/src/app/Scenes/Artwork/Components/PartnerCard.tests.tsx @@ -1,5 +1,5 @@ -import { PartnerCard_artwork } from "__generated__/PartnerCard_artwork.graphql" -import { PartnerCardTestsQueryRawResponse } from "__generated__/PartnerCardTestsQuery.graphql" +import { PartnerCard_artwork$data } from "__generated__/PartnerCard_artwork.graphql" +import { PartnerCardTestsQuery$data } from "__generated__/PartnerCardTestsQuery.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" import { renderRelayTree } from "app/tests/renderRelayTree" @@ -145,7 +145,7 @@ describe("PartnerCard", () => { }) it("does not render when the partner is an auction house", () => { - const PartnerCardArtworkAuctionHouse: PartnerCard_artwork = { + const PartnerCardArtworkAuctionHouse: PartnerCard_artwork$data = { ...PartnerCardArtwork, partner: { ...PartnerCardArtwork.partner!, @@ -224,7 +224,7 @@ describe("PartnerCard", () => { } } `, - mockData: { artwork: mockArtworkData } as PartnerCardTestsQueryRawResponse, + mockData: { artwork: mockArtworkData } as PartnerCardTestsQuery$data, mockMutationResults: { followProfile: mockFollowResults }, }) } @@ -302,7 +302,7 @@ describe("PartnerCard", () => { } } `, - mockData: { artwork: PartnerCardArtwork }, // Enable/fix this when making large change to these components/fixtures: as PartnerCardTestsErrorQueryRawResponse, + mockData: { artwork: PartnerCardArtwork }, // Enable/fix this when making large change to these components/fixtures: as PartnerCardTestsErrorQuery, mockMutationResults: { PartnerCardFragmentContainer: () => { return Promise.reject(new Error("failed to fetch")) @@ -324,7 +324,7 @@ describe("PartnerCard", () => { }) }) -const PartnerCardArtwork: PartnerCard_artwork = { +const PartnerCardArtwork: PartnerCard_artwork$data = { sale: { isBenefit: false, isGalleryAuction: false, @@ -347,5 +347,5 @@ const PartnerCardArtwork: PartnerCard_artwork = { }, cities: ["Miami", "New York", "Hong Kong", "London", "Boston"], }, - " $refType": null as any, + " $fragmentType": "PartnerCard_artwork", } diff --git a/src/app/Scenes/Artwork/Components/PartnerCard.tsx b/src/app/Scenes/Artwork/Components/PartnerCard.tsx index 4a5d185584d..82f6050db49 100644 --- a/src/app/Scenes/Artwork/Components/PartnerCard.tsx +++ b/src/app/Scenes/Artwork/Components/PartnerCard.tsx @@ -1,4 +1,4 @@ -import { PartnerCard_artwork } from "__generated__/PartnerCard_artwork.graphql" +import { PartnerCard_artwork$data } from "__generated__/PartnerCard_artwork.graphql" import { PartnerCardFollowMutation } from "__generated__/PartnerCardFollowMutation.graphql" import { navigateToPartner } from "app/navigation/navigate" import { get } from "app/utils/get" @@ -10,7 +10,7 @@ import { TouchableWithoutFeedback } from "react-native" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" interface Props { - artwork: PartnerCard_artwork + artwork: PartnerCard_artwork$data relay: RelayProp } diff --git a/src/app/Scenes/Artwork/Components/RequestConditionReport-analytics.tests.tsx b/src/app/Scenes/Artwork/Components/RequestConditionReport-analytics.tests.tsx index a0bafa2c667..4f11eb105c9 100644 --- a/src/app/Scenes/Artwork/Components/RequestConditionReport-analytics.tests.tsx +++ b/src/app/Scenes/Artwork/Components/RequestConditionReport-analytics.tests.tsx @@ -1,5 +1,5 @@ -import { RequestConditionReport_artwork } from "__generated__/RequestConditionReport_artwork.graphql" -import { RequestConditionReport_me } from "__generated__/RequestConditionReport_me.graphql" +import { RequestConditionReport_artwork$data } from "__generated__/RequestConditionReport_artwork.graphql" +import { RequestConditionReport_me$data } from "__generated__/RequestConditionReport_me.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" import { mockTracking } from "app/tests/mockTracking" @@ -12,7 +12,7 @@ import { RequestConditionReport } from "./RequestConditionReport" jest.unmock("react-tracking") -const artwork: RequestConditionReport_artwork = { +const artwork: RequestConditionReport_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, internalID: "some-internal-id", @@ -21,7 +21,7 @@ const artwork: RequestConditionReport_artwork = { internalID: "some-sale-internal-id", }, } -const me: RequestConditionReport_me = { +const me: RequestConditionReport_me$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, email: "someemail@testerino.net", diff --git a/src/app/Scenes/Artwork/Components/RequestConditionReport.tests.tsx b/src/app/Scenes/Artwork/Components/RequestConditionReport.tests.tsx index feff00d83f6..68902bc5051 100644 --- a/src/app/Scenes/Artwork/Components/RequestConditionReport.tests.tsx +++ b/src/app/Scenes/Artwork/Components/RequestConditionReport.tests.tsx @@ -1,5 +1,5 @@ -import { RequestConditionReport_artwork } from "__generated__/RequestConditionReport_artwork.graphql" -import { RequestConditionReport_me } from "__generated__/RequestConditionReport_me.graphql" +import { RequestConditionReport_artwork$data } from "__generated__/RequestConditionReport_artwork.graphql" +import { RequestConditionReport_me$data } from "__generated__/RequestConditionReport_me.graphql" import { Modal } from "app/Components/Modal" import { GlobalStoreProvider } from "app/store/GlobalStore" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" @@ -9,7 +9,7 @@ import { Button, Theme } from "palette" import React from "react" import { RequestConditionReport } from "./RequestConditionReport" -const artwork: RequestConditionReport_artwork = { +const artwork: RequestConditionReport_artwork$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, internalID: "some-internal-id", @@ -18,7 +18,7 @@ const artwork: RequestConditionReport_artwork = { internalID: "some-sale-internal-id", }, } -const me: RequestConditionReport_me = { +const me: RequestConditionReport_me$data = { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ " $refType": null, email: "someemail@testerino.net", diff --git a/src/app/Scenes/Artwork/Components/RequestConditionReport.tsx b/src/app/Scenes/Artwork/Components/RequestConditionReport.tsx index 22990e831ca..ed5795e7362 100644 --- a/src/app/Scenes/Artwork/Components/RequestConditionReport.tsx +++ b/src/app/Scenes/Artwork/Components/RequestConditionReport.tsx @@ -1,9 +1,6 @@ -import { RequestConditionReport_artwork } from "__generated__/RequestConditionReport_artwork.graphql" -import { RequestConditionReport_me } from "__generated__/RequestConditionReport_me.graphql" -import { - RequestConditionReportMutation, - RequestConditionReportMutationResponse, -} from "__generated__/RequestConditionReportMutation.graphql" +import { RequestConditionReport_artwork$data } from "__generated__/RequestConditionReport_artwork.graphql" +import { RequestConditionReport_me$data } from "__generated__/RequestConditionReport_me.graphql" +import { RequestConditionReportMutation } from "__generated__/RequestConditionReportMutation.graphql" import { RequestConditionReportQuery } from "__generated__/RequestConditionReportQuery.graphql" import { Modal } from "app/Components/Modal" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -21,8 +18,8 @@ import { import { PayloadError } from "relay-runtime" interface RequestConditionReportProps { - artwork: RequestConditionReport_artwork - me: RequestConditionReport_me + artwork: RequestConditionReport_artwork$data + me: RequestConditionReport_me$data relay: RelayProp } @@ -47,7 +44,7 @@ export class RequestConditionReport extends Component { const { artwork, relay } = this.props - return new Promise(async (resolve, reject) => { + return new Promise(async (resolve, reject) => { commitMutation(relay.environment, { onCompleted: resolve, onError: reject, diff --git a/src/app/Scenes/ArtworkAttributionClassFAQ/ArtworkAttributionClassFAQ.tsx b/src/app/Scenes/ArtworkAttributionClassFAQ/ArtworkAttributionClassFAQ.tsx index 07be59bd5af..982f4592ae0 100644 --- a/src/app/Scenes/ArtworkAttributionClassFAQ/ArtworkAttributionClassFAQ.tsx +++ b/src/app/Scenes/ArtworkAttributionClassFAQ/ArtworkAttributionClassFAQ.tsx @@ -1,4 +1,4 @@ -import { ArtworkAttributionClassFAQ_artworkAttributionClasses } from "__generated__/ArtworkAttributionClassFAQ_artworkAttributionClasses.graphql" +import { ArtworkAttributionClassFAQ_artworkAttributionClasses$data } from "__generated__/ArtworkAttributionClassFAQ_artworkAttributionClasses.graphql" import { ArtworkAttributionClassFAQQuery } from "__generated__/ArtworkAttributionClassFAQQuery.graphql" import { goBack } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" import { useScreenDimensions } from "shared/hooks" interface Props { - artworkAttributionClasses: ArtworkAttributionClassFAQ_artworkAttributionClasses + artworkAttributionClasses: ArtworkAttributionClassFAQ_artworkAttributionClasses$data } export const ArtworkAttributionClassFAQ: React.FC = ({ artworkAttributionClasses }) => { diff --git a/src/app/Scenes/ArtworkMedium/ArtworkMedium.tsx b/src/app/Scenes/ArtworkMedium/ArtworkMedium.tsx index 81f0833bdb1..02486c5221c 100644 --- a/src/app/Scenes/ArtworkMedium/ArtworkMedium.tsx +++ b/src/app/Scenes/ArtworkMedium/ArtworkMedium.tsx @@ -1,4 +1,4 @@ -import { ArtworkMedium_artwork } from "__generated__/ArtworkMedium_artwork.graphql" +import { ArtworkMedium_artwork$data } from "__generated__/ArtworkMedium_artwork.graphql" import { ArtworkMediumQuery } from "__generated__/ArtworkMediumQuery.graphql" import { goBack } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" import { useScreenDimensions } from "shared/hooks" interface Props { - artwork: ArtworkMedium_artwork + artwork: ArtworkMedium_artwork$data } export const ArtworkMedium: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/AuctionBuyersPremium/AuctionBuyersPremium.tsx b/src/app/Scenes/AuctionBuyersPremium/AuctionBuyersPremium.tsx index cdb7d58c3a9..69eb11469e7 100644 --- a/src/app/Scenes/AuctionBuyersPremium/AuctionBuyersPremium.tsx +++ b/src/app/Scenes/AuctionBuyersPremium/AuctionBuyersPremium.tsx @@ -1,4 +1,4 @@ -import { AuctionBuyersPremium_sale } from "__generated__/AuctionBuyersPremium_sale.graphql" +import { AuctionBuyersPremium_sale$data } from "__generated__/AuctionBuyersPremium_sale.graphql" import { AuctionBuyersPremiumQuery } from "__generated__/AuctionBuyersPremiumQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { goBack } from "app/navigation/navigate" @@ -12,7 +12,7 @@ import { ScrollView } from "react-native" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" interface AuctionBuyersPremiumProps { - sale: AuctionBuyersPremium_sale + sale: AuctionBuyersPremium_sale$data } interface AuctionBuyersPremiumQueryRendererProps { diff --git a/src/app/Scenes/AuctionResult/AuctionResult.tsx b/src/app/Scenes/AuctionResult/AuctionResult.tsx index 0c5722e215e..7514ea1c2c1 100644 --- a/src/app/Scenes/AuctionResult/AuctionResult.tsx +++ b/src/app/Scenes/AuctionResult/AuctionResult.tsx @@ -1,6 +1,6 @@ import { ActionType, ContextModule, OwnerType, TappedInfoBubble } from "@artsy/cohesion" -import { AuctionResult_artist } from "__generated__/AuctionResult_artist.graphql" -import { AuctionResult_auctionResult } from "__generated__/AuctionResult_auctionResult.graphql" +import { AuctionResult_artist$data } from "__generated__/AuctionResult_artist.graphql" +import { AuctionResult_auctionResult$data } from "__generated__/AuctionResult_auctionResult.graphql" import { AuctionResultQuery } from "__generated__/AuctionResultQuery.graphql" import { AuctionResultsMidEstimate } from "app/Components/AuctionResult/AuctionResultMidEstimate" import { InfoButton } from "app/Components/Buttons/InfoButton" @@ -27,8 +27,8 @@ import { auctionResultHasPrice, AuctionResultHelperData, auctionResultText } fro const CONTAINER_HEIGHT = 80 interface Props { - artist: AuctionResult_artist - auctionResult: AuctionResult_auctionResult + artist: AuctionResult_artist$data + auctionResult: AuctionResult_auctionResult$data } export const AuctionResult: React.FC = ({ artist, auctionResult }) => { diff --git a/src/app/Scenes/AuctionResult/ComparableWorks.tsx b/src/app/Scenes/AuctionResult/ComparableWorks.tsx index d10d2be84a9..74ee15b9c1d 100644 --- a/src/app/Scenes/AuctionResult/ComparableWorks.tsx +++ b/src/app/Scenes/AuctionResult/ComparableWorks.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { ComparableWorks_auctionResult } from "__generated__/ComparableWorks_auctionResult.graphql" +import { ComparableWorks_auctionResult$data } from "__generated__/ComparableWorks_auctionResult.graphql" import { AuctionResultListItemFragmentContainer, AuctionResultListSeparator, @@ -14,7 +14,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface ComparableWorks { - auctionResult: ComparableWorks_auctionResult + auctionResult: ComparableWorks_auctionResult$data } const ComparableWorks: React.FC = ({ auctionResult }) => { const { trackEvent } = useTracking() diff --git a/src/app/Scenes/AuctionResult/helpers.ts b/src/app/Scenes/AuctionResult/helpers.ts index 9984ffcfe43..111e723d415 100644 --- a/src/app/Scenes/AuctionResult/helpers.ts +++ b/src/app/Scenes/AuctionResult/helpers.ts @@ -1,10 +1,10 @@ -import { AuctionResultListItem_auctionResult } from "__generated__/AuctionResultListItem_auctionResult.graphql" +import { AuctionResultListItem_auctionResult$data } from "__generated__/AuctionResultListItem_auctionResult.graphql" import moment from "moment" type AuctionResultHelperNeededData = "currency" | "boughtIn" | "priceRealized" | "saleDate" // This type just mirrors the types that come back from metaphysics. export type AuctionResultHelperData = Pick< - AuctionResultListItem_auctionResult, + AuctionResultListItem_auctionResult$data, AuctionResultHelperNeededData > diff --git a/src/app/Scenes/AuctionResultsForArtistsYouFollow/AuctionResultsForArtistsYouFollow.tsx b/src/app/Scenes/AuctionResultsForArtistsYouFollow/AuctionResultsForArtistsYouFollow.tsx index 73d3534f961..abba6c65768 100644 --- a/src/app/Scenes/AuctionResultsForArtistsYouFollow/AuctionResultsForArtistsYouFollow.tsx +++ b/src/app/Scenes/AuctionResultsForArtistsYouFollow/AuctionResultsForArtistsYouFollow.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { AuctionResultsForArtistsYouFollow_me } from "__generated__/AuctionResultsForArtistsYouFollow_me.graphql" +import { AuctionResultsForArtistsYouFollow_me$data } from "__generated__/AuctionResultsForArtistsYouFollow_me.graphql" import { AuctionResultsForArtistsYouFollowContainerQuery } from "__generated__/AuctionResultsForArtistsYouFollowContainerQuery.graphql" import { ArtworkFiltersStoreProvider } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { AuctionResultsList, LoadingSkeleton } from "app/Components/AuctionResultsList" @@ -15,7 +15,7 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp import { useTracking } from "react-tracking" interface Props { - me: AuctionResultsForArtistsYouFollow_me | null + me: AuctionResultsForArtistsYouFollow_me$data | null relay: RelayPaginationProp } diff --git a/src/app/Scenes/City/City.tsx b/src/app/Scenes/City/City.tsx index 86a28869d50..8931db5bb72 100644 --- a/src/app/Scenes/City/City.tsx +++ b/src/app/Scenes/City/City.tsx @@ -83,7 +83,7 @@ export class CityView extends Component { }, () => { LegacyNativeModules.ARNotificationsManager.postNotificationName( - "ARLocalDiscoveryQueryResponseReceived", + "ARLocalDiscoveryQueryReceived", {} ) } @@ -94,7 +94,7 @@ export class CityView extends Component { // We have a Relay error; post a notification so that the ARMapContainerViewController can finalize the native UI (ie: show the drawer partially). this.setState({ relayErrorState }, () => { LegacyNativeModules.ARNotificationsManager.postNotificationName( - "ARLocalDiscoveryQueryResponseReceived", + "ARLocalDiscoveryQueryReceived", {} ) }) diff --git a/src/app/Scenes/City/CityBMWList.tsx b/src/app/Scenes/City/CityBMWList.tsx index bd66ed9743f..0e202fdef34 100644 --- a/src/app/Scenes/City/CityBMWList.tsx +++ b/src/app/Scenes/City/CityBMWList.tsx @@ -1,5 +1,5 @@ -import { CityBMWList_city } from "__generated__/CityBMWList_city.graphql" -import { CityBMWListQuery, CityBMWListQueryVariables } from "__generated__/CityBMWListQuery.graphql" +import { CityBMWList_city$data } from "__generated__/CityBMWList_city.graphql" +import { CityBMWListQuery } from "__generated__/CityBMWListQuery.graphql" import { PAGE_SIZE } from "app/Components/constants" import { defaultEnvironment } from "app/relay/createEnvironment" import { extractNodes } from "app/utils/extractNodes" @@ -10,8 +10,8 @@ import React from "react" import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp } from "react-relay" import { EventList } from "./Components/EventList" -interface Props extends Pick { - city: CityBMWList_city +interface Props extends Pick { + city: CityBMWList_city$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/City/CityFairList.tsx b/src/app/Scenes/City/CityFairList.tsx index ad1cca9b285..8ab402b52b5 100644 --- a/src/app/Scenes/City/CityFairList.tsx +++ b/src/app/Scenes/City/CityFairList.tsx @@ -1,8 +1,5 @@ -import { CityFairList_city } from "__generated__/CityFairList_city.graphql" -import { - CityFairListQuery, - CityFairListQueryVariables, -} from "__generated__/CityFairListQuery.graphql" +import { CityFairList_city$data } from "__generated__/CityFairList_city.graphql" +import { CityFairListQuery } from "__generated__/CityFairListQuery.graphql" import { PAGE_SIZE } from "app/Components/constants" import Spinner from "app/Components/Spinner" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -15,8 +12,8 @@ import { FlatList } from "react-native" import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp } from "react-relay" import { TabFairItemRow } from "./Components/TabFairItemRow" -interface Props extends Pick { - city: CityFairList_city +interface Props extends Pick { + city: CityFairList_city$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/City/CitySavedList.tsx b/src/app/Scenes/City/CitySavedList.tsx index 1e025ab667c..637e90d1086 100644 --- a/src/app/Scenes/City/CitySavedList.tsx +++ b/src/app/Scenes/City/CitySavedList.tsx @@ -1,5 +1,5 @@ -import { CitySavedList_city } from "__generated__/CitySavedList_city.graphql" -import { CitySavedList_me } from "__generated__/CitySavedList_me.graphql" +import { CitySavedList_city$data } from "__generated__/CitySavedList_city.graphql" +import { CitySavedList_me$data } from "__generated__/CitySavedList_me.graphql" import { CitySavedListQuery } from "__generated__/CitySavedListQuery.graphql" import { PAGE_SIZE } from "app/Components/constants" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -12,8 +12,8 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp import { EventList } from "./Components/EventList" interface Props { - me: CitySavedList_me - city: CitySavedList_city + me: CitySavedList_me$data + city: CitySavedList_city$data relay: RelayPaginationProp citySlug: string } diff --git a/src/app/Scenes/City/CitySectionList.tsx b/src/app/Scenes/City/CitySectionList.tsx index c5a004933d0..e0e7260fd04 100644 --- a/src/app/Scenes/City/CitySectionList.tsx +++ b/src/app/Scenes/City/CitySectionList.tsx @@ -1,7 +1,6 @@ -import { CitySectionList_city } from "__generated__/CitySectionList_city.graphql" +import { CitySectionList_city$data } from "__generated__/CitySectionList_city.graphql" import { CitySectionListQuery, - CitySectionListQueryVariables, EventStatus, PartnerShowPartnerType, ShowSorts, @@ -17,8 +16,8 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp import { BucketKey } from "../Map/bucketCityResults" import { EventList } from "./Components/EventList" -interface Props extends Pick { - city: CitySectionList_city +interface Props extends Pick { + city: CitySectionList_city$data citySlug: string section: BucketKey relay: RelayPaginationProp diff --git a/src/app/Scenes/Collection/Collection.tsx b/src/app/Scenes/Collection/Collection.tsx index 516f06b793b..3713e7ce43a 100644 --- a/src/app/Scenes/Collection/Collection.tsx +++ b/src/app/Scenes/Collection/Collection.tsx @@ -4,9 +4,9 @@ import { defaultEnvironment } from "app/relay/createEnvironment" import renderWithLoadProgress from "app/utils/renderWithLoadProgress" import { Box, Spacer } from "palette" import React, { Component, createRef } from "react" -import { Animated, Dimensions, FlatList, View } from "react-native" +import { Animated, FlatList, View } from "react-native" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" -import { Collection_collection } from "../../../__generated__/Collection_collection.graphql" +import { Collection_collection$data } from "../../../__generated__/Collection_collection.graphql" import { CollectionArtworksFilterFragmentContainer as CollectionArtworksFilter } from "../../../app/Scenes/Collection/Components/CollectionArtworksFilter" import { CollectionArtworksFragmentContainer as CollectionArtworks } from "../../../app/Scenes/Collection/Screens/CollectionArtworks" import { CollectionHeaderContainer as CollectionHeader } from "../../../app/Scenes/Collection/Screens/CollectionHeader" @@ -15,7 +15,7 @@ import { CollectionsHubRailsContainer as CollectionHubsRails } from "./Component import { CollectionFeaturedArtistsContainer as CollectionFeaturedArtists } from "./Components/FeaturedArtists" interface CollectionProps { - collection: Collection_collection + collection: Collection_collection$data } @screenTrack((props: CollectionProps) => ({ @@ -103,8 +103,7 @@ export class Collection extends Component { export const CollectionContainer = createFragmentContainer(Collection, { collection: graphql` - fragment Collection_collection on MarketingCollection - @argumentDefinitions(screenWidth: { type: "Int", defaultValue: 500 }) { + fragment Collection_collection on MarketingCollection { id slug isDepartment @@ -131,15 +130,14 @@ export const CollectionQueryRenderer: React.FC = ( environment={defaultEnvironment} query={graphql` - query CollectionQuery($collectionID: String!, $screenWidth: Int) { + query CollectionQuery($collectionID: String!) { collection: marketingCollection(slug: $collectionID) { - ...Collection_collection @arguments(screenWidth: $screenWidth) + ...Collection_collection } } `} variables={{ collectionID, - screenWidth: Dimensions.get("screen").width, }} cacheConfig={{ // Bypass Relay cache on retries. diff --git a/src/app/Scenes/Collection/Components/CollectionArtworksFilter.tsx b/src/app/Scenes/Collection/Components/CollectionArtworksFilter.tsx index b962d5ff384..034929ef06e 100644 --- a/src/app/Scenes/Collection/Components/CollectionArtworksFilter.tsx +++ b/src/app/Scenes/Collection/Components/CollectionArtworksFilter.tsx @@ -1,4 +1,4 @@ -import { CollectionArtworks_collection } from "__generated__/CollectionArtworks_collection.graphql" +import { CollectionArtworks_collection$data } from "__generated__/CollectionArtworks_collection.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { HeaderArtworksFilterWithTotalArtworks as HeaderArtworksFilter } from "app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks" import { Schema } from "app/utils/track" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface FilterProps { - collection: CollectionArtworks_collection + collection: CollectionArtworks_collection$data animationValue: Animated.Value } @@ -64,8 +64,7 @@ export const CollectionArtworksFilterFragmentContainer = createFragmentContainer CollectionArtworksFilter, { collection: graphql` - fragment CollectionArtworksFilter_collection on MarketingCollection - @argumentDefinitions(input: { type: "FilterArtworksInput" }) { + fragment CollectionArtworksFilter_collection on MarketingCollection { slug id } diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tests.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tests.tsx index b7c5d82b2ef..07ae43df08a 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tests.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tests.tsx @@ -3,10 +3,7 @@ import { graphql, QueryRenderer } from "react-relay" import { act } from "react-test-renderer" import { createMockEnvironment } from "relay-test-utils" -import { - CollectionArtistSeriesRailTestsQuery, - CollectionArtistSeriesRailTestsQueryRawResponse, -} from "__generated__/CollectionArtistSeriesRailTestsQuery.graphql" +import { CollectionArtistSeriesRailTestsQuery } from "__generated__/CollectionArtistSeriesRailTestsQuery.graphql" import { GenericArtistSeriesMeta, GenericArtistSeriesRail, @@ -240,7 +237,7 @@ describe("Artist Series Rail", () => { }) }) -const CollectionHubRailsArtistSeriesFixture: CollectionArtistSeriesRailTestsQueryRawResponse = { +const CollectionHubRailsArtistSeriesFixture: CollectionArtistSeriesRailTestsQuery["rawResponse"] = { marketingCollection: { id: "collection0", slug: "cool-collection", diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tsx index 01cbac3cc63..77552fc0680 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail.tsx @@ -1,5 +1,4 @@ -import { CollectionArtistSeriesRail_collection } from "__generated__/CollectionArtistSeriesRail_collection.graphql" -import { CollectionArtistSeriesRail_collectionGroup } from "__generated__/CollectionArtistSeriesRail_collectionGroup.graphql" +import { CollectionArtistSeriesRail_collection$data } from "__generated__/CollectionArtistSeriesRail_collection.graphql" import { GenericArtistSeriesRail } from "app/Components/GenericArtistSeriesRail" import { Schema } from "app/utils/track" import { Flex, Sans } from "palette" @@ -8,9 +7,11 @@ import { createFragmentContainer, graphql } from "react-relay" // @ts-ignore import styled from "styled-components/native" +import { CollectionArtistSeriesRail_collectionGroup$data } from "__generated__/CollectionArtistSeriesRail_collectionGroup.graphql" + interface CollectionArtistSeriesRailProps { - collectionGroup: CollectionArtistSeriesRail_collectionGroup - collection: CollectionArtistSeriesRail_collection + collectionGroup: CollectionArtistSeriesRail_collectionGroup$data + collection: CollectionArtistSeriesRail_collection$data } export const CollectionArtistSeriesRail: React.FC = (props) => { diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tests.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tests.tsx index cb080afb754..349edaad582 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tests.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tests.tsx @@ -1,7 +1,4 @@ -import { - FeaturedCollectionsRailTestsQuery, - FeaturedCollectionsRailTestsQueryRawResponse, -} from "__generated__/FeaturedCollectionsRailTestsQuery.graphql" +import { FeaturedCollectionsRailTestsQuery } from "__generated__/FeaturedCollectionsRailTestsQuery.graphql" import { navigate } from "app/navigation/navigate" import { FeaturedCollectionsRail, @@ -150,7 +147,7 @@ describe("Featured Collections Rail", () => { }) }) -const FeaturedCollectionsFixture: FeaturedCollectionsRailTestsQueryRawResponse = { +const FeaturedCollectionsFixture: FeaturedCollectionsRailTestsQuery["rawResponse"] = { marketingCollection: { id: "hub-collection", slug: "hub-collection-slug", diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tsx index 0bda1f4fcbb..385c3431aac 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail.tsx @@ -1,6 +1,6 @@ import { themeGet } from "@styled-system/theme-get" -import { FeaturedCollectionsRail_collection } from "__generated__/FeaturedCollectionsRail_collection.graphql" -import { FeaturedCollectionsRail_collectionGroup } from "__generated__/FeaturedCollectionsRail_collectionGroup.graphql" +import { FeaturedCollectionsRail_collection$data } from "__generated__/FeaturedCollectionsRail_collection.graphql" +import { FeaturedCollectionsRail_collectionGroup$data } from "__generated__/FeaturedCollectionsRail_collectionGroup.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" @@ -14,11 +14,11 @@ import { useTracking } from "react-tracking" import styled from "styled-components/native" interface FeaturedCollectionsRailProps { - collectionGroup: FeaturedCollectionsRail_collectionGroup - collection: FeaturedCollectionsRail_collection + collectionGroup: FeaturedCollectionsRail_collectionGroup$data + collection: FeaturedCollectionsRail_collection$data } -type FeaturedCollection = FeaturedCollectionsRail_collectionGroup["members"][0] +type FeaturedCollection = FeaturedCollectionsRail_collectionGroup$data["members"][0] export const FeaturedCollectionsRail: React.FC = (props) => { const color = useColor() diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/OtherCollections/OtherCollectionsRail.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/OtherCollections/OtherCollectionsRail.tsx index fdeebd00226..d40b5ebab96 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/OtherCollections/OtherCollectionsRail.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/OtherCollections/OtherCollectionsRail.tsx @@ -1,4 +1,4 @@ -import { OtherCollectionsRail_collectionGroup } from "__generated__/OtherCollectionsRail_collectionGroup.graphql" +import { OtherCollectionsRail_collectionGroup$data } from "__generated__/OtherCollectionsRail_collectionGroup.graphql" import { CardRailFlatList } from "app/Components/Home/CardRailFlatList" import { navigate } from "app/navigation/navigate" import { Sans, SansProps, Spacer } from "palette" @@ -7,7 +7,7 @@ import { TouchableOpacity, View } from "react-native" import { createFragmentContainer, graphql } from "react-relay" export interface OtherCollectionsRailProps { - collectionGroup: OtherCollectionsRail_collectionGroup + collectionGroup: OtherCollectionsRail_collectionGroup$data } export const CollectionGroupMemberPill: React.FC> = (props) => ( diff --git a/src/app/Scenes/Collection/Components/CollectionHubsRails/index.tsx b/src/app/Scenes/Collection/Components/CollectionHubsRails/index.tsx index 361ccc6dec4..8020abe53a5 100644 --- a/src/app/Scenes/Collection/Components/CollectionHubsRails/index.tsx +++ b/src/app/Scenes/Collection/Components/CollectionHubsRails/index.tsx @@ -1,5 +1,5 @@ -import { CollectionHubsRails_collection } from "__generated__/CollectionHubsRails_collection.graphql" -import { CollectionHubsRails_linkedCollections } from "__generated__/CollectionHubsRails_linkedCollections.graphql" +import { CollectionHubsRails_collection$data } from "__generated__/CollectionHubsRails_collection.graphql" +import { CollectionHubsRails_linkedCollections$data } from "__generated__/CollectionHubsRails_linkedCollections.graphql" import { CollectionArtistSeriesRailContainer as TrendingArtistSeriesRail } from "app/Scenes/Collection/Components/CollectionHubsRails/ArtistSeries/CollectionArtistSeriesRail" import { FeaturedCollectionsRailContainer as FeaturedCollectionsRail } from "app/Scenes/Collection/Components/CollectionHubsRails/FeaturedCollections/FeaturedCollectionsRail" import { Box } from "palette" @@ -8,8 +8,8 @@ import { createFragmentContainer, graphql } from "react-relay" import { OtherCollectionsRailContainer as OtherCollectionsRail } from "./OtherCollections/OtherCollectionsRail" interface CollectionsHubRailsProps { - linkedCollections: CollectionHubsRails_linkedCollections - collection: CollectionHubsRails_collection + linkedCollections: CollectionHubsRails_linkedCollections$data + collection: CollectionHubsRails_collection$data } export const CollectionsHubRails: React.FC = (props) => { diff --git a/src/app/Scenes/Collection/Components/FeaturedArtists.tests.tsx b/src/app/Scenes/Collection/Components/FeaturedArtists.tests.tsx index 7844b4a565b..b24da5f8055 100644 --- a/src/app/Scenes/Collection/Components/FeaturedArtists.tests.tsx +++ b/src/app/Scenes/Collection/Components/FeaturedArtists.tests.tsx @@ -1,4 +1,4 @@ -import { FeaturedArtistsTestsQueryRawResponse } from "__generated__/FeaturedArtistsTestsQuery.graphql" +import { FeaturedArtistsTestsQuery } from "__generated__/FeaturedArtistsTestsQuery.graphql" import { navigate } from "app/navigation/navigate" import { GlobalStoreProvider } from "app/store/GlobalStore" import { mockTracking } from "app/tests/mockTracking" @@ -11,7 +11,7 @@ import { CollectionFeaturedArtistsContainer as FeaturedArtists, ViewAll } from " jest.unmock("react-relay") jest.unmock("react-tracking") -const FeaturedArtistCollectionFixture: FeaturedArtistsTestsQueryRawResponse["marketingCollection"] = +const FeaturedArtistCollectionFixture: FeaturedArtistsTestsQuery["rawResponse"]["marketingCollection"] = { id: "some-id", slug: "some-collection", @@ -103,7 +103,7 @@ const FeaturedArtistCollectionFixture: FeaturedArtistsTestsQueryRawResponse["mar } describe("FeaturedArtists", () => { - const render = (collection: FeaturedArtistsTestsQueryRawResponse["marketingCollection"]) => + const render = (collection: FeaturedArtistsTestsQuery["rawResponse"]["marketingCollection"]) => renderRelayTree({ Component: mockTracking(({ marketingCollection }) => ( diff --git a/src/app/Scenes/Collection/Components/FeaturedArtists.tsx b/src/app/Scenes/Collection/Components/FeaturedArtists.tsx index 79eefd6bb15..ab7958191ef 100644 --- a/src/app/Scenes/Collection/Components/FeaturedArtists.tsx +++ b/src/app/Scenes/Collection/Components/FeaturedArtists.tsx @@ -1,4 +1,4 @@ -import { FeaturedArtists_collection } from "__generated__/FeaturedArtists_collection.graphql" +import { FeaturedArtists_collection$data } from "__generated__/FeaturedArtists_collection.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { navigate } from "app/navigation/navigate" import { Schema, Track, track as _track } from "app/utils/track" @@ -11,7 +11,7 @@ import { TrackingProp } from "react-tracking" import styled from "styled-components/native" interface FeaturedArtistsProps { - collection: FeaturedArtists_collection + collection: FeaturedArtists_collection$data tracking?: TrackingProp } @@ -21,7 +21,7 @@ const track: Track = _track export class FeaturedArtists extends React.Component { getFeaturedArtistEntityCollection = ( // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ - artists: FeaturedArtists_collection["artworksConnection"]["merchandisableArtists"] + artists: FeaturedArtists_collection$data["artworksConnection"]["merchandisableArtists"] ) => { // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ return artists.map((artist) => { diff --git a/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tests.tsx b/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tests.tsx index 6da737d6549..86676ea2015 100644 --- a/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tests.tsx +++ b/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tests.tsx @@ -1,4 +1,4 @@ -import { FullFeaturedArtistListTestsQueryRawResponse } from "__generated__/FullFeaturedArtistListTestsQuery.graphql" +import { FullFeaturedArtistListTestsQuery } from "__generated__/FullFeaturedArtistListTestsQuery.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" import { mockTracking } from "app/tests/mockTracking" import { renderRelayTree } from "app/tests/renderRelayTree" @@ -10,7 +10,9 @@ import { CollectionFeaturedArtistsContainer as CollectionFeaturedArtists } from jest.unmock("react-relay") describe("FullFeaturedArtistList", () => { - const render = (collection: FullFeaturedArtistListTestsQueryRawResponse["marketingCollection"]) => + const render = ( + collection: FullFeaturedArtistListTestsQuery["rawResponse"]["marketingCollection"] + ) => renderRelayTree({ Component: mockTracking(({ marketingCollection }) => ( diff --git a/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tsx b/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tsx index cee27f41919..d09bf99b856 100644 --- a/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tsx +++ b/src/app/Scenes/Collection/Components/FullFeaturedArtistList.tsx @@ -1,4 +1,4 @@ -import { FullFeaturedArtistList_collection } from "__generated__/FullFeaturedArtistList_collection.graphql" +import { FullFeaturedArtistList_collection$data } from "__generated__/FullFeaturedArtistList_collection.graphql" import { FullFeaturedArtistListQuery } from "__generated__/FullFeaturedArtistListQuery.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -6,11 +6,11 @@ import { defaultEnvironment } from "app/relay/createEnvironment" import renderWithLoadProgress from "app/utils/renderWithLoadProgress" import { Box } from "palette" import React from "react" -import { Dimensions, FlatList, ViewProps } from "react-native" +import { FlatList, ViewProps } from "react-native" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" interface Props extends ViewProps { - collection: FullFeaturedArtistList_collection + collection: FullFeaturedArtistList_collection$data } export class FullFeaturedArtistList extends React.Component { @@ -63,8 +63,7 @@ export class FullFeaturedArtistList extends React.Component { export const CollectionFeaturedArtistsContainer = createFragmentContainer(FullFeaturedArtistList, { collection: graphql` - fragment FullFeaturedArtistList_collection on MarketingCollection - @argumentDefinitions(screenWidth: { type: "Int", defaultValue: 500 }) { + fragment FullFeaturedArtistList_collection on MarketingCollection { artworksConnection(aggregations: [MERCHANDISABLE_ARTISTS], size: 0, sort: "-decayed_merch") { merchandisableArtists { internalID @@ -85,15 +84,14 @@ export const CollectionFullFeaturedArtistListQueryRenderer: React.FC<{ collectio environment={defaultEnvironment} query={graphql` - query FullFeaturedArtistListQuery($collectionID: String!, $screenWidth: Int) { + query FullFeaturedArtistListQuery($collectionID: String!) { collection: marketingCollection(slug: $collectionID) { - ...FullFeaturedArtistList_collection @arguments(screenWidth: $screenWidth) + ...FullFeaturedArtistList_collection } } `} variables={{ collectionID, - screenWidth: Dimensions.get("screen").width, }} cacheConfig={{ // Bypass Relay cache on retries. diff --git a/src/app/Scenes/Collection/Components/__fixtures__/CollectionFixture.ts b/src/app/Scenes/Collection/Components/__fixtures__/CollectionFixture.ts index 5c451a45aee..2d9fde7118d 100644 --- a/src/app/Scenes/Collection/Components/__fixtures__/CollectionFixture.ts +++ b/src/app/Scenes/Collection/Components/__fixtures__/CollectionFixture.ts @@ -1,4 +1,4 @@ -import { FullFeaturedArtistListTestsQueryRawResponse } from "__generated__/FullFeaturedArtistListTestsQuery.graphql" +import { FullFeaturedArtistListTestsQuery$rawResponse } from "__generated__/FullFeaturedArtistListTestsQuery.graphql" export const CollectionFixture = { " $fragmentRefs": null, @@ -272,7 +272,7 @@ export const ZeroStateCollectionFixture = { counts: { total: 0 }, }, } -export const FullFeaturedArtistListCollectionFixture: FullFeaturedArtistListTestsQueryRawResponse["marketingCollection"] = +export const FullFeaturedArtistListCollectionFixture: FullFeaturedArtistListTestsQuery$rawResponse["marketingCollection"] = { id: "some-id", artworksConnection: { diff --git a/src/app/Scenes/Collection/Screens/CollectionArtworks.tsx b/src/app/Scenes/Collection/Screens/CollectionArtworks.tsx index 07a68ed5ac5..2ed687b85d8 100644 --- a/src/app/Scenes/Collection/Screens/CollectionArtworks.tsx +++ b/src/app/Scenes/Collection/Screens/CollectionArtworks.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { CollectionArtworks_collection } from "__generated__/CollectionArtworks_collection.graphql" +import { CollectionArtworks_collection$data } from "__generated__/CollectionArtworks_collection.graphql" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { useArtworkFilters } from "app/Components/ArtworkFilter/useArtworkFilters" import { FilteredArtworkGridZeroState } from "app/Components/ArtworkGrids/FilteredArtworkGridZeroState" @@ -13,7 +13,7 @@ import { useTracking } from "react-tracking" import styled from "styled-components/native" interface CollectionArtworksProps { - collection: CollectionArtworks_collection + collection: CollectionArtworks_collection$data relay: RelayPaginationProp scrollToTop: () => void } diff --git a/src/app/Scenes/Collection/Screens/CollectionHeader.tests.tsx b/src/app/Scenes/Collection/Screens/CollectionHeader.tests.tsx index eabe27c9aa1..92223afe0d3 100644 --- a/src/app/Scenes/Collection/Screens/CollectionHeader.tests.tsx +++ b/src/app/Scenes/Collection/Screens/CollectionHeader.tests.tsx @@ -1,4 +1,4 @@ -import { CollectionHeaderTestsQueryRawResponse } from "__generated__/CollectionHeaderTestsQuery.graphql" +import { CollectionHeaderTestsQuery } from "__generated__/CollectionHeaderTestsQuery.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ReadMore } from "app/Components/ReadMore" import { GlobalStoreProvider } from "app/store/GlobalStore" @@ -29,7 +29,10 @@ it("renders without throwing an error", async () => { } } `, - mockData: { marketingCollection: CollectionFixture } as CollectionHeaderTestsQueryRawResponse, + // @ts-ignore-error + mockData: { + marketingCollection: CollectionFixture, + } as CollectionHeaderTestsQuery, }) }) diff --git a/src/app/Scenes/Collection/Screens/CollectionHeader.tsx b/src/app/Scenes/Collection/Screens/CollectionHeader.tsx index e28d98c1daa..fd5fac43935 100644 --- a/src/app/Scenes/Collection/Screens/CollectionHeader.tsx +++ b/src/app/Scenes/Collection/Screens/CollectionHeader.tsx @@ -1,4 +1,4 @@ -import { CollectionHeader_collection } from "__generated__/CollectionHeader_collection.graphql" +import { CollectionHeader_collection$data } from "__generated__/CollectionHeader_collection.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ReadMore } from "app/Components/ReadMore" import { Schema } from "app/utils/track" @@ -8,7 +8,7 @@ import { Dimensions } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface CollectionHeaderProps { - collection: CollectionHeader_collection + collection: CollectionHeader_collection$data } const HEADER_IMAGE_HEIGHT = 204 diff --git a/src/app/Scenes/Fair/Components/FairArtworks.tsx b/src/app/Scenes/Fair/Components/FairArtworks.tsx index 826b60dd713..d8ce1d02af7 100644 --- a/src/app/Scenes/Fair/Components/FairArtworks.tsx +++ b/src/app/Scenes/Fair/Components/FairArtworks.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { FairArtworks_fair } from "__generated__/FairArtworks_fair.graphql" +import { FairArtworks_fair$data } from "__generated__/FairArtworks_fair.graphql" import { aggregationsType, aggregationsWithFollowedArtists, @@ -18,7 +18,7 @@ import { useTracking } from "react-tracking" import { useScreenDimensions } from "shared/hooks" interface FairArtworksProps { - fair: FairArtworks_fair + fair: FairArtworks_fair$data relay: RelayPaginationProp initiallyAppliedFilter?: FilterArray aggregations?: aggregationsType diff --git a/src/app/Scenes/Fair/Components/FairCollections.tsx b/src/app/Scenes/Fair/Components/FairCollections.tsx index 25aa3a2fa56..5d822e1421d 100644 --- a/src/app/Scenes/Fair/Components/FairCollections.tsx +++ b/src/app/Scenes/Fair/Components/FairCollections.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedCollectionGroup } from "@artsy/cohesion" -import { FairCollections_fair } from "__generated__/FairCollections_fair.graphql" +import { FairCollections_fair$data } from "__generated__/FairCollections_fair.graphql" import { CARD_WIDTH } from "app/Components/Home/CardRailCard" import { CardRailFlatList } from "app/Components/Home/CardRailFlatList" import { navigate } from "app/navigation/navigate" @@ -9,10 +9,10 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" -type Collection = FairCollections_fair["marketingCollections"][number] +type Collection = FairCollections_fair$data["marketingCollections"][number] interface FairCollectionsProps extends BoxProps { - fair: FairCollections_fair + fair: FairCollections_fair$data } export const FairCollections: React.FC = ({ fair, ...rest }) => { diff --git a/src/app/Scenes/Fair/Components/FairEditorial.tsx b/src/app/Scenes/Fair/Components/FairEditorial.tsx index 505f86cd130..23155402a0e 100644 --- a/src/app/Scenes/Fair/Components/FairEditorial.tsx +++ b/src/app/Scenes/Fair/Components/FairEditorial.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedArticleGroup } from "@artsy/cohesion" -import { FairEditorial_fair } from "__generated__/FairEditorial_fair.graphql" +import { FairEditorial_fair$data } from "__generated__/FairEditorial_fair.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Box, BoxProps, Text, Touchable, useColor } from "palette" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface FairEditorialProps extends BoxProps { - fair: FairEditorial_fair + fair: FairEditorial_fair$data } export const FairEditorial: React.FC = ({ fair, ...rest }) => { diff --git a/src/app/Scenes/Fair/Components/FairEmptyState.tsx b/src/app/Scenes/Fair/Components/FairEmptyState.tsx index 96717f98d60..862760e9a18 100644 --- a/src/app/Scenes/Fair/Components/FairEmptyState.tsx +++ b/src/app/Scenes/Fair/Components/FairEmptyState.tsx @@ -1,10 +1,10 @@ -import { FairEmptyState_fair } from "__generated__/FairEmptyState_fair.graphql" +import { FairEmptyState_fair$data } from "__generated__/FairEmptyState_fair.graphql" import { SimpleMessage } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface FairEmptyStateProps { - fair: FairEmptyState_fair + fair: FairEmptyState_fair$data } const FairEmptyState: React.FC = ({ fair }) => { diff --git a/src/app/Scenes/Fair/Components/FairExhibitorRail.tsx b/src/app/Scenes/Fair/Components/FairExhibitorRail.tsx index 475d6d8cd25..2a9db6fa297 100644 --- a/src/app/Scenes/Fair/Components/FairExhibitorRail.tsx +++ b/src/app/Scenes/Fair/Components/FairExhibitorRail.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { FairExhibitorRail_show } from "__generated__/FairExhibitorRail_show.graphql" +import { FairExhibitorRail_show$data } from "__generated__/FairExhibitorRail_show.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface FairExhibitorRailProps { - show: FairExhibitorRail_show + show: FairExhibitorRail_show$data } const FairExhibitorRail: React.FC = ({ show }) => { @@ -89,7 +89,7 @@ export const FairExhibitorRailFragmentContainer = createFragmentContainer(FairEx const tracks = { tappedArtwork: ( - show: FairExhibitorRail_show, + show: FairExhibitorRail_show$data, artworkID: string, artworkSlug: string, position: number @@ -105,7 +105,7 @@ const tracks = { horizontal_slide_position: position, type: "thumbnail", }), - tappedShow: (show: FairExhibitorRail_show) => ({ + tappedShow: (show: FairExhibitorRail_show$data) => ({ action: ActionType.tappedArtworkGroup, context_module: ContextModule.galleryBoothRail, context_screen_owner_type: OwnerType.fair, diff --git a/src/app/Scenes/Fair/Components/FairExhibitors.tsx b/src/app/Scenes/Fair/Components/FairExhibitors.tsx index 9ffbb7d68af..745eaac60af 100644 --- a/src/app/Scenes/Fair/Components/FairExhibitors.tsx +++ b/src/app/Scenes/Fair/Components/FairExhibitors.tsx @@ -1,4 +1,4 @@ -import { FairExhibitors_fair } from "__generated__/FairExhibitors_fair.graphql" +import { FairExhibitors_fair$data } from "__generated__/FairExhibitors_fair.graphql" import { FAIR2_EXHIBITORS_PAGE_SIZE } from "app/Components/constants" import Spinner from "app/Components/Spinner" import { extractNodes } from "app/utils/extractNodes" @@ -9,7 +9,7 @@ import { createPaginationContainer, graphql, RelayPaginationProp } from "react-r import { FairExhibitorRailFragmentContainer } from "./FairExhibitorRail" interface FairExhibitorsProps { - fair: FairExhibitors_fair + fair: FairExhibitors_fair$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/Fair/Components/FairFollowedArtistsRail.tsx b/src/app/Scenes/Fair/Components/FairFollowedArtistsRail.tsx index 8864175d1a9..b0dd117c27c 100644 --- a/src/app/Scenes/Fair/Components/FairFollowedArtistsRail.tsx +++ b/src/app/Scenes/Fair/Components/FairFollowedArtistsRail.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { FairFollowedArtistsRail_fair } from "__generated__/FairFollowedArtistsRail_fair.graphql" +import { FairFollowedArtistsRail_fair$data } from "__generated__/FairFollowedArtistsRail_fair.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface FairFollowedArtistsRailProps { - fair: FairFollowedArtistsRail_fair + fair: FairFollowedArtistsRail_fair$data } export const FairFollowedArtistsRail: React.FC = ({ fair }) => { @@ -70,7 +70,7 @@ export const FairFollowedArtistsRailFragmentContainer = createFragmentContainer( const tracks = { tappedArtwork: ( - fair: FairFollowedArtistsRail_fair, + fair: FairFollowedArtistsRail_fair$data, artworkID: string, artworkSlug: string, position: number @@ -86,7 +86,7 @@ const tracks = { horizontal_slide_position: position, type: "thumbnail", }), - tappedViewAll: (fair: FairFollowedArtistsRail_fair) => ({ + tappedViewAll: (fair: FairFollowedArtistsRail_fair$data) => ({ action: ActionType.tappedArtworkGroup, context_module: ContextModule.worksByArtistsYouFollowRail, context_screen_owner_type: OwnerType.fair, diff --git a/src/app/Scenes/Fair/Components/FairHeader.tsx b/src/app/Scenes/Fair/Components/FairHeader.tsx index 960627b297f..01186b5516f 100644 --- a/src/app/Scenes/Fair/Components/FairHeader.tsx +++ b/src/app/Scenes/Fair/Components/FairHeader.tsx @@ -1,4 +1,4 @@ -import { FairHeader_fair } from "__generated__/FairHeader_fair.graphql" +import { FairHeader_fair$data } from "__generated__/FairHeader_fair.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ReadMore } from "app/Components/ReadMore" import { navigate } from "app/navigation/navigate" @@ -12,7 +12,7 @@ import { shouldShowFairBMWArtActivationLink } from "../FairBMWArtActivation" import { FairTimingFragmentContainer as FairTiming } from "./FairTiming" interface FairHeaderProps { - fair: FairHeader_fair + fair: FairHeader_fair$data } export const FairHeader: React.FC = ({ fair }) => { diff --git a/src/app/Scenes/Fair/Components/FairTiming.tsx b/src/app/Scenes/Fair/Components/FairTiming.tsx index d8ae50a2bd4..a4bcfcc4fa8 100644 --- a/src/app/Scenes/Fair/Components/FairTiming.tsx +++ b/src/app/Scenes/Fair/Components/FairTiming.tsx @@ -1,4 +1,4 @@ -import { FairTiming_fair } from "__generated__/FairTiming_fair.graphql" +import { FairTiming_fair$data } from "__generated__/FairTiming_fair.graphql" import { EventTiming } from "app/Components/EventTiming" import { WithCurrentTime } from "app/Components/WithCurrentTime" import { Box, Text } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface FairTimingProps { - fair: FairTiming_fair + fair: FairTiming_fair$data } export const FairTiming: React.FC = ({ diff --git a/src/app/Scenes/Fair/Fair.tsx b/src/app/Scenes/Fair/Fair.tsx index 4862a53dd69..f8b5ad5b6fb 100644 --- a/src/app/Scenes/Fair/Fair.tsx +++ b/src/app/Scenes/Fair/Fair.tsx @@ -1,6 +1,6 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" import { useActionSheet } from "@expo/react-native-action-sheet" -import { Fair_fair } from "__generated__/Fair_fair.graphql" +import { Fair_fair$data } from "__generated__/Fair_fair.graphql" import { FairQuery } from "__generated__/FairQuery.graphql" import { FairReverseImageSearchQuery } from "__generated__/FairReverseImageSearchQuery.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" @@ -39,7 +39,7 @@ interface FairQueryRendererProps { } interface FairProps { - fair: Fair_fair + fair: Fair_fair$data } const tabs: TabsType = [ diff --git a/src/app/Scenes/Fair/FairAllFollowedArtists.tsx b/src/app/Scenes/Fair/FairAllFollowedArtists.tsx index 0fc130fa0ed..134c4461552 100644 --- a/src/app/Scenes/Fair/FairAllFollowedArtists.tsx +++ b/src/app/Scenes/Fair/FairAllFollowedArtists.tsx @@ -1,5 +1,5 @@ -import { FairAllFollowedArtists_fair } from "__generated__/FairAllFollowedArtists_fair.graphql" -import { FairAllFollowedArtists_fairForFilters } from "__generated__/FairAllFollowedArtists_fairForFilters.graphql" +import { FairAllFollowedArtists_fair$data } from "__generated__/FairAllFollowedArtists_fair.graphql" +import { FairAllFollowedArtists_fairForFilters$data } from "__generated__/FairAllFollowedArtists_fairForFilters.graphql" import { FairAllFollowedArtistsQuery } from "__generated__/FairAllFollowedArtistsQuery.graphql" import { AnimatedArtworkFilterButton, @@ -22,8 +22,8 @@ import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" import { FairArtworksFragmentContainer } from "./Components/FairArtworks" interface FairAllFollowedArtistsProps { - fair: FairAllFollowedArtists_fair - fairForFilters: FairAllFollowedArtists_fairForFilters + fair: FairAllFollowedArtists_fair$data + fairForFilters: FairAllFollowedArtists_fairForFilters$data } export const FairAllFollowedArtists: React.FC = ({ diff --git a/src/app/Scenes/Fair/FairArticles.tsx b/src/app/Scenes/Fair/FairArticles.tsx index 20c94fd9786..b945767df21 100644 --- a/src/app/Scenes/Fair/FairArticles.tsx +++ b/src/app/Scenes/Fair/FairArticles.tsx @@ -1,4 +1,4 @@ -import { FairArticles_fair } from "__generated__/FairArticles_fair.graphql" +import { FairArticles_fair$data } from "__generated__/FairArticles_fair.graphql" import { FairArticlesQuery } from "__generated__/FairArticlesQuery.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" @@ -19,7 +19,7 @@ interface FairArticlesQueryRendererProps { } interface FairArticlesProps { - fair: FairArticles_fair + fair: FairArticles_fair$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/Fair/FairBMWArtActivation.tsx b/src/app/Scenes/Fair/FairBMWArtActivation.tsx index 1beedac5558..2e5614a6d6e 100644 --- a/src/app/Scenes/Fair/FairBMWArtActivation.tsx +++ b/src/app/Scenes/Fair/FairBMWArtActivation.tsx @@ -1,5 +1,5 @@ // NOTE: Component copied from original fair directory -import { FairBMWArtActivation_fair } from "__generated__/FairBMWArtActivation_fair.graphql" +import { FairBMWArtActivation_fair$data } from "__generated__/FairBMWArtActivation_fair.graphql" import { FairBMWArtActivationQuery } from "__generated__/FairBMWArtActivationQuery.graphql" import { CaretButton } from "app/Components/Buttons/CaretButton" import { navigate } from "app/navigation/navigate" @@ -13,7 +13,7 @@ import { defaultEnvironment } from "../../relay/createEnvironment" import renderWithLoadProgress from "../../utils/renderWithLoadProgress" interface Props extends ViewProps { - fair: FairBMWArtActivation_fair + fair: FairBMWArtActivation_fair$data } interface State { diff --git a/src/app/Scenes/Fair/FairMoreInfo.tsx b/src/app/Scenes/Fair/FairMoreInfo.tsx index 1640eb7c1d6..1fe1707434d 100644 --- a/src/app/Scenes/Fair/FairMoreInfo.tsx +++ b/src/app/Scenes/Fair/FairMoreInfo.tsx @@ -1,4 +1,4 @@ -import { FairMoreInfo_fair } from "__generated__/FairMoreInfo_fair.graphql" +import { FairMoreInfo_fair$data } from "__generated__/FairMoreInfo_fair.graphql" import { FairMoreInfoQuery } from "__generated__/FairMoreInfoQuery.graphql" import { LocationMapContainer } from "app/Components/LocationMap/LocationMap" import { Markdown } from "app/Components/Markdown" @@ -18,7 +18,7 @@ interface FairMoreInfoQueryRendererProps { } interface FairMoreInfoProps { - fair: FairMoreInfo_fair + fair: FairMoreInfo_fair$data } interface LocationCoordinates { diff --git a/src/app/Scenes/Favorites/FavoriteArtists.tsx b/src/app/Scenes/Favorites/FavoriteArtists.tsx index 2564c4e094f..a06a3c7b5ad 100644 --- a/src/app/Scenes/Favorites/FavoriteArtists.tsx +++ b/src/app/Scenes/Favorites/FavoriteArtists.tsx @@ -7,7 +7,7 @@ import { ZeroState } from "app/Components/States/ZeroState" import { PAGE_SIZE } from "app/Components/constants" -import { FavoriteArtists_me } from "__generated__/FavoriteArtists_me.graphql" +import { FavoriteArtists_me$data } from "__generated__/FavoriteArtists_me.graphql" import { FavoriteArtistsQuery } from "__generated__/FavoriteArtistsQuery.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { StickyTabPageFlatList } from "app/Components/StickyTabPage/StickyTabPageFlatList" @@ -18,7 +18,7 @@ import renderWithLoadProgress from "app/utils/renderWithLoadProgress" import { ClassTheme, Spacer } from "palette" interface Props { - me: FavoriteArtists_me + me: FavoriteArtists_me$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/Favorites/FavoriteArtworks.tsx b/src/app/Scenes/Favorites/FavoriteArtworks.tsx index b70b8aa5b27..963c6776219 100644 --- a/src/app/Scenes/Favorites/FavoriteArtworks.tsx +++ b/src/app/Scenes/Favorites/FavoriteArtworks.tsx @@ -1,4 +1,4 @@ -import { FavoriteArtworks_me } from "__generated__/FavoriteArtworks_me.graphql" +import { FavoriteArtworks_me$data } from "__generated__/FavoriteArtworks_me.graphql" import { FavoriteArtworksQuery } from "__generated__/FavoriteArtworksQuery.graphql" import GenericGrid, { GenericGridPlaceholder } from "app/Components/ArtworkGrids/GenericGrid" import { PAGE_SIZE } from "app/Components/constants" @@ -17,7 +17,7 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp import { useScreenDimensions } from "shared/hooks" interface Props { - me: FavoriteArtworks_me + me: FavoriteArtworks_me$data relay: RelayPaginationProp onDataFetching?: (loading: boolean) => void } diff --git a/src/app/Scenes/Favorites/FavoriteCategories.tsx b/src/app/Scenes/Favorites/FavoriteCategories.tsx index 8f6bcce73cf..39309076397 100644 --- a/src/app/Scenes/Favorites/FavoriteCategories.tsx +++ b/src/app/Scenes/Favorites/FavoriteCategories.tsx @@ -7,7 +7,7 @@ import { SavedItemRow } from "app/Components/Lists/SavedItemRow" import Spinner from "app/Components/Spinner" import { ZeroState } from "app/Components/States/ZeroState" -import { FavoriteCategories_me } from "__generated__/FavoriteCategories_me.graphql" +import { FavoriteCategories_me$data } from "__generated__/FavoriteCategories_me.graphql" import { StickyTabPageFlatList } from "app/Components/StickyTabPage/StickyTabPageFlatList" import { StickyTabPageScrollView } from "app/Components/StickyTabPage/StickyTabPageScrollView" import { extractNodes } from "app/utils/extractNodes" @@ -18,7 +18,7 @@ import { defaultEnvironment } from "app/relay/createEnvironment" import renderWithLoadProgress from "app/utils/renderWithLoadProgress" interface Props { - me: FavoriteCategories_me + me: FavoriteCategories_me$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/Favorites/FavoriteShows.tsx b/src/app/Scenes/Favorites/FavoriteShows.tsx index ac71aaeb836..a7557112efc 100644 --- a/src/app/Scenes/Favorites/FavoriteShows.tsx +++ b/src/app/Scenes/Favorites/FavoriteShows.tsx @@ -9,14 +9,14 @@ import React, { Component } from "react" import { RefreshControl } from "react-native" import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp } from "react-relay" -import { FavoriteShows_me } from "__generated__/FavoriteShows_me.graphql" +import { FavoriteShows_me$data } from "__generated__/FavoriteShows_me.graphql" import { StickyTabPageFlatList } from "app/Components/StickyTabPage/StickyTabPageFlatList" import { StickyTabPageScrollView } from "app/Components/StickyTabPage/StickyTabPageScrollView" import { extractNodes } from "app/utils/extractNodes" import { Spacer } from "palette" interface Props { - me: FavoriteShows_me + me: FavoriteShows_me$data relay: RelayPaginationProp onDataFetching?: (loading: boolean) => void } diff --git a/src/app/Scenes/Feature/Feature.tsx b/src/app/Scenes/Feature/Feature.tsx index f43eea8d5c0..879d36aca20 100644 --- a/src/app/Scenes/Feature/Feature.tsx +++ b/src/app/Scenes/Feature/Feature.tsx @@ -1,4 +1,4 @@ -import { Feature_feature } from "__generated__/Feature_feature.graphql" +import { Feature_feature$data } from "__generated__/Feature_feature.graphql" import { FeatureQuery } from "__generated__/FeatureQuery.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" import GenericGrid from "app/Components/ArtworkGrids/GenericGrid" @@ -48,7 +48,7 @@ function addSeparatorBetweenAllSections( } interface FeatureAppProps { - feature: Feature_feature + feature: Feature_feature$data } const FeatureApp: React.FC = ({ feature }) => { diff --git a/src/app/Scenes/Feature/components/FeatureFeaturedLink.tsx b/src/app/Scenes/Feature/components/FeatureFeaturedLink.tsx index 9807cb70ea1..d2031316fed 100644 --- a/src/app/Scenes/Feature/components/FeatureFeaturedLink.tsx +++ b/src/app/Scenes/Feature/components/FeatureFeaturedLink.tsx @@ -1,4 +1,4 @@ -import { FeatureFeaturedLink_featuredLink } from "__generated__/FeatureFeaturedLink_featuredLink.graphql" +import { FeatureFeaturedLink_featuredLink$data } from "__generated__/FeatureFeaturedLink_featuredLink.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Flex, Sans } from "palette" @@ -9,7 +9,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { FeatureMarkdown } from "./FeatureMarkdown" export interface FeatureFeaturedLinkProps { - featuredLink: FeatureFeaturedLink_featuredLink + featuredLink: FeatureFeaturedLink_featuredLink$data width: number } diff --git a/src/app/Scenes/Feature/components/FeatureHeader.tsx b/src/app/Scenes/Feature/components/FeatureHeader.tsx index d736895f05f..75abb26ae44 100644 --- a/src/app/Scenes/Feature/components/FeatureHeader.tsx +++ b/src/app/Scenes/Feature/components/FeatureHeader.tsx @@ -1,4 +1,4 @@ -import { FeatureHeader_feature } from "__generated__/FeatureHeader_feature.graphql" +import { FeatureHeader_feature$data } from "__generated__/FeatureHeader_feature.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { Stack } from "app/Components/Stack" import { isPad } from "app/utils/hardware" @@ -10,7 +10,7 @@ import { useScreenDimensions } from "shared/hooks" import { FeatureMarkdown } from "./FeatureMarkdown" export interface FeatureHeaderProps extends FlexProps { - feature: FeatureHeader_feature + feature: FeatureHeader_feature$data } export const FeatureHeader: React.FC = ({ feature }) => { diff --git a/src/app/Scenes/Gene/Gene.tsx b/src/app/Scenes/Gene/Gene.tsx index 0f85b6e059d..c5033ad74f0 100644 --- a/src/app/Scenes/Gene/Gene.tsx +++ b/src/app/Scenes/Gene/Gene.tsx @@ -1,4 +1,4 @@ -import { FilterArtworksInput, GeneQuery, GeneQueryResponse } from "__generated__/GeneQuery.graphql" +import { FilterArtworksInput, GeneQuery } from "__generated__/GeneQuery.graphql" import { getParamsForInputByFilterType } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import About from "app/Components/Gene/About" import { GeneArtworksPaginationContainer } from "app/Components/Gene/GeneArtworks" @@ -22,7 +22,7 @@ const TABS = { interface GeneProps { geneID: string - gene: NonNullable + gene: NonNullable } interface GeneQueryRendererProps { diff --git a/src/app/Scenes/Home/Components/ArticlesRail.tsx b/src/app/Scenes/Home/Components/ArticlesRail.tsx index 6ce57d0165b..956039c9a38 100644 --- a/src/app/Scenes/Home/Components/ArticlesRail.tsx +++ b/src/app/Scenes/Home/Components/ArticlesRail.tsx @@ -1,4 +1,4 @@ -import { ArticlesRail_articlesConnection } from "__generated__/ArticlesRail_articlesConnection.graphql" +import { ArticlesRail_articlesConnection$data } from "__generated__/ArticlesRail_articlesConnection.graphql" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" @@ -12,7 +12,7 @@ import HomeAnalytics from "../homeAnalytics" interface ArticlesRailProps { title: string - articlesConnection: ArticlesRail_articlesConnection + articlesConnection: ArticlesRail_articlesConnection$data mb?: number } diff --git a/src/app/Scenes/Home/Components/ArtworkModuleRail.tsx b/src/app/Scenes/Home/Components/ArtworkModuleRail.tsx index 58b2be084d4..c463e484b12 100644 --- a/src/app/Scenes/Home/Components/ArtworkModuleRail.tsx +++ b/src/app/Scenes/Home/Components/ArtworkModuleRail.tsx @@ -2,7 +2,7 @@ import { Flex } from "palette" import React, { useImperativeHandle, useRef } from "react" import { createFragmentContainer, graphql } from "react-relay" -import { ArtworkModuleRail_rail } from "__generated__/ArtworkModuleRail_rail.graphql" +import { ArtworkModuleRail_rail$data } from "__generated__/ArtworkModuleRail_rail.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -12,7 +12,7 @@ import { useTracking } from "react-tracking" import HomeAnalytics from "../homeAnalytics" import { RailScrollProps } from "./types" -export function getViewAllUrl(rail: ArtworkModuleRail_rail) { +export function getViewAllUrl(rail: ArtworkModuleRail_rail$data) { const context = rail.context const key = rail.key @@ -33,7 +33,7 @@ export function getViewAllUrl(rail: ArtworkModuleRail_rail) { interface ArtworkModuleRailProps { title: string - rail: ArtworkModuleRail_rail + rail: ArtworkModuleRail_rail$data mb?: number } diff --git a/src/app/Scenes/Home/Components/AuctionResultsRail.tsx b/src/app/Scenes/Home/Components/AuctionResultsRail.tsx index 2bdf8a1a192..da4c957b04f 100644 --- a/src/app/Scenes/Home/Components/AuctionResultsRail.tsx +++ b/src/app/Scenes/Home/Components/AuctionResultsRail.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { AuctionResultsRail_me } from "__generated__/AuctionResultsRail_me.graphql" +import { AuctionResultsRail_me$data } from "__generated__/AuctionResultsRail_me.graphql" import { CardRailFlatList } from "app/Components/Home/CardRailFlatList" import { AuctionResultListItemFragmentContainer, @@ -18,7 +18,11 @@ interface Props { mb?: number } -const AuctionResultsRail: React.FC<{ me: AuctionResultsRail_me } & Props> = ({ title, me, mb }) => { +const AuctionResultsRail: React.FC<{ me: AuctionResultsRail_me$data } & Props> = ({ + title, + me, + mb, +}) => { const { trackEvent } = useTracking() const auctionResultsByFollowedArtists = extractNodes(me?.auctionResultsByFollowedArtists) const navigateToAuctionResultsForArtistsYouFollow = () => { diff --git a/src/app/Scenes/Home/Components/CollectionsRail.tsx b/src/app/Scenes/Home/Components/CollectionsRail.tsx index 2491272dd2b..c0ae3249bcc 100644 --- a/src/app/Scenes/Home/Components/CollectionsRail.tsx +++ b/src/app/Scenes/Home/Components/CollectionsRail.tsx @@ -1,4 +1,4 @@ -import { CollectionsRail_collectionsModule } from "__generated__/CollectionsRail_collectionsModule.graphql" +import { CollectionsRail_collectionsModule$data } from "__generated__/CollectionsRail_collectionsModule.graphql" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -24,11 +24,11 @@ import { RailScrollProps } from "./types" interface Props { title: string subtitle?: string - collectionsModule: CollectionsRail_collectionsModule + collectionsModule: CollectionsRail_collectionsModule$data mb?: number } -type Collection = CollectionsRail_collectionsModule["results"][0] +type Collection = CollectionsRail_collectionsModule$data["results"][0] const CollectionsRail: React.FC = (props) => { const listRef = useRef>() diff --git a/src/app/Scenes/Home/Components/EmailConfirmationBanner.tests.tsx b/src/app/Scenes/Home/Components/EmailConfirmationBanner.tests.tsx index 6de07a6cecb..86690cea4c8 100644 --- a/src/app/Scenes/Home/Components/EmailConfirmationBanner.tests.tsx +++ b/src/app/Scenes/Home/Components/EmailConfirmationBanner.tests.tsx @@ -5,10 +5,11 @@ import { graphql, QueryRenderer } from "react-relay" import { ReactTestRenderer } from "react-test-renderer" import { createMockEnvironment } from "relay-test-utils" -import { EmailConfirmationBanner_me } from "__generated__/EmailConfirmationBanner_me.graphql" +import { EmailConfirmationBanner_me$data } from "__generated__/EmailConfirmationBanner_me.graphql" import { EmailConfirmationBannerTestsQuery } from "__generated__/EmailConfirmationBannerTestsQuery.graphql" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" import { renderWithWrappers } from "app/tests/renderWithWrappers" +import { CleanRelayFragment } from "app/utils/relayHelpers" import { EmailConfirmationBannerFragmentContainer } from "./EmailConfirmationBanner" jest.unmock("react-relay") @@ -38,7 +39,7 @@ describe("EmailConfirmationBanner", () => { /> ) - const mount = (data: { me: Omit }) => { + const mount = (data: { me: CleanRelayFragment }) => { const component = renderWithWrappers() env.mock.resolveMostRecentOperation({ data, errors: [] }) return component diff --git a/src/app/Scenes/Home/Components/EmailConfirmationBanner.tsx b/src/app/Scenes/Home/Components/EmailConfirmationBanner.tsx index 97629036b7e..2045be05237 100644 --- a/src/app/Scenes/Home/Components/EmailConfirmationBanner.tsx +++ b/src/app/Scenes/Home/Components/EmailConfirmationBanner.tsx @@ -1,4 +1,4 @@ -import { EmailConfirmationBanner_me } from "__generated__/EmailConfirmationBanner_me.graphql" +import { EmailConfirmationBanner_me$data } from "__generated__/EmailConfirmationBanner_me.graphql" import { verifyEmail } from "app/utils/verifyEmail" import { Flex, Sans, SansProps, Spinner, useColor } from "palette" import React, { useState } from "react" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql, RelayProp } from "react-relay" const Text: React.FC> = (props) => export interface Props { - me: EmailConfirmationBanner_me + me: EmailConfirmationBanner_me$data relay: RelayProp } diff --git a/src/app/Scenes/Home/Components/FairsRail.tests.tsx b/src/app/Scenes/Home/Components/FairsRail.tests.tsx index bd1529e714d..08feb6401aa 100644 --- a/src/app/Scenes/Home/Components/FairsRail.tests.tsx +++ b/src/app/Scenes/Home/Components/FairsRail.tests.tsx @@ -3,7 +3,7 @@ import { cloneDeep } from "lodash" import React from "react" import "react-native" -import { FairsRail_fairsModule } from "__generated__/FairsRail_fairsModule.graphql" +import { FairsRail_fairsModule$data } from "__generated__/FairsRail_fairsModule.graphql" import { extractText } from "app/tests/extractText" import { FairsRailFragmentContainer } from "./FairsRail" @@ -11,6 +11,7 @@ import { CardRailCard } from "app/Components/Home/CardRailCard" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" import { mockTrackEvent } from "app/tests/globallyMockedStuff" +import { CleanRelayFragment } from "app/utils/relayHelpers" import { Text } from "palette" import HomeAnalytics from "../homeAnalytics" @@ -21,10 +22,10 @@ const artworkNode = { }, } -const emptyFairsModule: Omit = { +const emptyFairsModule: CleanRelayFragment = { results: [], } -const fairsModule: Omit = { +const fairsModule: CleanRelayFragment = { results: [ { id: "the-fair", diff --git a/src/app/Scenes/Home/Components/FairsRail.tsx b/src/app/Scenes/Home/Components/FairsRail.tsx index 8cd3244731b..9f2ce2844a1 100644 --- a/src/app/Scenes/Home/Components/FairsRail.tsx +++ b/src/app/Scenes/Home/Components/FairsRail.tsx @@ -1,4 +1,4 @@ -import { FairsRail_fairsModule } from "__generated__/FairsRail_fairsModule.graphql" +import { FairsRail_fairsModule$data } from "__generated__/FairsRail_fairsModule.graphql" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { SectionTitle } from "app/Components/SectionTitle" import { bullet, Flex, Text } from "palette" @@ -24,11 +24,11 @@ import { RailScrollProps } from "./types" interface Props { title: string subtitle?: string - fairsModule: FairsRail_fairsModule + fairsModule: FairsRail_fairsModule$data mb?: number } -type FairItem = FairsRail_fairsModule["results"][0] +type FairItem = FairsRail_fairsModule$data["results"][0] const FairsRail: React.FC = (props) => { const listRef = useRef>() diff --git a/src/app/Scenes/Home/Components/HomeHero.tsx b/src/app/Scenes/Home/Components/HomeHero.tsx index 9094ca9a26e..8d90ee38407 100644 --- a/src/app/Scenes/Home/Components/HomeHero.tsx +++ b/src/app/Scenes/Home/Components/HomeHero.tsx @@ -1,12 +1,12 @@ import { tappedPromoSpace } from "@artsy/cohesion" -import { HomeHero_homePage } from "__generated__/HomeHero_homePage.graphql" +import { HomeHero_homePage$data } from "__generated__/HomeHero_homePage.graphql" import { HeroUnit } from "app/Components/Home/HeroUnit" import { navigate } from "app/navigation/navigate" import React from "react" import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" -const HomeHero: React.FC<{ homePage: HomeHero_homePage }> = ({ homePage }) => { +const HomeHero: React.FC<{ homePage: HomeHero_homePage$data }> = ({ homePage }) => { const tracking = useTracking() const unit = homePage?.heroUnits?.[0] if (!unit || !unit.backgroundImageURL || !unit.href) { diff --git a/src/app/Scenes/Home/Components/SalesRail.tests.tsx b/src/app/Scenes/Home/Components/SalesRail.tests.tsx index 6a56ae869c2..1aca045f016 100644 --- a/src/app/Scenes/Home/Components/SalesRail.tests.tsx +++ b/src/app/Scenes/Home/Components/SalesRail.tests.tsx @@ -1,4 +1,4 @@ -import { SalesRail_salesModule } from "__generated__/SalesRail_salesModule.graphql" +import { SalesRail_salesModule$data } from "__generated__/SalesRail_salesModule.graphql" import { CardRailCard } from "app/Components/Home/CardRailCard" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { SectionTitle } from "app/Components/SectionTitle" @@ -6,6 +6,7 @@ import { navigate } from "app/navigation/navigate" import { __globalStoreTestUtils__ } from "app/store/GlobalStore" import { mockTrackEvent } from "app/tests/globallyMockedStuff" import { renderWithWrappers, renderWithWrappersTL } from "app/tests/renderWithWrappers" +import { CleanRelayFragment } from "app/utils/relayHelpers" import { cloneDeep } from "lodash" import { first, last } from "lodash" import React from "react" @@ -22,7 +23,7 @@ const artworkNode = { }, }, } -const salesModule: Omit = { +const salesModule: CleanRelayFragment = { results: [ { id: "the-sale", diff --git a/src/app/Scenes/Home/Components/SalesRail.tsx b/src/app/Scenes/Home/Components/SalesRail.tsx index 7f445ee7659..b0c84244279 100644 --- a/src/app/Scenes/Home/Components/SalesRail.tsx +++ b/src/app/Scenes/Home/Components/SalesRail.tsx @@ -1,4 +1,4 @@ -import { SalesRail_salesModule } from "__generated__/SalesRail_salesModule.graphql" +import { SalesRail_salesModule$data } from "__generated__/SalesRail_salesModule.graphql" import { CARD_RAIL_ARTWORKS_HEIGHT as ARTWORKS_HEIGHT, CardRailArtworkImageContainer as ArtworkImageContainer, @@ -25,11 +25,11 @@ import { RailScrollProps } from "./types" interface Props { title: string subtitle?: string - salesModule: SalesRail_salesModule + salesModule: SalesRail_salesModule$data mb?: number } -type Sale = SalesRail_salesModule["results"][0] +type Sale = SalesRail_salesModule$data["results"][0] const SalesRail: React.FC = ({ title, diff --git a/src/app/Scenes/Home/Components/ShowsRail.tsx b/src/app/Scenes/Home/Components/ShowsRail.tsx index c24a38f4acf..487bfd24bdc 100644 --- a/src/app/Scenes/Home/Components/ShowsRail.tsx +++ b/src/app/Scenes/Home/Components/ShowsRail.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedShowGroup } from "@artsy/cohesion" -import { ShowsRail_showsConnection } from "__generated__/ShowsRail_showsConnection.graphql" +import { ShowsRail_showsConnection$data } from "__generated__/ShowsRail_showsConnection.graphql" import { SectionTitle } from "app/Components/SectionTitle" import { ShowCardContainer } from "app/Components/ShowCard" import { extractNodes } from "app/utils/extractNodes" @@ -11,7 +11,7 @@ import { useTracking } from "react-tracking" interface ShowsRailProps { title: string - showsConnection: ShowsRail_showsConnection + showsConnection: ShowsRail_showsConnection$data mb?: number } diff --git a/src/app/Scenes/Home/Components/Trove.tsx b/src/app/Scenes/Home/Components/Trove.tsx index 833dae90fb1..263493a37f2 100644 --- a/src/app/Scenes/Home/Components/Trove.tsx +++ b/src/app/Scenes/Home/Components/Trove.tsx @@ -1,4 +1,4 @@ -import { Trove_trove } from "__generated__/Trove_trove.graphql" +import { Trove_trove$data } from "__generated__/Trove_trove.graphql" import { HeroUnit } from "app/Components/Home/HeroUnit" import { navigate } from "app/navigation/navigate" import { Flex } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface TroveProps { - trove: Trove_trove + trove: Trove_trove$data mb?: number } diff --git a/src/app/Scenes/Home/Home.tsx b/src/app/Scenes/Home/Home.tsx index 82955de5b11..e655993031d 100644 --- a/src/app/Scenes/Home/Home.tsx +++ b/src/app/Scenes/Home/Home.tsx @@ -1,10 +1,10 @@ -import { Home_articlesConnection } from "__generated__/Home_articlesConnection.graphql" -import { Home_featured } from "__generated__/Home_featured.graphql" -import { Home_homePageAbove } from "__generated__/Home_homePageAbove.graphql" -import { Home_homePageBelow } from "__generated__/Home_homePageBelow.graphql" -import { Home_meAbove } from "__generated__/Home_meAbove.graphql" -import { Home_meBelow } from "__generated__/Home_meBelow.graphql" -import { Home_showsByFollowedArtists } from "__generated__/Home_showsByFollowedArtists.graphql" +import { Home_articlesConnection$data } from "__generated__/Home_articlesConnection.graphql" +import { Home_featured$data } from "__generated__/Home_featured.graphql" +import { Home_homePageAbove$data } from "__generated__/Home_homePageAbove.graphql" +import { Home_homePageBelow$data } from "__generated__/Home_homePageBelow.graphql" +import { Home_meAbove$data } from "__generated__/Home_meAbove.graphql" +import { Home_meBelow$data } from "__generated__/Home_meBelow.graphql" +import { Home_showsByFollowedArtists$data } from "__generated__/Home_showsByFollowedArtists.graphql" import { HomeAboveTheFoldQuery } from "__generated__/HomeAboveTheFoldQuery.graphql" import { HomeBelowTheFoldQuery } from "__generated__/HomeBelowTheFoldQuery.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" @@ -60,14 +60,14 @@ interface HomeModule { } interface Props extends ViewProps { - articlesConnection: Home_articlesConnection | null - showsByFollowedArtists: Home_showsByFollowedArtists | null - featured: Home_featured | null - homePageAbove: Home_homePageAbove | null - homePageBelow: Home_homePageBelow | null + articlesConnection: Home_articlesConnection$data | null + showsByFollowedArtists: Home_showsByFollowedArtists$data | null + featured: Home_featured$data | null + homePageAbove: Home_homePageAbove$data | null + homePageBelow: Home_homePageBelow$data | null loading: boolean - meAbove: Home_meAbove | null - meBelow: Home_meBelow | null + meAbove: Home_meAbove$data | null + meBelow: Home_meBelow$data | null relay: RelayRefetchProp } @@ -337,7 +337,9 @@ const Home = (props: Props) => { ) } -const HomeHeader: React.FC<{ homePageAbove: Home_homePageAbove | null }> = ({ homePageAbove }) => ( +const HomeHeader: React.FC<{ homePageAbove: Home_homePageAbove$data | null }> = ({ + homePageAbove, +}) => ( diff --git a/src/app/Scenes/Home/homeAnalytics.tests.ts b/src/app/Scenes/Home/homeAnalytics.tests.ts index 583b0866361..1276bf166fa 100644 --- a/src/app/Scenes/Home/homeAnalytics.tests.ts +++ b/src/app/Scenes/Home/homeAnalytics.tests.ts @@ -1,5 +1,5 @@ import * as Analytics from "@artsy/cohesion" -import { ArtworkModuleRail_rail } from "__generated__/ArtworkModuleRail_rail.graphql" +import { ArtworkModuleRail_rail$data } from "__generated__/ArtworkModuleRail_rail.graphql" import HomeAnalytics from "./homeAnalytics" describe("Events", () => { @@ -28,7 +28,7 @@ describe("Events", () => { }) it("returns correct artwork events", () => { - const artworkRail: Pick = { + const artworkRail: Pick = { title: "some_title", key: "followed_artists", context: { diff --git a/src/app/Scenes/Home/homeAnalytics.ts b/src/app/Scenes/Home/homeAnalytics.ts index 2c9073a829c..18dcabe797f 100644 --- a/src/app/Scenes/Home/homeAnalytics.ts +++ b/src/app/Scenes/Home/homeAnalytics.ts @@ -1,6 +1,6 @@ import * as Analytics from "@artsy/cohesion" import { TappedEntityGroup } from "@artsy/cohesion" -import { ArtworkModuleRail_rail } from "__generated__/ArtworkModuleRail_rail.graphql" +import { ArtworkModuleRail_rail$data } from "__generated__/ArtworkModuleRail_rail.graphql" type ValidHomeDestination = | Analytics.OwnerType.auctions @@ -190,7 +190,7 @@ export default class HomeAnalytics { } } - static destinationScreenSlug(rail: ArtworkModuleRail_rail): string | undefined { + static destinationScreenSlug(rail: ArtworkModuleRail_rail$data): string | undefined { const context = rail.context const key = rail.key switch (key) { diff --git a/src/app/Scenes/Inbox/Components/ActiveBids/ActiveBid.tsx b/src/app/Scenes/Inbox/Components/ActiveBids/ActiveBid.tsx index a65bd66a50e..613427c8a7d 100644 --- a/src/app/Scenes/Inbox/Components/ActiveBids/ActiveBid.tsx +++ b/src/app/Scenes/Inbox/Components/ActiveBids/ActiveBid.tsx @@ -7,7 +7,7 @@ import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" import { BodyText, MetadataText } from "../Typography" -import { ActiveBid_bid } from "__generated__/ActiveBid_bid.graphql" +import { ActiveBid_bid$data } from "__generated__/ActiveBid_bid.graphql" const isPad = Dimensions.get("window").width > 700 @@ -62,7 +62,7 @@ const StatusLabel = styled(MetadataText)` type BidStatus = "winning" | "reserve" | "losing" | "live_auction" interface Props { - bid: ActiveBid_bid + bid: ActiveBid_bid$data } interface State { diff --git a/src/app/Scenes/Inbox/Components/ActiveBids/index.tsx b/src/app/Scenes/Inbox/Components/ActiveBids/index.tsx index 2605b9322a3..9eb179d6d62 100644 --- a/src/app/Scenes/Inbox/Components/ActiveBids/index.tsx +++ b/src/app/Scenes/Inbox/Components/ActiveBids/index.tsx @@ -5,7 +5,7 @@ import styled from "styled-components/native" import { LargeHeadline } from "../Typography" import ActiveBid from "./ActiveBid" -import { ActiveBids_me } from "__generated__/ActiveBids_me.graphql" +import { ActiveBids_me$data } from "__generated__/ActiveBids_me.graphql" const Container = styled.View` margin-top: 20px; @@ -18,7 +18,7 @@ const Headline = styled(LargeHeadline)` interface Props { relay: RelayRefetchProp - me: ActiveBids_me + me: ActiveBids_me$data } interface State { diff --git a/src/app/Scenes/Inbox/Components/Conversations/Composer.tsx b/src/app/Scenes/Inbox/Components/Conversations/Composer.tsx index eba5210a7da..8b8c029ad1f 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Composer.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Composer.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { Composer_conversation } from "__generated__/Composer_conversation.graphql" +import { Composer_conversation$data } from "__generated__/Composer_conversation.graphql" import { Schema, Track, track as _track } from "app/utils/track" import { Button, ClassTheme, Flex, themeProps } from "palette" import React from "react" @@ -27,7 +27,7 @@ interface Props { disabled?: boolean onSubmit?: (text: string) => any value?: string - conversation: Composer_conversation + conversation: Composer_conversation$data } interface State { diff --git a/src/app/Scenes/Inbox/Components/Conversations/ConversationCTA.tsx b/src/app/Scenes/Inbox/Components/Conversations/ConversationCTA.tsx index 3dab309934e..47fb3b46144 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/ConversationCTA.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/ConversationCTA.tsx @@ -1,4 +1,4 @@ -import { ConversationCTA_conversation } from "__generated__/ConversationCTA_conversation.graphql" +import { ConversationCTA_conversation$data } from "__generated__/ConversationCTA_conversation.graphql" import { useFeatureFlag } from "app/store/GlobalStore" import { extractNodes } from "app/utils/extractNodes" import React from "react" @@ -9,7 +9,7 @@ import { ReviewOfferButton, ReviewOfferCTAKind } from "./ReviewOfferButton" interface Props { show: boolean - conversation: ConversationCTA_conversation + conversation: ConversationCTA_conversation$data } export const ConversationCTA: React.FC = ({ conversation, show }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/ConversationSnippet.tsx b/src/app/Scenes/Inbox/Components/Conversations/ConversationSnippet.tsx index aea2c18ceb7..825f54a92ce 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/ConversationSnippet.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/ConversationSnippet.tsx @@ -8,7 +8,7 @@ import { Schema, Track, track as _track } from "app/utils/track" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import styled from "styled-components/native" -import { ConversationSnippet_conversation } from "__generated__/ConversationSnippet_conversation.graphql" +import { ConversationSnippet_conversation$data } from "__generated__/ConversationSnippet_conversation.graphql" import { ClassTheme, Flex, Sans, Touchable } from "palette" const Unread = styled(Flex)` @@ -38,7 +38,7 @@ const ImageView = styled(OpaqueImageView)` ` export interface Props { - conversation: ConversationSnippet_conversation + conversation: ConversationSnippet_conversation$data onSelected?: () => void } diff --git a/src/app/Scenes/Inbox/Components/Conversations/Conversations.tsx b/src/app/Scenes/Inbox/Components/Conversations/Conversations.tsx index a27e5e173b9..cb742a60782 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Conversations.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Conversations.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { Conversations_me } from "__generated__/Conversations_me.graphql" +import { Conversations_me$data } from "__generated__/Conversations_me.graphql" import { PAGE_SIZE } from "app/Components/constants" import { navigate } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" @@ -15,7 +15,7 @@ import ConversationSnippet from "./ConversationSnippet" import { NoMessages } from "./NoMessages" interface Props { - me: Conversations_me + me: Conversations_me$data relay: RelayPaginationProp headerView?: JSX.Element onRefresh?: () => any @@ -23,7 +23,7 @@ interface Props { } type Item = NonNullable< - NonNullable["edges"]>[0] + NonNullable["edges"]>[0] >["node"] // @track() diff --git a/src/app/Scenes/Inbox/Components/Conversations/EditionSelectBox.tsx b/src/app/Scenes/Inbox/Components/Conversations/EditionSelectBox.tsx index f20fd1f93b6..6fdbc1197fe 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/EditionSelectBox.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/EditionSelectBox.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { EditionSelectBox_editionSet } from "__generated__/EditionSelectBox_editionSet.graphql" +import { EditionSelectBox_editionSet$data } from "__generated__/EditionSelectBox_editionSet.graphql" import { useFeatureFlag } from "app/store/GlobalStore" import { BorderBox, Flex, Text, Touchable } from "palette" import { RadioButton } from "palette/elements/Radio" @@ -17,7 +17,7 @@ const UnavailableIndicator = styled(View)` ` interface Props { - editionSet: EditionSelectBox_editionSet + editionSet: EditionSelectBox_editionSet$data selected: boolean onPress: (editionSetId: string, isAvailable: boolean) => void } diff --git a/src/app/Scenes/Inbox/Components/Conversations/InquiryMakeOfferButton.tsx b/src/app/Scenes/Inbox/Components/Conversations/InquiryMakeOfferButton.tsx index 1dd931614b6..9f4353f3308 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/InquiryMakeOfferButton.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/InquiryMakeOfferButton.tsx @@ -1,4 +1,4 @@ -import { InquiryMakeOfferButton_artwork } from "__generated__/InquiryMakeOfferButton_artwork.graphql" +import { InquiryMakeOfferButton_artwork$data } from "__generated__/InquiryMakeOfferButton_artwork.graphql" import { InquiryMakeOfferButtonOrderMutation } from "__generated__/InquiryMakeOfferButtonOrderMutation.graphql" import { navigate } from "app/navigation/navigate" import { Button, ButtonProps } from "palette" @@ -7,7 +7,7 @@ import { Alert } from "react-native" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" export interface InquiryMakeOfferButtonProps extends ButtonProps { - artwork: InquiryMakeOfferButton_artwork + artwork: InquiryMakeOfferButton_artwork$data relay: RelayProp // EditionSetID is passed down from the edition selected by the user editionSetID: string | null diff --git a/src/app/Scenes/Inbox/Components/Conversations/InquiryPurchaseButton.tsx b/src/app/Scenes/Inbox/Components/Conversations/InquiryPurchaseButton.tsx index 49e03acbb89..c84e3bbb9ec 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/InquiryPurchaseButton.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/InquiryPurchaseButton.tsx @@ -1,4 +1,4 @@ -import { InquiryPurchaseButton_artwork } from "__generated__/InquiryPurchaseButton_artwork.graphql" +import { InquiryPurchaseButton_artwork$data } from "__generated__/InquiryPurchaseButton_artwork.graphql" import { InquiryPurchaseButtonOrderMutation } from "__generated__/InquiryPurchaseButtonOrderMutation.graphql" import { navigate } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -8,7 +8,7 @@ import { Alert } from "react-native" import { commitMutation, createFragmentContainer, graphql } from "react-relay" export interface InquiryPurchaseButtonProps { - artwork: InquiryPurchaseButton_artwork + artwork: InquiryPurchaseButton_artwork$data editionSetID: string | null conversationID: string replaceModalView?: boolean diff --git a/src/app/Scenes/Inbox/Components/Conversations/ItemArtwork.tsx b/src/app/Scenes/Inbox/Components/Conversations/ItemArtwork.tsx index 573811b0d2f..488792d07b8 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/ItemArtwork.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/ItemArtwork.tsx @@ -1,4 +1,4 @@ -import { ItemArtwork_artwork } from "__generated__/ItemArtwork_artwork.graphql" +import { ItemArtwork_artwork$data } from "__generated__/ItemArtwork_artwork.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Box, Flex, Separator, Text, Touchable } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ItemArtworkProps { - artwork: ItemArtwork_artwork + artwork: ItemArtwork_artwork$data } export const ItemArtwork: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/ItemInfo.tsx b/src/app/Scenes/Inbox/Components/Conversations/ItemInfo.tsx index e9deaffc008..bc87ab2021e 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/ItemInfo.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/ItemInfo.tsx @@ -1,11 +1,11 @@ -import { ItemInfo_item } from "__generated__/ItemInfo_item.graphql" +import { ItemInfo_item$data } from "__generated__/ItemInfo_item.graphql" import React from "react" import { createFragmentContainer, graphql } from "react-relay" import { ItemArtworkFragmentContainer } from "./ItemArtwork" import { ItemShowFragmentContainer } from "./ItemShow" interface ItemInfoProps { - item: ItemInfo_item + item: ItemInfo_item$data } export const ItemInfo: React.FC = ({ item }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/ItemShow.tsx b/src/app/Scenes/Inbox/Components/Conversations/ItemShow.tsx index 02afa6c261a..2d6ae007260 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/ItemShow.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/ItemShow.tsx @@ -1,4 +1,4 @@ -import { ItemShow_show } from "__generated__/ItemShow_show.graphql" +import { ItemShow_show$data } from "__generated__/ItemShow_show.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { Box, Flex, Separator, Text, Touchable } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ItemShowProps { - show: ItemShow_show + show: ItemShow_show$data } export const ItemShow: React.FC = ({ show }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tests.tsx b/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tests.tsx index 8912a3d4a27..42958072cf0 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tests.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tests.tsx @@ -1,7 +1,4 @@ -import { - MakeOfferModalTestsQuery, - MakeOfferModalTestsQueryResponse, -} from "__generated__/MakeOfferModalTestsQuery.graphql" +import { MakeOfferModalTestsQuery } from "__generated__/MakeOfferModalTestsQuery.graphql" import { CollapsibleArtworkDetails } from "app/Scenes/Artwork/Components/CommercialButtons/CollapsibleArtworkDetails" import { extractText } from "app/tests/extractText" import { flushPromiseQueue } from "app/tests/flushPromiseQueue" @@ -18,7 +15,7 @@ jest.unmock("react-relay") let env: ReturnType -const FakeApp = (props: MakeOfferModalTestsQueryResponse) => { +const FakeApp = (props: MakeOfferModalTestsQuery["response"]) => { return ( { } interface RenderComponentProps { - props: MakeOfferModalTestsQueryResponse | null + props: MakeOfferModalTestsQuery["response"] | null error: Error | null } diff --git a/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tsx b/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tsx index 3461d43c75b..b82cb59cdfc 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/MakeOfferModal.tsx @@ -1,9 +1,6 @@ import { ActionType, OwnerType } from "@artsy/cohesion" -import { MakeOfferModal_artwork } from "__generated__/MakeOfferModal_artwork.graphql" -import { - MakeOfferModalQuery, - MakeOfferModalQueryResponse, -} from "__generated__/MakeOfferModalQuery.graphql" +import { MakeOfferModal_artwork$data } from "__generated__/MakeOfferModal_artwork.graphql" +import { MakeOfferModalQuery } from "__generated__/MakeOfferModalQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { dismissModal } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -19,7 +16,7 @@ import { InquiryMakeOfferButtonFragmentContainer as InquiryMakeOfferButton } fro import { EditionSelectBoxFragmentContainer } from "./EditionSelectBox" interface MakeOfferModalProps { - artwork: MakeOfferModal_artwork + artwork: MakeOfferModal_artwork$data conversationID: string } @@ -127,7 +124,7 @@ export const MakeOfferModalQueryRenderer: React.FC<{ variables={{ artworkID, }} - render={renderWithLoadProgress(({ artwork }) => ( + render={renderWithLoadProgress(({ artwork }) => ( ))} /> diff --git a/src/app/Scenes/Inbox/Components/Conversations/Message.tsx b/src/app/Scenes/Inbox/Components/Conversations/Message.tsx index f80c3d5f7e9..31c7fab6caf 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Message.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Message.tsx @@ -1,4 +1,4 @@ -import { Message_message } from "__generated__/Message_message.graphql" +import { Message_message$data } from "__generated__/Message_message.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { navigate } from "app/navigation/navigate" import { Schema, Track, track as _track } from "app/utils/track" @@ -21,7 +21,7 @@ const AttachmentContainer = styled(View)` ` interface Props extends Omit { - message: Message_message + message: Message_message$data showTimeSince?: boolean conversationId: string } diff --git a/src/app/Scenes/Inbox/Components/Conversations/MessageGroup.tsx b/src/app/Scenes/Inbox/Components/Conversations/MessageGroup.tsx index 9264b729c03..229a5397c5e 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/MessageGroup.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/MessageGroup.tsx @@ -2,12 +2,12 @@ import React from "react" import { View } from "react-native" import styled from "styled-components/native" -import { Message_message } from "__generated__/Message_message.graphql" -import { Messages_conversation } from "__generated__/Messages_conversation.graphql" +import { Message_message$data } from "__generated__/Message_message.graphql" +import { Messages_conversation$data } from "__generated__/Messages_conversation.graphql" import moment from "moment" import { Flex, Spacer } from "palette" -import { OrderUpdate_event } from "__generated__/OrderUpdate_event.graphql" +import { OrderUpdate_event$data } from "__generated__/OrderUpdate_event.graphql" import { navigate } from "app/navigation/navigate" import { Message } from "./Message" import { OrderUpdateFragmentContainer } from "./OrderUpdate" @@ -19,9 +19,9 @@ const SubjectContainer = styled(Flex)` flex-direction: row; justify-content: flex-end; ` -type Item = NonNullable[0]>["item"] +type Item = NonNullable[0]>["item"] -export type DisplayableMessage = OrderUpdate_event | Message_message +export type DisplayableMessage = OrderUpdate_event$data | Message_message$data interface MessageGroupProps { group: DisplayableMessage[] conversationId: string @@ -29,12 +29,12 @@ interface MessageGroupProps { isLastMessage: boolean } -const isMessageArray = (items: DisplayableMessage[]): items is Message_message[] => { +const isMessageArray = (items: DisplayableMessage[]): items is Message_message$data[] => { return items[0].__typename === "Message" } const relevantEvents = ["CommerceOfferSubmittedEvent", "CommerceOrderStateChangedEvent"] -const isRelevantEventArray = (items: DisplayableMessage[]): items is OrderUpdate_event[] => { +const isRelevantEventArray = (items: DisplayableMessage[]): items is OrderUpdate_event$data[] => { const firstItem = items[0] return firstItem?.__typename !== "Message" && relevantEvents.includes(firstItem.__typename) } @@ -42,8 +42,8 @@ const isRelevantEventArray = (items: DisplayableMessage[]): items is OrderUpdate const IndividualMessage: React.FC<{ isLastMessage: boolean conversationId: string - message: Message_message - nextMessage?: Message_message + message: Message_message$data + nextMessage?: Message_message$data isSameDay: boolean }> = ({ message, nextMessage, conversationId, isLastMessage, isSameDay }) => { const senderChanges = !!nextMessage && nextMessage.isFromUser !== message.isFromUser @@ -108,7 +108,7 @@ export class MessageGroup extends React.Component { {!isLastMessage && ( )} - {[...group].reverse().map((message: Message_message, messageIndex: number) => { + {[...group].reverse().map((message: Message_message$data, messageIndex: number) => { const messageKey = `message-${messageIndex}` return ( 700 interface Props { - conversation: Messages_conversation + conversation: Messages_conversation$data relay: RelayPaginationProp onDataFetching?: (loading: boolean) => void onRefresh?: () => void diff --git a/src/app/Scenes/Inbox/Components/Conversations/OpenInquiryModalButton.tsx b/src/app/Scenes/Inbox/Components/Conversations/OpenInquiryModalButton.tsx index 658d6d4d6d4..409a6e98aa5 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/OpenInquiryModalButton.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/OpenInquiryModalButton.tsx @@ -1,5 +1,5 @@ import { ActionType, OwnerType, TappedBuyNow, TappedMakeOffer } from "@artsy/cohesion" -import { OpenInquiryModalButton_artwork } from "__generated__/OpenInquiryModalButton_artwork.graphql" +import { OpenInquiryModalButton_artwork$data } from "__generated__/OpenInquiryModalButton_artwork.graphql" import { navigate } from "app/navigation/navigate" import { useFeatureFlag } from "app/store/GlobalStore" import { Button, Flex, ShieldIcon, Spacer, Text } from "palette" @@ -11,7 +11,7 @@ import { InquiryMakeOfferButtonFragmentContainer } from "./InquiryMakeOfferButto import { InquiryPurchaseButtonFragmentContainer } from "./InquiryPurchaseButton" export interface OpenInquiryModalButtonProps { - artwork: OpenInquiryModalButton_artwork + artwork: OpenInquiryModalButton_artwork$data conversationID: string } @@ -135,7 +135,10 @@ const tracks = { context_owner_type: OwnerType.conversation, impulse_conversation_id: id, }), - trackTappedPurchase: (id: string, artwork: OpenInquiryModalButton_artwork): TappedBuyNow => ({ + trackTappedPurchase: ( + id: string, + artwork: OpenInquiryModalButton_artwork$data + ): TappedBuyNow => ({ action: ActionType.tappedBuyNow, context_owner_type: OwnerType.conversation, context_owner_id: artwork.internalID, diff --git a/src/app/Scenes/Inbox/Components/Conversations/OrderInformation.tsx b/src/app/Scenes/Inbox/Components/Conversations/OrderInformation.tsx index 92316365bb0..1f46240218f 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/OrderInformation.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/OrderInformation.tsx @@ -1,13 +1,13 @@ -import { OrderInformation_artwork } from "__generated__/OrderInformation_artwork.graphql" -import { OrderInformation_order } from "__generated__/OrderInformation_order.graphql" +import { OrderInformation_artwork$data } from "__generated__/OrderInformation_artwork.graphql" +import { OrderInformation_order$data } from "__generated__/OrderInformation_order.graphql" import { track as _track } from "app/utils/track" import { Flex, Join, Separator, Spacer, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface OrderInformationProps { - artwork: OrderInformation_artwork - order: OrderInformation_order + artwork: OrderInformation_artwork$data + order: OrderInformation_order$data } export const OrderInformation: React.FC = ({ artwork, order }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/OrderUpdate.tsx b/src/app/Scenes/Inbox/Components/Conversations/OrderUpdate.tsx index 0f5b12130a3..f61e30ae0ce 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/OrderUpdate.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/OrderUpdate.tsx @@ -1,4 +1,4 @@ -import { OrderUpdate_event } from "__generated__/OrderUpdate_event.graphql" +import { OrderUpdate_event$data } from "__generated__/OrderUpdate_event.graphql" import { navigate } from "app/navigation/navigate" import { @@ -16,7 +16,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { TimeSince } from "./TimeSince" export interface OrderUpdateProps { - event: OrderUpdate_event + event: OrderUpdate_event$data conversationId: string } diff --git a/src/app/Scenes/Inbox/Components/Conversations/PaymentMethod.tsx b/src/app/Scenes/Inbox/Components/Conversations/PaymentMethod.tsx index 20ee5660487..ee79391f270 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/PaymentMethod.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/PaymentMethod.tsx @@ -1,11 +1,11 @@ -import { PaymentMethod_order } from "__generated__/PaymentMethod_order.graphql" +import { PaymentMethod_order$data } from "__generated__/PaymentMethod_order.graphql" import { track as _track } from "app/utils/track" import { Flex, Separator, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface PaymentMethodProps { - order: PaymentMethod_order + order: PaymentMethod_order$data } export const PaymentMethod: React.FC = ({ order }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/ArtworkPreview.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/ArtworkPreview.tsx index 19c46bb0bb0..e80a1bdcf75 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/ArtworkPreview.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/ArtworkPreview.tsx @@ -2,7 +2,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" -import { ArtworkPreview_artwork } from "__generated__/ArtworkPreview_artwork.graphql" +import { ArtworkPreview_artwork$data } from "__generated__/ArtworkPreview_artwork.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ClassTheme, Flex, Text, Touchable } from "palette" @@ -39,7 +39,7 @@ const TitleAndDate = styled.View` justify-content: flex-start; ` interface Props { - artwork: ArtworkPreview_artwork + artwork: ArtworkPreview_artwork$data onSelected?: () => void } diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentList.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentList.tsx index 27199813d7f..b27f4d1c248 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentList.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentList.tsx @@ -1,4 +1,4 @@ -import { AttachmentList_conversation } from "__generated__/AttachmentList_conversation.graphql" +import { AttachmentList_conversation$data } from "__generated__/AttachmentList_conversation.graphql" import { Box, DocumentIcon, Separator, Spacer, Text } from "palette" import React from "react" import { FlatList } from "react-native" @@ -6,7 +6,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { FileDownloadFragmentContainer as FileDownload } from "./FileDownload" interface Props { - conversation: AttachmentList_conversation + conversation: AttachmentList_conversation$data } const AttachmentList: React.FC = ({ conversation }) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentPreview.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentPreview.tsx index 71a5942db7d..76aaa9df1d3 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentPreview.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/AttachmentPreview.tsx @@ -3,7 +3,7 @@ import { findNodeHandle } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import styled from "styled-components/native" -import { AttachmentPreview_attachment } from "__generated__/AttachmentPreview_attachment.graphql" +import { AttachmentPreview_attachment$data } from "__generated__/AttachmentPreview_attachment.graphql" import { ClassTheme, Touchable } from "palette" const Container = styled.View` @@ -19,7 +19,7 @@ export interface AttachmentProps { } interface Props extends AttachmentProps { - attachment: AttachmentPreview_attachment + attachment: AttachmentPreview_attachment$data } export class AttachmentPreview extends React.Component { diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tests.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tests.tsx index b72f0a5aeca..12831b800fe 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tests.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tests.tsx @@ -1,9 +1,10 @@ -import { FileDownload_attachment } from "__generated__/FileDownload_attachment.graphql" +import { FileDownload_attachment$data } from "__generated__/FileDownload_attachment.graphql" import { renderWithWrappers } from "app/tests/renderWithWrappers" import React from "react" import "react-native" import { Linking } from "react-native" +import { CleanRelayFragment } from "app/utils/relayHelpers" import AttachmentPreview from "./AttachmentPreview" import { FileDownloadFragmentContainer as FileDownload } from "./FileDownload" @@ -14,7 +15,7 @@ it("opens file url when it is selected", async () => { expect(Linking.openURL).toBeCalledWith(attachment.downloadURL) }) -const attachment: Omit = { +const attachment: CleanRelayFragment = { fileName: "This is a great ZIP file telling you all about cats", downloadURL: "http://example.com/cats.zip", } diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tsx index 6a251d244b9..faf6ffd3bcd 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/FileDownload.tsx @@ -4,7 +4,7 @@ import { Linking } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import AttachmentPreview, { AttachmentProps } from "./AttachmentPreview" -import { FileDownload_attachment } from "__generated__/FileDownload_attachment.graphql" +import { FileDownload_attachment$data } from "__generated__/FileDownload_attachment.graphql" import { DownloadIcon } from "palette" import styled from "styled-components/native" import { AttachmentContainer, AttachmentTextContainer } from "./PDFPreview" @@ -15,12 +15,12 @@ export const NoBorderContainer = styled.View` ` interface Props extends AttachmentProps { - attachment: FileDownload_attachment + attachment: FileDownload_attachment$data tiny?: boolean Icon?: React.FC } -const downloadFile = (attachment: FileDownload_attachment) => { +const downloadFile = (attachment: FileDownload_attachment$data) => { Linking.openURL(attachment.downloadURL) } diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/ImagePreview.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/ImagePreview.tsx index 58e3c1f872a..18b2ffdd33b 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/ImagePreview.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/ImagePreview.tsx @@ -5,7 +5,7 @@ import styled from "styled-components/native" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import AttachmentPreview, { AttachmentProps } from "./AttachmentPreview" -import { ImagePreview_attachment } from "__generated__/ImagePreview_attachment.graphql" +import { ImagePreview_attachment$data } from "__generated__/ImagePreview_attachment.graphql" const Image = styled(OpaqueImageView)` height: 250; @@ -13,7 +13,7 @@ const Image = styled(OpaqueImageView)` ` interface Props extends AttachmentProps { - attachment: ImagePreview_attachment + attachment: ImagePreview_attachment$data } export const ImagePreview: React.FC = ({ attachment, onSelected }) => ( diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/PDFPreview.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/PDFPreview.tsx index 413c8e5d235..5b7e1ac2752 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/PDFPreview.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/Attachment/PDFPreview.tsx @@ -6,7 +6,7 @@ import styled from "styled-components/native" import AttachmentPreview, { AttachmentProps } from "./AttachmentPreview" -import { PDFPreview_attachment } from "__generated__/PDFPreview_attachment.graphql" +import { PDFPreview_attachment$data } from "__generated__/PDFPreview_attachment.graphql" export const AttachmentContainer = styled(Flex)` flex: 1; @@ -27,7 +27,7 @@ const Icon = styled(Image)` ` interface Props extends AttachmentProps { - attachment: PDFPreview_attachment + attachment: PDFPreview_attachment$data } export const PDFPreview: React.FC = ({ attachment, onSelected }) => ( diff --git a/src/app/Scenes/Inbox/Components/Conversations/Preview/ShowPreview.tsx b/src/app/Scenes/Inbox/Components/Conversations/Preview/ShowPreview.tsx index bf6e8d6c4b5..526af30fb81 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Preview/ShowPreview.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Preview/ShowPreview.tsx @@ -7,7 +7,7 @@ import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import styled from "styled-components/native" import { themeGet } from "@styled-system/theme-get" -import { ShowPreview_show } from "__generated__/ShowPreview_show.graphql" +import { ShowPreview_show$data } from "__generated__/ShowPreview_show.graphql" const Container = styled.View` background-color: ${themeGet("colors.black100")}; @@ -34,7 +34,7 @@ const TextContainer = styled(VerticalLayout)` ` interface Props { - show: ShowPreview_show + show: ShowPreview_show$data onSelected?: () => void } diff --git a/src/app/Scenes/Inbox/Components/Conversations/PurchaseModal.tsx b/src/app/Scenes/Inbox/Components/Conversations/PurchaseModal.tsx index 98bf27baeb7..bc312232bdd 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/PurchaseModal.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/PurchaseModal.tsx @@ -1,9 +1,6 @@ import { ActionType, OwnerType } from "@artsy/cohesion" -import { PurchaseModal_artwork } from "__generated__/PurchaseModal_artwork.graphql" -import { - PurchaseModalQuery, - PurchaseModalQueryResponse, -} from "__generated__/PurchaseModalQuery.graphql" +import { PurchaseModal_artwork$data } from "__generated__/PurchaseModal_artwork.graphql" +import { PurchaseModalQuery } from "__generated__/PurchaseModalQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { dismissModal } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -19,7 +16,7 @@ import { EditionSelectBoxFragmentContainer } from "./EditionSelectBox" import { InquiryPurchaseButtonFragmentContainer } from "./InquiryPurchaseButton" interface PurchaseModalProps { - artwork: PurchaseModal_artwork + artwork: PurchaseModal_artwork$data conversationID: string } @@ -126,7 +123,7 @@ export const PurchaseModalQueryRenderer: React.FC<{ variables={{ artworkID, }} - render={renderWithLoadProgress(({ artwork }) => ( + render={renderWithLoadProgress(({ artwork }) => ( ))} /> diff --git a/src/app/Scenes/Inbox/Components/Conversations/SellerReplyEstimate.tsx b/src/app/Scenes/Inbox/Components/Conversations/SellerReplyEstimate.tsx index 30fdbf243a7..d8c8833ec9a 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/SellerReplyEstimate.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/SellerReplyEstimate.tsx @@ -1,11 +1,11 @@ -import { SellerReplyEstimate_order } from "__generated__/SellerReplyEstimate_order.graphql" +import { SellerReplyEstimate_order$data } from "__generated__/SellerReplyEstimate_order.graphql" import { track as _track } from "app/utils/track" import { Flex, Separator, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface SellerReplyEstimateProps { - order: SellerReplyEstimate_order + order: SellerReplyEstimate_order$data } const getDeliveryEstimateMessage = (displayName: string) => { diff --git a/src/app/Scenes/Inbox/Components/Conversations/Shipping.tsx b/src/app/Scenes/Inbox/Components/Conversations/Shipping.tsx index a9c66eb6867..7cc9f87a5d0 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Shipping.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Shipping.tsx @@ -1,11 +1,11 @@ -import { Shipping_order } from "__generated__/Shipping_order.graphql" +import { Shipping_order$data } from "__generated__/Shipping_order.graphql" import { track as _track } from "app/utils/track" import { Flex, Separator, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ShippingProps { - order: Shipping_order + order: Shipping_order$data } export const Shipping: React.FC = ({ order }) => { diff --git a/src/app/Scenes/Inbox/Screens/Conversation.tsx b/src/app/Scenes/Inbox/Screens/Conversation.tsx index 082cee80c10..b98094e813b 100644 --- a/src/app/Scenes/Inbox/Screens/Conversation.tsx +++ b/src/app/Scenes/Inbox/Screens/Conversation.tsx @@ -1,5 +1,5 @@ import NetInfo from "@react-native-community/netinfo" -import { Conversation_me } from "__generated__/Conversation_me.graphql" +import { Conversation_me$data } from "__generated__/Conversation_me.graphql" import { ConversationQuery } from "__generated__/ConversationQuery.graphql" import ConnectivityBanner from "app/Components/ConnectivityBanner" import { navigationEvents } from "app/navigation/navigate" @@ -42,7 +42,7 @@ const HeaderTextContainer = styled(Flex)` ` interface Props { - me: Conversation_me + me: Conversation_me$data relay: RelayRefetchProp onMessageSent?: (text: string) => void navigator: NavigatorIOS diff --git a/src/app/Scenes/Inbox/Screens/ConversationDetails.tsx b/src/app/Scenes/Inbox/Screens/ConversationDetails.tsx index d2cfa847110..0bc7e161243 100644 --- a/src/app/Scenes/Inbox/Screens/ConversationDetails.tsx +++ b/src/app/Scenes/Inbox/Screens/ConversationDetails.tsx @@ -1,4 +1,4 @@ -import { ConversationDetails_me } from "__generated__/ConversationDetails_me.graphql" +import { ConversationDetails_me$data } from "__generated__/ConversationDetails_me.graphql" import { ConversationDetailsQuery } from "__generated__/ConversationDetailsQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -18,7 +18,7 @@ import { ShippingFragmentContainer } from "../Components/Conversations/Shipping" import { Support } from "../Components/Conversations/Support" interface Props { - me: ConversationDetails_me + me: ConversationDetails_me$data relay: RelayProp } export const ConversationDetails: React.FC = ({ me }) => { diff --git a/src/app/Scenes/LotsByArtistsYouFollow/LotsByArtistsYouFollow.tsx b/src/app/Scenes/LotsByArtistsYouFollow/LotsByArtistsYouFollow.tsx index 3a0ee8bba63..0b06313ca2d 100644 --- a/src/app/Scenes/LotsByArtistsYouFollow/LotsByArtistsYouFollow.tsx +++ b/src/app/Scenes/LotsByArtistsYouFollow/LotsByArtistsYouFollow.tsx @@ -1,4 +1,4 @@ -import { LotsByArtistsYouFollow_me } from "__generated__/LotsByArtistsYouFollow_me.graphql" +import { LotsByArtistsYouFollow_me$data } from "__generated__/LotsByArtistsYouFollow_me.graphql" import { LotsByArtistsYouFollowQuery } from "__generated__/LotsByArtistsYouFollowQuery.graphql" import { InfiniteScrollArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -11,7 +11,7 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp const SCREEN_TITLE = "Auction Lots for You" interface LotsByArtistsYouFollowProps { - me: LotsByArtistsYouFollow_me + me: LotsByArtistsYouFollow_me$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/Map/GlobalMap.tests.tsx b/src/app/Scenes/Map/GlobalMap.tests.tsx index 2a1eb663d88..da517e7001e 100644 --- a/src/app/Scenes/Map/GlobalMap.tests.tsx +++ b/src/app/Scenes/Map/GlobalMap.tests.tsx @@ -37,7 +37,7 @@ xdescribe("GlobalMap", () => { viewer: { city: CityFixture, }, - }, // Enable/fix this when making large change to these components/fixtures: as GlobalMapTestsQueryRawResponse, + }, // Enable/fix this when making large change to these components/fixtures: as GlobalMapTestsQuery, variables: { citySlug: "new-york-ny-usa", maxInt: 42, diff --git a/src/app/Scenes/Map/GlobalMap.tsx b/src/app/Scenes/Map/GlobalMap.tsx index 67e6bdf7fe6..f8e4f25a6ef 100644 --- a/src/app/Scenes/Map/GlobalMap.tsx +++ b/src/app/Scenes/Map/GlobalMap.tsx @@ -1,6 +1,6 @@ import MapboxGL, { MapViewProps, OnPressEvent } from "@react-native-mapbox-gl/maps" import { themeGet } from "@styled-system/theme-get" -import { GlobalMap_viewer } from "__generated__/GlobalMap_viewer.graphql" +import { GlobalMap_viewer$data } from "__generated__/GlobalMap_viewer.graphql" import { Pin } from "app/Icons/Pin" import PinFairSelected from "app/Icons/PinFairSelected" import PinSavedSelected from "app/Icons/PinSavedSelected" @@ -70,7 +70,7 @@ interface Props { /** Should the map buttons be hidden... */ hideMapButtons: boolean /** The map API entry-point */ - viewer?: GlobalMap_viewer + viewer?: GlobalMap_viewer$data /** API stuff */ relay?: RelayProp /** Tracking */ diff --git a/src/app/Scenes/Map/bucketCityResults.ts b/src/app/Scenes/Map/bucketCityResults.ts index 87d44b1f4eb..b0ca55c3f53 100644 --- a/src/app/Scenes/Map/bucketCityResults.ts +++ b/src/app/Scenes/Map/bucketCityResults.ts @@ -1,8 +1,8 @@ -import { GlobalMap_viewer } from "__generated__/GlobalMap_viewer.graphql" +import { GlobalMap_viewer$data } from "__generated__/GlobalMap_viewer.graphql" import { sortBy, uniq } from "lodash" import moment from "moment" -export const bucketCityResults = (viewer: GlobalMap_viewer) => { +export const bucketCityResults = (viewer: GlobalMap_viewer$data) => { // The saved shows needs to be sorted by end_date_asc const now = moment() const oneWeekFromNow = moment(new Date()).add(7, "days") diff --git a/src/app/Scenes/Map/types.ts b/src/app/Scenes/Map/types.ts index 7431564590d..a8f7c22590e 100644 --- a/src/app/Scenes/Map/types.ts +++ b/src/app/Scenes/Map/types.ts @@ -1,4 +1,4 @@ -import { GlobalMap_viewer } from "__generated__/GlobalMap_viewer.graphql" +import { GlobalMap_viewer$data } from "__generated__/GlobalMap_viewer.graphql" import Supercluster from "supercluster" import { BucketKey, BucketResults } from "./bucketCityResults" @@ -14,12 +14,12 @@ export interface City { export type Show = NonNullable< NonNullable< - NonNullable["shows"]>["edges"]>[0] + NonNullable["shows"]>["edges"]>[0] >["node"] > export type Fair = NonNullable< NonNullable< - NonNullable["fairs"]>["edges"]>[0] + NonNullable["fairs"]>["edges"]>[0] >["node"] > & { type?: string } export type FilterTypes = BucketKey | "all" diff --git a/src/app/Scenes/MyAccount/MyAccount.tsx b/src/app/Scenes/MyAccount/MyAccount.tsx index 6788469697e..2a78effc843 100644 --- a/src/app/Scenes/MyAccount/MyAccount.tsx +++ b/src/app/Scenes/MyAccount/MyAccount.tsx @@ -1,4 +1,4 @@ -import { MyAccount_me } from "__generated__/MyAccount_me.graphql" +import { MyAccount_me$data } from "__generated__/MyAccount_me.graphql" import { MyAccountQuery } from "__generated__/MyAccountQuery.graphql" import { MenuItem } from "app/Components/MenuItem" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -17,7 +17,7 @@ import React from "react" import { ActivityIndicator, Image, Platform, ScrollView } from "react-native" import { createFragmentContainer, graphql, QueryRenderer, RelayProp } from "react-relay" -const MyAccount: React.FC<{ me: MyAccount_me; relay: RelayProp }> = ({ me, relay }) => { +const MyAccount: React.FC<{ me: MyAccount_me$data; relay: RelayProp }> = ({ me, relay }) => { const hasOnlyOneAuth = me.authentications.length + (me.hasPassword ? 1 : 0) < 2 const onlyExistingAuthFor = (provider: "FACEBOOK" | "GOOGLE" | "APPLE") => { diff --git a/src/app/Scenes/MyAccount/MyAccountEditEmail.tsx b/src/app/Scenes/MyAccount/MyAccountEditEmail.tsx index 906f0eff343..2e11671d6a4 100644 --- a/src/app/Scenes/MyAccount/MyAccountEditEmail.tsx +++ b/src/app/Scenes/MyAccount/MyAccountEditEmail.tsx @@ -7,14 +7,14 @@ import { Input } from "palette" import React, { useEffect, useRef, useState } from "react" import { createFragmentContainer, graphql, QueryRenderer, RelayProp } from "react-relay" import { string } from "yup" -import { MyAccountEditEmail_me } from "../../../__generated__/MyAccountEditEmail_me.graphql" +import { MyAccountEditEmail_me$data } from "../../../__generated__/MyAccountEditEmail_me.graphql" import { MyAccountFieldEditScreen, MyAccountFieldEditScreenPlaceholder, } from "./Components/MyAccountFieldEditScreen" import { updateMyUserProfile } from "./updateMyUserProfile" -const MyAccountEditEmail: React.FC<{ me: MyAccountEditEmail_me; relay: RelayProp }> = ({ +const MyAccountEditEmail: React.FC<{ me: MyAccountEditEmail_me$data; relay: RelayProp }> = ({ me, relay, }) => { diff --git a/src/app/Scenes/MyAccount/MyAccountEditName.tsx b/src/app/Scenes/MyAccount/MyAccountEditName.tsx index 50b26705292..a22b19ca97a 100644 --- a/src/app/Scenes/MyAccount/MyAccountEditName.tsx +++ b/src/app/Scenes/MyAccount/MyAccountEditName.tsx @@ -5,14 +5,16 @@ import { renderWithPlaceholder } from "app/utils/renderWithPlaceholder" import { Input } from "palette" import React, { useEffect, useRef, useState } from "react" import { createFragmentContainer, graphql, QueryRenderer, RelayProp } from "react-relay" -import { MyAccountEditName_me } from "../../../__generated__/MyAccountEditName_me.graphql" +import { MyAccountEditName_me$data } from "../../../__generated__/MyAccountEditName_me.graphql" import { MyAccountFieldEditScreen, MyAccountFieldEditScreenPlaceholder, } from "./Components/MyAccountFieldEditScreen" import { updateMyUserProfile } from "./updateMyUserProfile" -const MyAccountEditName: React.FC<{ me: MyAccountEditName_me; relay: RelayProp }> = ({ me }) => { +const MyAccountEditName: React.FC<{ me: MyAccountEditName_me$data; relay: RelayProp }> = ({ + me, +}) => { const [name, setName] = useState(me.name ?? "") const [receivedErrors, setReceivedErrors] = useState(undefined) const inputRef = useRef(null) diff --git a/src/app/Scenes/MyAccount/MyAccountEditPhone.tsx b/src/app/Scenes/MyAccount/MyAccountEditPhone.tsx index a04148c54fa..8fca5ec6a89 100644 --- a/src/app/Scenes/MyAccount/MyAccountEditPhone.tsx +++ b/src/app/Scenes/MyAccount/MyAccountEditPhone.tsx @@ -5,14 +5,14 @@ import { renderWithPlaceholder } from "app/utils/renderWithPlaceholder" import { PhoneInput } from "palette/elements/Input/PhoneInput/PhoneInput" import React, { useEffect, useState } from "react" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" -import { MyAccountEditPhone_me } from "../../../__generated__/MyAccountEditPhone_me.graphql" +import { MyAccountEditPhone_me$data } from "../../../__generated__/MyAccountEditPhone_me.graphql" import { MyAccountFieldEditScreen, MyAccountFieldEditScreenPlaceholder, } from "./Components/MyAccountFieldEditScreen" import { updateMyUserProfile } from "./updateMyUserProfile" -const MyAccountEditPhone: React.FC<{ me: MyAccountEditPhone_me }> = ({ me }) => { +const MyAccountEditPhone: React.FC<{ me: MyAccountEditPhone_me$data }> = ({ me }) => { const [phone, setPhone] = useState(me.phone ?? "") const [receivedError, setReceivedError] = useState(undefined) const [isValidNumber, setIsValidNumber] = useState(false) diff --git a/src/app/Scenes/MyBids/ActiveLotStanding.tests.tsx b/src/app/Scenes/MyBids/ActiveLotStanding.tests.tsx index 08993fe83f1..251143f3a25 100644 --- a/src/app/Scenes/MyBids/ActiveLotStanding.tests.tsx +++ b/src/app/Scenes/MyBids/ActiveLotStanding.tests.tsx @@ -1,6 +1,6 @@ import React from "react" -import { ActiveLotStanding_saleArtwork } from "__generated__/ActiveLotStanding_saleArtwork.graphql" +import { ActiveLotStanding_saleArtwork$data } from "__generated__/ActiveLotStanding_saleArtwork.graphql" import { extractText } from "app/tests/extractText" import { renderWithWrappers } from "app/tests/renderWithWrappers" import { merge } from "lodash" @@ -29,7 +29,7 @@ const defaultSaleArtwork = { } const saleArtworkFixture = (overrides = {}) => { - return merge({}, defaultSaleArtwork, overrides) as unknown as ActiveLotStanding_saleArtwork + return merge({}, defaultSaleArtwork, overrides) as unknown as ActiveLotStanding_saleArtwork$data } describe(ActiveLotStanding, () => { diff --git a/src/app/Scenes/MyBids/ClosedLotStanding.tests.tsx b/src/app/Scenes/MyBids/ClosedLotStanding.tests.tsx index fa7898618c2..243c273e1fc 100644 --- a/src/app/Scenes/MyBids/ClosedLotStanding.tests.tsx +++ b/src/app/Scenes/MyBids/ClosedLotStanding.tests.tsx @@ -1,4 +1,4 @@ -import { ClosedLotStanding_saleArtwork } from "__generated__/ClosedLotStanding_saleArtwork.graphql" +import { ClosedLotStanding_saleArtwork$data } from "__generated__/ClosedLotStanding_saleArtwork.graphql" import { extractText } from "app/tests/extractText" import { renderWithWrappers } from "app/tests/renderWithWrappers" import { merge } from "lodash" @@ -29,7 +29,7 @@ const defaultSaleArtwork = { } const saleArtworkFixture = (overrides = {}) => { - return merge({}, defaultSaleArtwork, overrides) as unknown as ClosedLotStanding_saleArtwork + return merge({}, defaultSaleArtwork, overrides) as unknown as ClosedLotStanding_saleArtwork$data } describe(ClosedLotStanding, () => { diff --git a/src/app/Scenes/MyBids/Components/ActiveLotStanding.tsx b/src/app/Scenes/MyBids/Components/ActiveLotStanding.tsx index 32b4212acf5..f7c3527bf50 100644 --- a/src/app/Scenes/MyBids/Components/ActiveLotStanding.tsx +++ b/src/app/Scenes/MyBids/Components/ActiveLotStanding.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { ActiveLotStanding_saleArtwork } from "__generated__/ActiveLotStanding_saleArtwork.graphql" +import { ActiveLotStanding_saleArtwork$data } from "__generated__/ActiveLotStanding_saleArtwork.graphql" import { navigate } from "app/navigation/navigate" import { Flex, Text } from "palette" import React from "react" @@ -14,7 +14,7 @@ import { LotFragmentContainer as Lot } from "./Lot" export const ActiveLotStanding = ({ saleArtwork, }: { - saleArtwork: ActiveLotStanding_saleArtwork + saleArtwork: ActiveLotStanding_saleArtwork$data }) => { const timelySale = TimelySale.create(saleArtwork?.sale!) diff --git a/src/app/Scenes/MyBids/Components/ClosedLotStanding.tsx b/src/app/Scenes/MyBids/Components/ClosedLotStanding.tsx index 776e475093d..72a48e3041c 100644 --- a/src/app/Scenes/MyBids/Components/ClosedLotStanding.tsx +++ b/src/app/Scenes/MyBids/Components/ClosedLotStanding.tsx @@ -11,7 +11,7 @@ import { TimelySale } from "../helpers/timely" import { Lost, Passed, Won } from "./BiddingStatuses" import { LotFragmentContainer as Lot } from "./Lot" -import { ClosedLotStanding_saleArtwork } from "../../../../__generated__/ClosedLotStanding_saleArtwork.graphql" +import { ClosedLotStanding_saleArtwork$data } from "../../../../__generated__/ClosedLotStanding_saleArtwork.graphql" type BidderResult = "won" | "lost" | "passed" @@ -34,7 +34,7 @@ export const ClosedLotStanding = ({ inActiveSale = false, testID, }: { - saleArtwork: ClosedLotStanding_saleArtwork + saleArtwork: ClosedLotStanding_saleArtwork$data withTimelyInfo?: boolean inActiveSale?: boolean testID?: string diff --git a/src/app/Scenes/MyBids/Components/Lot.tsx b/src/app/Scenes/MyBids/Components/Lot.tsx index a6f01bbb9f7..22ccfc31cf8 100644 --- a/src/app/Scenes/MyBids/Components/Lot.tsx +++ b/src/app/Scenes/MyBids/Components/Lot.tsx @@ -1,11 +1,11 @@ -import { Lot_saleArtwork } from "__generated__/Lot_saleArtwork.graphql" +import { Lot_saleArtwork$data } from "__generated__/Lot_saleArtwork.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { Box, Flex, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - saleArtwork: Lot_saleArtwork + saleArtwork: Lot_saleArtwork$data /** Something to display below the artist name - defaults to lot number */ subtitle?: string /** An optional 20px^2 badge to display in the upper-left corner of the artwork thumbnail */ diff --git a/src/app/Scenes/MyBids/Components/LotStatusListItem.tsx b/src/app/Scenes/MyBids/Components/LotStatusListItem.tsx index 2218eb3e0f3..b60ff157e12 100644 --- a/src/app/Scenes/MyBids/Components/LotStatusListItem.tsx +++ b/src/app/Scenes/MyBids/Components/LotStatusListItem.tsx @@ -1,13 +1,13 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" -import { LotStatusListItem_saleArtwork } from "../../../../__generated__/LotStatusListItem_saleArtwork.graphql" +import { LotStatusListItem_saleArtwork$data } from "../../../../__generated__/LotStatusListItem_saleArtwork.graphql" import { ActiveLotStandingFragmentContainer } from "./ActiveLotStanding" import { ClosedLotStandingFragmentContainer } from "./ClosedLotStanding" import { WatchedLotFragmentContainer } from "./WatchedLot" interface Props { /** A general lot to display. */ - saleArtwork: LotStatusListItem_saleArtwork + saleArtwork: LotStatusListItem_saleArtwork$data saleIsClosed?: boolean } diff --git a/src/app/Scenes/MyBids/Components/SaleCard.tsx b/src/app/Scenes/MyBids/Components/SaleCard.tsx index 06f173f6c31..13fdf37f103 100644 --- a/src/app/Scenes/MyBids/Components/SaleCard.tsx +++ b/src/app/Scenes/MyBids/Components/SaleCard.tsx @@ -1,6 +1,6 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { SaleCard_me } from "__generated__/SaleCard_me.graphql" -import { SaleCard_sale } from "__generated__/SaleCard_sale.graphql" +import { SaleCard_me$data } from "__generated__/SaleCard_me.graphql" +import { SaleCard_sale$data } from "__generated__/SaleCard_sale.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { SaleInfo } from "app/Scenes/MyBids/Components/SaleInfo" @@ -35,8 +35,8 @@ export const RegistrationCTAWrapper: React.FunctionComponent<{ navLink?: string ) interface SaleCardProps { - sale: SaleCard_sale - me: SaleCard_me + sale: SaleCard_sale$data + me: SaleCard_me$data smallScreen?: boolean hideChildren?: boolean } diff --git a/src/app/Scenes/MyBids/Components/WatchedLot.tsx b/src/app/Scenes/MyBids/Components/WatchedLot.tsx index 16daa52f1b8..cca59902771 100644 --- a/src/app/Scenes/MyBids/Components/WatchedLot.tsx +++ b/src/app/Scenes/MyBids/Components/WatchedLot.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { WatchedLot_saleArtwork } from "__generated__/WatchedLot_saleArtwork.graphql" +import { WatchedLot_saleArtwork$data } from "__generated__/WatchedLot_saleArtwork.graphql" import { navigate } from "app/navigation/navigate" import { Flex, Text } from "palette" import React from "react" @@ -11,7 +11,7 @@ import { Watching } from "./BiddingStatuses" import { LotFragmentContainer as Lot } from "./Lot" interface WatchedLotProps { - saleArtwork: WatchedLot_saleArtwork + saleArtwork: WatchedLot_saleArtwork$data } export const WatchedLot: React.FC = ({ saleArtwork }) => { diff --git a/src/app/Scenes/MyBids/MyBids.tsx b/src/app/Scenes/MyBids/MyBids.tsx index 4a886189a1b..649341fe47c 100644 --- a/src/app/Scenes/MyBids/MyBids.tsx +++ b/src/app/Scenes/MyBids/MyBids.tsx @@ -3,7 +3,7 @@ import React from "react" import { RefreshControl, ScrollView } from "react-native" import { createRefetchContainer, graphql, QueryRenderer, RelayRefetchProp } from "react-relay" -import { MyBids_me } from "__generated__/MyBids_me.graphql" +import { MyBids_me$data } from "__generated__/MyBids_me.graphql" import { MyBidsQuery } from "__generated__/MyBidsQuery.graphql" import { OwnerType } from "@artsy/cohesion" @@ -17,7 +17,7 @@ import { LotStatusListItemContainer } from "./Components/LotStatusListItem" import { NoBids } from "./Components/NoBids" export interface MyBidsProps { - me: MyBids_me + me: MyBids_me$data isActiveTab: boolean relay: RelayRefetchProp } diff --git a/src/app/Scenes/MyCollection/MyCollection.tsx b/src/app/Scenes/MyCollection/MyCollection.tsx index ccc0e672104..2bba005fb1e 100644 --- a/src/app/Scenes/MyCollection/MyCollection.tsx +++ b/src/app/Scenes/MyCollection/MyCollection.tsx @@ -1,7 +1,7 @@ import { addCollectedArtwork, OwnerType } from "@artsy/cohesion" import AsyncStorage from "@react-native-async-storage/async-storage" -import { InfiniteScrollArtworksGrid_myCollectionConnection } from "__generated__/InfiniteScrollArtworksGrid_myCollectionConnection.graphql" -import { MyCollection_me } from "__generated__/MyCollection_me.graphql" +import { InfiniteScrollArtworksGrid_myCollectionConnection$data } from "__generated__/InfiniteScrollArtworksGrid_myCollectionConnection.graphql" +import { MyCollection_me$data } from "__generated__/MyCollection_me.graphql" import { MyCollectionQuery } from "__generated__/MyCollectionQuery.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { ArtworkFiltersStoreProvider } from "app/Components/ArtworkFilter/ArtworkFilterStore" @@ -58,7 +58,7 @@ export const HAS_SEEN_MY_COLLECTION_NEW_WORKS_BANNER = "HAS_SEEN_MY_COLLECTION_N const MyCollection: React.FC<{ relay: RelayPaginationProp - me: MyCollection_me + me: MyCollection_me$data }> = ({ relay, me }) => { const toast = useToast() const { trackEvent } = useTracking() @@ -404,5 +404,5 @@ const tracks = { } export type MyCollectionArtworkEdge = NonNullable< - NonNullable[0] + NonNullable[0] >["node"] diff --git a/src/app/Scenes/MyCollection/MyCollectionArtworks.tsx b/src/app/Scenes/MyCollection/MyCollectionArtworks.tsx index 7e2f239aec1..a3f64486393 100644 --- a/src/app/Scenes/MyCollection/MyCollectionArtworks.tsx +++ b/src/app/Scenes/MyCollection/MyCollectionArtworks.tsx @@ -1,5 +1,5 @@ import { addCollectedArtwork } from "@artsy/cohesion" -import { MyCollection_me } from "__generated__/MyCollection_me.graphql" +import { MyCollection_me$data } from "__generated__/MyCollection_me.graphql" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { FilteredArtworkGridZeroState } from "app/Components/ArtworkGrids/FilteredArtworkGridZeroState" import { InfiniteScrollMyCollectionArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" @@ -26,7 +26,7 @@ import { MyCollectionArtworkEdge } from "./MyCollection" import { localSortAndFilterArtworks } from "./utils/localArtworkSortAndFilter" interface MyCollectionArtworksProps { - me: MyCollection_me + me: MyCollection_me$data relay: RelayPaginationProp innerFlatlistRef?: React.MutableRefObject<{ getNode(): FlatList } | null> } diff --git a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkAbout/MyCollectionArtworkArticles.tsx b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkAbout/MyCollectionArtworkArticles.tsx index f9355bccfbc..06a13124221 100644 --- a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkAbout/MyCollectionArtworkArticles.tsx +++ b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkAbout/MyCollectionArtworkArticles.tsx @@ -1,6 +1,6 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" import { - MyCollectionArtworkArticles_article, + MyCollectionArtworkArticles_article$data, MyCollectionArtworkArticles_article$key, } from "__generated__/MyCollectionArtworkArticles_article.graphql" import { ArticleCardContainer } from "app/Components/ArticleCard" @@ -56,7 +56,7 @@ export const MyCollectionArtworkArticles: React.FC - + testID="test-articles-flatlist" horizontal ItemSeparatorComponent={() => } diff --git a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/MyCollectionArtworkArtistArticles.tsx b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/MyCollectionArtworkArtistArticles.tsx index b396b4dd212..25765f44939 100644 --- a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/MyCollectionArtworkArtistArticles.tsx +++ b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/MyCollectionArtworkArtistArticles.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedShowMore } from "@artsy/cohesion" -import { MyCollectionArtworkArtistArticles_artwork } from "__generated__/MyCollectionArtworkArtistArticles_artwork.graphql" +import { MyCollectionArtworkArtistArticles_artwork$data } from "__generated__/MyCollectionArtworkArtistArticles_artwork.graphql" import { CaretButton } from "app/Components/Buttons/CaretButton" import { navigate } from "app/navigation/navigate" import { ScreenMargin } from "app/Scenes/MyCollection/Components/ScreenMargin" @@ -11,7 +11,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface MyCollectionArtworkArtistArticlesProps { - artwork: MyCollectionArtworkArtistArticles_artwork + artwork: MyCollectionArtworkArtistArticles_artwork$data } const MyCollectionArtworkArtistArticles: React.FC = ( diff --git a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateScreen.tsx b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateScreen.tsx index fdf51a69502..b506d3b1796 100644 --- a/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateScreen.tsx +++ b/src/app/Scenes/MyCollection/Screens/Artwork/Components/ArtworkInsights/RequestForPriceEstimate/RequestForPriceEstimateScreen.tsx @@ -1,7 +1,4 @@ -import { - RequestForPriceEstimateScreenMutation, - RequestForPriceEstimateScreenMutationResponse, -} from "__generated__/RequestForPriceEstimateScreenMutation.graphql" +import { RequestForPriceEstimateScreenMutation } from "__generated__/RequestForPriceEstimateScreenMutation.graphql" import { Toast } from "app/Components/Toast/Toast" import { goBack } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -36,7 +33,7 @@ const ValidationSchema = Yup.object().shape({ export const requestForPriceEstimateMutation = ( environment: Environment, - onCompleted: (response: RequestForPriceEstimateScreenMutationResponse) => void, + onCompleted: (response: RequestForPriceEstimateScreenMutation["response"]) => void, onError: () => void, input: RequestForPriceEstimateFormikSchema & { artworkId: string } ) => { @@ -80,7 +77,7 @@ export const RequestForPriceEstimateScreen: React.FC { const input = { artworkId: artworkID, requesterEmail, requesterName, requesterPhoneNumber } - const onCompleted = (response: RequestForPriceEstimateScreenMutationResponse) => { + const onCompleted = (response: RequestForPriceEstimateScreenMutation["response"]) => { const myCollectionArtworkId = response.requestPriceEstimate?.priceEstimateParamsOrError?.submittedPriceEstimateParams ?.artworkId diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkForm/Components/ArtworkAutosuggestResults.tsx b/src/app/Scenes/MyCollection/Screens/ArtworkForm/Components/ArtworkAutosuggestResults.tsx index 06adc834c6d..6f68c34f91b 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkForm/Components/ArtworkAutosuggestResults.tsx +++ b/src/app/Scenes/MyCollection/Screens/ArtworkForm/Components/ArtworkAutosuggestResults.tsx @@ -1,4 +1,4 @@ -import { ArtworkAutosuggestResults_viewer } from "__generated__/ArtworkAutosuggestResults_viewer.graphql" +import { ArtworkAutosuggestResults_viewer$data } from "__generated__/ArtworkAutosuggestResults_viewer.graphql" import { ArtworkAutosuggestResultsContainerQuery } from "__generated__/ArtworkAutosuggestResultsContainerQuery.graphql" import { GenericGridPlaceholder } from "app/Components/ArtworkGrids/GenericGrid" import { InfiniteScrollArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" @@ -12,7 +12,7 @@ import { createPaginationContainer, graphql, QueryRenderer, RelayPaginationProp import { useScreenDimensions } from "shared/hooks" export interface ArtworkAutosuggestResultsProps { - viewer: ArtworkAutosuggestResults_viewer + viewer: ArtworkAutosuggestResults_viewer$data relay: RelayPaginationProp keyword: string onPress?: (artworkID: string) => void diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx index 7b63a7a662e..d1d397a0f02 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx +++ b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx @@ -1,6 +1,6 @@ import { fireEvent } from "@testing-library/react-native" -import { AutosuggestResultsQueryRawResponse } from "__generated__/AutosuggestResultsQuery.graphql" -import { myCollectionCreateArtworkMutationResponse } from "__generated__/myCollectionCreateArtworkMutation.graphql" +import { AutosuggestResultsQuery } from "__generated__/AutosuggestResultsQuery.graphql" +import { myCollectionCreateArtworkMutation } from "__generated__/myCollectionCreateArtworkMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { Tab } from "app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks" import { @@ -374,7 +374,7 @@ describe("MyCollectionArtworkForm", () => { ) const artworkSlug = "some-slug" - const artworkResponse: myCollectionCreateArtworkMutationResponse = { + const artworkResponse: myCollectionCreateArtworkMutation["response"] = { myCollectionCreateArtwork: { artworkOrError: { artworkEdge: { @@ -612,7 +612,7 @@ const mockArtworkSearchResult = { }, } -const mockArtistSearchResult: AutosuggestResultsQueryRawResponse = { +const mockArtistSearchResult: AutosuggestResultsQuery["rawResponse"] = { results: { edges: [ { diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tsx b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tsx index 7d76fb32cd7..f7867f3f5e4 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tsx +++ b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tsx @@ -3,7 +3,7 @@ import { useActionSheet } from "@expo/react-native-action-sheet" import { NavigationContainer, NavigationContainerRef } from "@react-navigation/native" import { createStackNavigator } from "@react-navigation/stack" import { captureException } from "@sentry/react-native" -import { MyCollectionArtwork_sharedProps } from "__generated__/MyCollectionArtwork_sharedProps.graphql" +import { MyCollectionArtwork_sharedProps$data } from "__generated__/MyCollectionArtwork_sharedProps.graphql" import { LengthUnitPreference } from "__generated__/UserPrefsModelQuery.graphql" import LoadingModal from "app/Components/Modals/LoadingModal" import { goBack } from "app/navigation/navigate" @@ -72,7 +72,7 @@ export type MyCollectionArtworkFormProps = { onSuccess?: () => void } & ( | { mode: "edit" onDelete: () => void - artwork: Omit + artwork: Omit } ) diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionImageUtil.ts b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionImageUtil.ts index 3ec86f2a6ec..6bf4c8f1a75 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionImageUtil.ts +++ b/src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionImageUtil.ts @@ -1,4 +1,4 @@ -import { MyCollectionArtworkHeader_artwork } from "__generated__/MyCollectionArtworkHeader_artwork.graphql" +import { MyCollectionArtworkHeader_artwork$data } from "__generated__/MyCollectionArtworkHeader_artwork.graphql" import { getMeasurements, Size } from "app/Scenes/Artwork/Components/ImageCarousel/geometry" import { getConvertedImageUrlFromS3 } from "app/utils/getConvertedImageUrlFromS3" import { deleteLocalImages, LocalImage, storeLocalImages } from "app/utils/LocalImageStore" @@ -69,7 +69,7 @@ export const isImage = (toCheck: any): toCheck is Image => !!toCheck export const hasImagesStillProcessing = ( mainImage: any, - imagesToCheck: MyCollectionArtworkHeader_artwork["images"] + imagesToCheck: MyCollectionArtworkHeader_artwork$data["images"] ) => { if (!isImage(mainImage) || imageIsProcessing(mainImage, "normalized")) { return true diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkForm/Screens/MyCollectionArtworkFormArtwork.tsx b/src/app/Scenes/MyCollection/Screens/ArtworkForm/Screens/MyCollectionArtworkFormArtwork.tsx index c4ba2071fc7..8ec57abce8c 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkForm/Screens/MyCollectionArtworkFormArtwork.tsx +++ b/src/app/Scenes/MyCollection/Screens/ArtworkForm/Screens/MyCollectionArtworkFormArtwork.tsx @@ -1,9 +1,6 @@ import { ActionType, ContextModule, OwnerType, TappedSkip } from "@artsy/cohesion" import { StackScreenProps } from "@react-navigation/stack" -import { - MyCollectionArtworkFormArtworkQuery, - MyCollectionArtworkFormArtworkQueryResponse, -} from "__generated__/MyCollectionArtworkFormArtworkQuery.graphql" +import { MyCollectionArtworkFormArtworkQuery } from "__generated__/MyCollectionArtworkFormArtworkQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import LoadingModal from "app/Components/Modals/LoadingModal" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -125,7 +122,7 @@ export const MyCollectionArtworkFormArtwork: React.FC< const fetchArtwork = async ( artworkID: string -): Promise => { +): Promise => { const result = await fetchQuery( defaultEnvironment, graphql` diff --git a/src/app/Scenes/MyCollection/Screens/ArtworkList/MyCollectionArtworkGridItem.tsx b/src/app/Scenes/MyCollection/Screens/ArtworkList/MyCollectionArtworkGridItem.tsx index 07a80ed293a..d0d747ff376 100644 --- a/src/app/Scenes/MyCollection/Screens/ArtworkList/MyCollectionArtworkGridItem.tsx +++ b/src/app/Scenes/MyCollection/Screens/ArtworkList/MyCollectionArtworkGridItem.tsx @@ -1,6 +1,6 @@ import { tappedCollectedArtwork } from "@artsy/cohesion" import { themeGet } from "@styled-system/theme-get" -import { MyCollectionArtworkGridItem_artwork } from "__generated__/MyCollectionArtworkGridItem_artwork.graphql" +import { MyCollectionArtworkGridItem_artwork$data } from "__generated__/MyCollectionArtworkGridItem_artwork.graphql" import { DEFAULT_SECTION_MARGIN } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" import HighDemandIcon from "app/Icons/HighDemandIcon" import { navigate } from "app/navigation/navigate" @@ -16,7 +16,7 @@ import styled from "styled-components/native" import { MyCollectionImageView } from "../../Components/MyCollectionImageView" interface MyCollectionArtworkGridItemProps { - artwork: MyCollectionArtworkGridItem_artwork + artwork: MyCollectionArtworkGridItem_artwork$data } const MyCollectionArtworkGridItem: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/MyCollection/State/MyCollectionArtworkModel.tsx b/src/app/Scenes/MyCollection/State/MyCollectionArtworkModel.tsx index 3f7a1bf5ada..ed79713fbb5 100644 --- a/src/app/Scenes/MyCollection/State/MyCollectionArtworkModel.tsx +++ b/src/app/Scenes/MyCollection/State/MyCollectionArtworkModel.tsx @@ -1,4 +1,4 @@ -import { MyCollectionArtwork_sharedProps } from "__generated__/MyCollectionArtwork_sharedProps.graphql" +import { MyCollectionArtwork_sharedProps$data } from "__generated__/MyCollectionArtwork_sharedProps.graphql" import { AutosuggestResult } from "app/Scenes/Search/AutosuggestResults" import { Metric } from "app/Scenes/Search/UserPrefsModel" import { GlobalStoreModel } from "app/store/GlobalStoreModel" @@ -85,7 +85,7 @@ export interface MyCollectionArtworkModel { startEditingArtwork: Thunk< MyCollectionArtworkModel, - Partial & { + Partial & { internalID: string id: string artist: { internalID: string } diff --git a/src/app/Scenes/MyCollection/mutations/deleteArtworkImage.ts b/src/app/Scenes/MyCollection/mutations/deleteArtworkImage.ts index 73619a3e6b2..181bc42e112 100644 --- a/src/app/Scenes/MyCollection/mutations/deleteArtworkImage.ts +++ b/src/app/Scenes/MyCollection/mutations/deleteArtworkImage.ts @@ -1,12 +1,9 @@ -import { - deleteArtworkImageMutation, - deleteArtworkImageMutationResponse, -} from "__generated__/deleteArtworkImageMutation.graphql" +import { deleteArtworkImageMutation } from "__generated__/deleteArtworkImageMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export function deleteArtworkImage(artworkID: string, imageID: string) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` mutation deleteArtworkImageMutation($input: DeleteArtworkImageInput!) { diff --git a/src/app/Scenes/MyCollection/mutations/myCollectionCreateArtwork.ts b/src/app/Scenes/MyCollection/mutations/myCollectionCreateArtwork.ts index d2fee16da13..3c5507e8495 100644 --- a/src/app/Scenes/MyCollection/mutations/myCollectionCreateArtwork.ts +++ b/src/app/Scenes/MyCollection/mutations/myCollectionCreateArtwork.ts @@ -1,15 +1,11 @@ -import { - myCollectionCreateArtworkMutation, - myCollectionCreateArtworkMutationResponse, - myCollectionCreateArtworkMutationVariables, -} from "__generated__/myCollectionCreateArtworkMutation.graphql" +import { myCollectionCreateArtworkMutation } from "__generated__/myCollectionCreateArtworkMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export function myCollectionCreateArtwork( - input: myCollectionCreateArtworkMutationVariables["input"] + input: myCollectionCreateArtworkMutation["variables"]["input"] ) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` mutation myCollectionCreateArtworkMutation($input: MyCollectionCreateArtworkInput!) { diff --git a/src/app/Scenes/MyCollection/mutations/myCollectionDeleteArtwork.ts b/src/app/Scenes/MyCollection/mutations/myCollectionDeleteArtwork.ts index 3befae012b4..b5b042a92f1 100644 --- a/src/app/Scenes/MyCollection/mutations/myCollectionDeleteArtwork.ts +++ b/src/app/Scenes/MyCollection/mutations/myCollectionDeleteArtwork.ts @@ -1,12 +1,9 @@ -import { - myCollectionDeleteArtworkMutation, - myCollectionDeleteArtworkMutationResponse, -} from "__generated__/myCollectionDeleteArtworkMutation.graphql" +import { myCollectionDeleteArtworkMutation } from "__generated__/myCollectionDeleteArtworkMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export function myCollectionDeleteArtwork(artworkId: string) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` mutation myCollectionDeleteArtworkMutation($input: MyCollectionDeleteArtworkInput!) { diff --git a/src/app/Scenes/MyCollection/mutations/myCollectionUpdateArtwork.ts b/src/app/Scenes/MyCollection/mutations/myCollectionUpdateArtwork.ts index 1b7b2301f89..7acf9cc8592 100644 --- a/src/app/Scenes/MyCollection/mutations/myCollectionUpdateArtwork.ts +++ b/src/app/Scenes/MyCollection/mutations/myCollectionUpdateArtwork.ts @@ -1,15 +1,11 @@ -import { - myCollectionUpdateArtworkMutation, - myCollectionUpdateArtworkMutationResponse, - myCollectionUpdateArtworkMutationVariables, -} from "__generated__/myCollectionUpdateArtworkMutation.graphql" +import { myCollectionUpdateArtworkMutation } from "__generated__/myCollectionUpdateArtworkMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export function myCollectionUpdateArtwork( - input: myCollectionUpdateArtworkMutationVariables["input"] + input: myCollectionUpdateArtworkMutation["variables"]["input"] ) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` mutation myCollectionUpdateArtworkMutation($input: MyCollectionUpdateArtworkInput!) { diff --git a/src/app/Scenes/MyCollection/utils/initializeSubmissionArtworkForm.ts b/src/app/Scenes/MyCollection/utils/initializeSubmissionArtworkForm.ts index 9a7694f8b8e..dc9745e85de 100644 --- a/src/app/Scenes/MyCollection/utils/initializeSubmissionArtworkForm.ts +++ b/src/app/Scenes/MyCollection/utils/initializeSubmissionArtworkForm.ts @@ -1,8 +1,8 @@ -import { MyCollectionWhySell_artwork } from "__generated__/MyCollectionWhySell_artwork.graphql" +import { MyCollectionWhySell_artwork$data } from "__generated__/MyCollectionWhySell_artwork.graphql" import { GlobalStore } from "app/store/GlobalStore" import { getAttributionClassValueByName } from "app/utils/artworkRarityClassifications" -export const initializeSubmissionArtworkForm = (artwork: MyCollectionWhySell_artwork) => { +export const initializeSubmissionArtworkForm = (artwork: MyCollectionWhySell_artwork$data) => { GlobalStore.actions.artworkSubmission.submission.resetSessionState() GlobalStore.actions.artworkSubmission.submission.initializeArtworkDetailsForm({ diff --git a/src/app/Scenes/MyProfile/LoggedInUserInfo.tsx b/src/app/Scenes/MyProfile/LoggedInUserInfo.tsx index 1cdbb80a9c6..4941ef9b843 100644 --- a/src/app/Scenes/MyProfile/LoggedInUserInfo.tsx +++ b/src/app/Scenes/MyProfile/LoggedInUserInfo.tsx @@ -1,4 +1,4 @@ -import { LoggedInUserInfo_me } from "__generated__/LoggedInUserInfo_me.graphql" +import { LoggedInUserInfo_me$data } from "__generated__/LoggedInUserInfo_me.graphql" import { LoggedInUserInfoQuery } from "__generated__/LoggedInUserInfoQuery.graphql" import Spinner from "app/Components/Spinner" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -7,7 +7,7 @@ import React from "react" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" interface UserProfileProps { - me: LoggedInUserInfo_me + me: LoggedInUserInfo_me$data } class UserProfile extends React.Component { diff --git a/src/app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks.tsx b/src/app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks.tsx index cbd92802670..5447d5c20ce 100644 --- a/src/app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks.tsx +++ b/src/app/Scenes/MyProfile/MyProfileHeaderMyCollectionAndSavedWorks.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { MyProfileHeaderMyCollectionAndSavedWorks_me } from "__generated__/MyProfileHeaderMyCollectionAndSavedWorks_me.graphql" +import { MyProfileHeaderMyCollectionAndSavedWorks_me$data } from "__generated__/MyProfileHeaderMyCollectionAndSavedWorks_me.graphql" import { MyProfileHeaderMyCollectionAndSavedWorksQuery } from "__generated__/MyProfileHeaderMyCollectionAndSavedWorksQuery.graphql" import { StickyTabPage } from "app/Components/StickyTabPage/StickyTabPage" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -24,7 +24,7 @@ export enum Tab { } export const MyProfileHeaderMyCollectionAndSavedWorks: React.FC<{ - me: MyProfileHeaderMyCollectionAndSavedWorks_me + me: MyProfileHeaderMyCollectionAndSavedWorks_me$data }> = ({ me }) => { // We are using unsafe_getfeatureflag here because we want to avoid breaking the rule of hooks // inside the StickyTabPage diff --git a/src/app/Scenes/MyProfile/MyProfilePayment.tsx b/src/app/Scenes/MyProfile/MyProfilePayment.tsx index ad5a6d70ec6..cb86bd66082 100644 --- a/src/app/Scenes/MyProfile/MyProfilePayment.tsx +++ b/src/app/Scenes/MyProfile/MyProfilePayment.tsx @@ -1,4 +1,4 @@ -import { MyProfilePayment_me } from "__generated__/MyProfilePayment_me.graphql" +import { MyProfilePayment_me$data } from "__generated__/MyProfilePayment_me.graphql" import { MyProfilePaymentDeleteCardMutation } from "__generated__/MyProfilePaymentDeleteCardMutation.graphql" import { MyProfilePaymentQuery } from "__generated__/MyProfilePaymentQuery.graphql" import { CreditCardDetailsContainer } from "app/Components/CreditCardDetails" @@ -37,7 +37,7 @@ const NUM_CARDS_TO_FETCH = 100 // stupidly high because most people will have 1 // tslint:disable-next-line:variable-name export let __triggerRefresh: null | (() => Promise) = null -const MyProfilePayment: React.FC<{ me: MyProfilePayment_me; relay: RelayPaginationProp }> = ({ +const MyProfilePayment: React.FC<{ me: MyProfilePayment_me$data; relay: RelayPaginationProp }> = ({ relay, me, }) => { diff --git a/src/app/Scenes/MyProfile/MyProfilePushNotifications.tsx b/src/app/Scenes/MyProfile/MyProfilePushNotifications.tsx index b43fe04c152..fcbfdc17bb1 100644 --- a/src/app/Scenes/MyProfile/MyProfilePushNotifications.tsx +++ b/src/app/Scenes/MyProfile/MyProfilePushNotifications.tsx @@ -1,4 +1,4 @@ -import { MyProfilePushNotifications_me } from "__generated__/MyProfilePushNotifications_me.graphql" +import { MyProfilePushNotifications_me$data } from "__generated__/MyProfilePushNotifications_me.graphql" import { MyProfilePushNotificationsQuery } from "__generated__/MyProfilePushNotificationsQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { SwitchMenu } from "app/Components/SwitchMenu" @@ -109,14 +109,14 @@ const NotificationPermissionsBox = ({ ) export const MyProfilePushNotifications: React.FC<{ - me: MyProfilePushNotifications_me + me: MyProfilePushNotifications_me$data relay: RelayRefetchProp isLoading: boolean }> = ({ me, relay, isLoading = false }) => { const [notificationAuthorizationStatus, setNotificationAuthorizationStatus] = useState(PushAuthorizationStatus.NotDetermined) const [userNotificationSettings, setUserNotificationSettings] = - useState(me) + useState(me) const [isRefreshing, setIsRefreshing] = useState(false) useEffect(() => { @@ -161,7 +161,7 @@ export const MyProfilePushNotifications: React.FC<{ ) const updateNotificationPermissions = useCallback( - debounce(async (updatedPermissions: MyProfilePushNotifications_me) => { + debounce(async (updatedPermissions: MyProfilePushNotifications_me$data) => { await updateMyUserProfile(updatedPermissions) }, 500), [] diff --git a/src/app/Scenes/NewWorksForYou/NewWorksForYou.tsx b/src/app/Scenes/NewWorksForYou/NewWorksForYou.tsx index 06ac929611d..bc3a3466e76 100644 --- a/src/app/Scenes/NewWorksForYou/NewWorksForYou.tsx +++ b/src/app/Scenes/NewWorksForYou/NewWorksForYou.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { NewWorksForYou_me } from "__generated__/NewWorksForYou_me.graphql" +import { NewWorksForYou_me$data } from "__generated__/NewWorksForYou_me.graphql" import { NewWorksForYouQuery } from "__generated__/NewWorksForYouQuery.graphql" import { InfiniteScrollArtworksGridContainer } from "app/Components/ArtworkGrids/InfiniteScrollArtworksGrid" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -17,7 +17,7 @@ const PAGE_SIZE = 10 interface NewWorksForYouProps { relay: RelayPaginationProp - me: NewWorksForYou_me + me: NewWorksForYou_me$data } const NewWorksForYou: React.FC = ({ me, relay }) => { diff --git a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tests.tsx b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tests.tsx index f21470ed425..6b6a618976e 100644 --- a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tests.tsx +++ b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tests.tsx @@ -1,4 +1,4 @@ -import { OnboardingPersonalization_highlights } from "__generated__/OnboardingPersonalization_highlights.graphql" +import { OnboardingPersonalization_highlights$data } from "__generated__/OnboardingPersonalization_highlights.graphql" import { OnboardingPersonalizationTestsQuery } from "__generated__/OnboardingPersonalizationTestsQuery.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { __globalStoreTestUtils__ } from "app/store/GlobalStore" @@ -36,8 +36,8 @@ describe("OnboardingPersonalizationList", () => { if (props?.highlights) { return ( diff --git a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tsx b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tsx index 6ea099894e1..a57ab857d93 100644 --- a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tsx +++ b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalization.tsx @@ -1,6 +1,6 @@ import { NavigationContainer } from "@react-navigation/native" import { createStackNavigator, StackScreenProps, TransitionPresets } from "@react-navigation/stack" -import { OnboardingPersonalization_highlights } from "__generated__/OnboardingPersonalization_highlights.graphql" +import { OnboardingPersonalization_highlights$data } from "__generated__/OnboardingPersonalization_highlights.graphql" import { OnboardingPersonalizationListQuery } from "__generated__/OnboardingPersonalizationListQuery.graphql" import { ArtistListItemContainer as ArtistListItem, @@ -58,7 +58,7 @@ interface OnboardingPersonalizationListNavigationProps > {} interface OnboardingPersonalizationListProps extends OnboardingPersonalizationListNavigationProps { - highlights: OnboardingPersonalization_highlights + highlights: OnboardingPersonalization_highlights$data } const OnboardingPersonalizationListHeader = ({ diff --git a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationArtistListItem.tsx b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationArtistListItem.tsx index 81db484f85a..459eaf2a195 100644 --- a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationArtistListItem.tsx +++ b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationArtistListItem.tsx @@ -2,7 +2,7 @@ * This file is an exact copy of /Users/mounirdhahri/work/eigen/src/app/Components/ArtistListItem.tsx * We needed it because relay still do not support named fragment spreads for search */ -import { OnboardingPersonalizationModal_artists } from "__generated__/OnboardingPersonalizationModal_artists.graphql" +import { OnboardingPersonalizationModal_artists$data } from "__generated__/OnboardingPersonalizationModal_artists.graphql" import { followArtistMutation } from "app/Components/ArtistListItem" import { navigate } from "app/navigation/navigate" import { Schema, track } from "app/utils/track" @@ -16,7 +16,7 @@ interface Props { NonNullable< NonNullable< NonNullable< - NonNullable["edges"] + NonNullable["edges"] >[0] > >["node"] diff --git a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationModal.tsx b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationModal.tsx index 17c28114fbb..48ed3c9af65 100644 --- a/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationModal.tsx +++ b/src/app/Scenes/Onboarding/OnboardingPersonalization/OnboardingPersonalizationModal.tsx @@ -1,6 +1,6 @@ import { StackScreenProps } from "@react-navigation/stack" import { captureMessage } from "@sentry/react-native" -import { OnboardingPersonalizationModal_artists } from "__generated__/OnboardingPersonalizationModal_artists.graphql" +import { OnboardingPersonalizationModal_artists$data } from "__generated__/OnboardingPersonalizationModal_artists.graphql" import { OnboardingPersonalizationModalQuery } from "__generated__/OnboardingPersonalizationModalQuery.graphql" import { SearchInput } from "app/Components/SearchInput" import { BackButton } from "app/navigation/BackButton" @@ -24,7 +24,7 @@ interface OnboardingPersonalizationModalNavigationProps > {} interface OnboardingPersonalizationListProps extends OnboardingPersonalizationModalNavigationProps { - artists: OnboardingPersonalizationModal_artists + artists: OnboardingPersonalizationModal_artists$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/ArtworkInfoSection.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/ArtworkInfoSection.tsx index ace880f5b50..9fe88cb0aca 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/ArtworkInfoSection.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/ArtworkInfoSection.tsx @@ -1,4 +1,4 @@ -import { ArtworkInfoSection_artwork } from "__generated__/ArtworkInfoSection_artwork.graphql" +import { ArtworkInfoSection_artwork$data } from "__generated__/ArtworkInfoSection_artwork.graphql" import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules" import { extractNodes } from "app/utils/extractNodes" import { Box, Flex, Text } from "palette" @@ -7,7 +7,7 @@ import { Image } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface Props { - artwork: ArtworkInfoSection_artwork + artwork: ArtworkInfoSection_artwork$data } export const ArtworkInfoSection: React.FC = ({ artwork }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetails.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetails.tsx index f9521938426..9fbcb564e90 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetails.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetails.tsx @@ -1,4 +1,4 @@ -import { OrderDetails_order } from "__generated__/OrderDetails_order.graphql" +import { OrderDetails_order$data } from "__generated__/OrderDetails_order.graphql" import { OrderDetailsQuery } from "__generated__/OrderDetailsQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -18,7 +18,7 @@ import { SummarySectionFragmentContainer } from "./SummarySection" import { TrackOrderSectionFragmentContainer } from "./TrackOrderSection" export interface OrderDetailsProps { - order: OrderDetails_order + order: OrderDetails_order$data } export interface SectionListItem { key: string diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsHeader.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsHeader.tsx index bae7dd94392..4523255fa23 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsHeader.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsHeader.tsx @@ -1,4 +1,4 @@ -import { OrderDetailsHeader_info } from "__generated__/OrderDetailsHeader_info.graphql" +import { OrderDetailsHeader_info$data } from "__generated__/OrderDetailsHeader_info.graphql" import { extractNodes } from "app/utils/extractNodes" import { getOrderStatus, OrderState } from "app/utils/getOrderStatus" import { DateTime } from "luxon" @@ -7,7 +7,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - info: OrderDetailsHeader_info + info: OrderDetailsHeader_info$data } export const OrderDetailsHeader: React.FC = ({ info }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsPayment.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsPayment.tsx index 8a1a18f15c4..2dcbf0a2c24 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsPayment.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/OrderDetailsPayment.tsx @@ -1,10 +1,10 @@ -import { OrderDetailsPayment_order } from "__generated__/OrderDetailsPayment_order.graphql" +import { OrderDetailsPayment_order$data } from "__generated__/OrderDetailsPayment_order.graphql" import { Box, CreditCardIcon, Flex, Text, useSpace } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface OrderDetailsPaymentProps { - order: OrderDetailsPayment_order + order: OrderDetailsPayment_order$data } const CreditCardDetails: React.FC = ({ order }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/ShipsToSection.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/ShipsToSection.tsx index 2bf6237dc80..2abefffa544 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/ShipsToSection.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/ShipsToSection.tsx @@ -1,11 +1,11 @@ -import { ShipsToSection_address } from "__generated__/ShipsToSection_address.graphql" +import { ShipsToSection_address$data } from "__generated__/ShipsToSection_address.graphql" import { COUNTRY_SELECT_OPTIONS } from "app/Components/CountrySelect" import { Box, Flex, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - address: ShipsToSection_address + address: ShipsToSection_address$data } export const ShipsToSection: React.FC = ({ address }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/SoldBySection.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/SoldBySection.tsx index f9a0d3620a8..0294b4a0b53 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/SoldBySection.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/SoldBySection.tsx @@ -1,4 +1,4 @@ -import { SoldBySection_soldBy } from "__generated__/SoldBySection_soldBy.graphql" +import { SoldBySection_soldBy$data } from "__generated__/SoldBySection_soldBy.graphql" import { extractNodes } from "app/utils/extractNodes" import { DateTime } from "luxon" import { Box, Text } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - soldBy: SoldBySection_soldBy + soldBy: SoldBySection_soldBy$data } export const SoldBySection: React.FC = ({ soldBy }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/SummarySection.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/SummarySection.tsx index 29524ff20d8..c65c243d387 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/SummarySection.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/SummarySection.tsx @@ -1,11 +1,11 @@ -import { SummarySection_section } from "__generated__/SummarySection_section.graphql" +import { SummarySection_section$data } from "__generated__/SummarySection_section.graphql" import { extractNodes } from "app/utils/extractNodes" import { Flex, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - section: SummarySection_section + section: SummarySection_section$data } export const SummarySection: React.FC = ({ section }) => { diff --git a/src/app/Scenes/OrderHistory/OrderDetails/Components/TrackOrderSection.tsx b/src/app/Scenes/OrderHistory/OrderDetails/Components/TrackOrderSection.tsx index 23581a6161e..b88e1035134 100644 --- a/src/app/Scenes/OrderHistory/OrderDetails/Components/TrackOrderSection.tsx +++ b/src/app/Scenes/OrderHistory/OrderDetails/Components/TrackOrderSection.tsx @@ -1,4 +1,4 @@ -import { TrackOrderSection_section } from "__generated__/TrackOrderSection_section.graphql" +import { TrackOrderSection_section$data } from "__generated__/TrackOrderSection_section.graphql" import { extractNodes } from "app/utils/extractNodes" import { getOrderStatus, OrderState } from "app/utils/getOrderStatus" import { getTrackingUrl } from "app/utils/getTrackingUrl" @@ -8,7 +8,7 @@ import { Linking } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface Props { - section: TrackOrderSection_section + section: TrackOrderSection_section$data } export const TrackOrderSection: React.FC = ({ section }) => { diff --git a/src/app/Scenes/OrderHistory/OrderHistory.tsx b/src/app/Scenes/OrderHistory/OrderHistory.tsx index 8f9db7dbf87..ff442d9b7dc 100644 --- a/src/app/Scenes/OrderHistory/OrderHistory.tsx +++ b/src/app/Scenes/OrderHistory/OrderHistory.tsx @@ -1,4 +1,4 @@ -import { OrderHistory_me } from "__generated__/OrderHistory_me.graphql" +import { OrderHistory_me$data } from "__generated__/OrderHistory_me.graphql" import { OrderHistoryQuery } from "__generated__/OrderHistoryQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -14,7 +14,7 @@ import { OrderHistoryRowContainer } from "./OrderHistoryRow" const NUM_ORDERS_TO_FETCH = 10 -export const OrderHistory: React.FC<{ me: OrderHistory_me; relay: RelayPaginationProp }> = ({ +export const OrderHistory: React.FC<{ me: OrderHistory_me$data; relay: RelayPaginationProp }> = ({ relay, me, }) => { diff --git a/src/app/Scenes/OrderHistory/OrderHistoryRow.tsx b/src/app/Scenes/OrderHistory/OrderHistoryRow.tsx index ec41031925b..859a0a7028f 100644 --- a/src/app/Scenes/OrderHistory/OrderHistoryRow.tsx +++ b/src/app/Scenes/OrderHistory/OrderHistoryRow.tsx @@ -1,4 +1,4 @@ -import { OrderHistoryRow_order } from "__generated__/OrderHistoryRow_order.graphql" +import { OrderHistoryRow_order$data } from "__generated__/OrderHistoryRow_order.graphql" import { navigate } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" import { getOrderStatus, OrderState } from "app/utils/getOrderStatus" @@ -10,7 +10,7 @@ import { Image, Linking } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface OrderHistoryRowProps { - order: OrderHistoryRow_order + order: OrderHistoryRow_order$data } export const OrderHistoryRow: React.FC = ({ order }) => { diff --git a/src/app/Scenes/Partner/Components/PartnerArtwork.tsx b/src/app/Scenes/Partner/Components/PartnerArtwork.tsx index b9c82770f1e..83c4aa9802a 100644 --- a/src/app/Scenes/Partner/Components/PartnerArtwork.tsx +++ b/src/app/Scenes/Partner/Components/PartnerArtwork.tsx @@ -1,4 +1,4 @@ -import { PartnerArtwork_partner } from "__generated__/PartnerArtwork_partner.graphql" +import { PartnerArtwork_partner$data } from "__generated__/PartnerArtwork_partner.graphql" import { AnimatedArtworkFilterButton, ArtworkFilterNavigator, @@ -14,7 +14,7 @@ import React, { useState } from "react" import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" export const PartnerArtwork: React.FC<{ - partner: PartnerArtwork_partner + partner: PartnerArtwork_partner$data relay: RelayPaginationProp }> = ({ partner, relay }) => { useArtworkFilters({ diff --git a/src/app/Scenes/Partner/Components/PartnerFollowButton.tsx b/src/app/Scenes/Partner/Components/PartnerFollowButton.tsx index 3b380f87f76..88e69860cdc 100644 --- a/src/app/Scenes/Partner/Components/PartnerFollowButton.tsx +++ b/src/app/Scenes/Partner/Components/PartnerFollowButton.tsx @@ -1,4 +1,4 @@ -import { PartnerFollowButton_partner } from "__generated__/PartnerFollowButton_partner.graphql" +import { PartnerFollowButton_partner$data } from "__generated__/PartnerFollowButton_partner.graphql" import { PartnerFollowButtonFollowMutation } from "__generated__/PartnerFollowButtonFollowMutation.graphql" import { Schema, Track, track as _track } from "app/utils/track" import { ButtonProps, FollowButton } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { commitMutation, createFragmentContainer, graphql, RelayProp } from "react-relay" interface Props { - partner: PartnerFollowButton_partner + partner: PartnerFollowButton_partner$data relay: RelayProp size?: ButtonProps["size"] } diff --git a/src/app/Scenes/Partner/Components/PartnerHeader.tsx b/src/app/Scenes/Partner/Components/PartnerHeader.tsx index 80672c72001..be6af7eb289 100644 --- a/src/app/Scenes/Partner/Components/PartnerHeader.tsx +++ b/src/app/Scenes/Partner/Components/PartnerHeader.tsx @@ -1,4 +1,4 @@ -import { PartnerHeader_partner } from "__generated__/PartnerHeader_partner.graphql" +import { PartnerHeader_partner$data } from "__generated__/PartnerHeader_partner.graphql" import { PartnerBanner } from "app/Components/PartnerBanner" import { Stack } from "app/Components/Stack" import { formatLargeNumberOfItems } from "app/utils/formatLargeNumberOfItems" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { PartnerFollowButtonFragmentContainer as FollowButton } from "./PartnerFollowButton" const PartnerHeader: React.FC<{ - partner: PartnerHeader_partner + partner: PartnerHeader_partner$data }> = ({ partner }) => { const eligibleArtworks = partner.counts?.eligibleArtworks ?? 0 diff --git a/src/app/Scenes/Partner/Components/PartnerLocationSection.tests.tsx b/src/app/Scenes/Partner/Components/PartnerLocationSection.tests.tsx index 33bcd07f00d..04257ba856c 100644 --- a/src/app/Scenes/Partner/Components/PartnerLocationSection.tests.tsx +++ b/src/app/Scenes/Partner/Components/PartnerLocationSection.tests.tsx @@ -1,6 +1,7 @@ -import { PartnerLocationSection_partner } from "__generated__/PartnerLocationSection_partner.graphql" +import { PartnerLocationSection_partner$data } from "__generated__/PartnerLocationSection_partner.graphql" import { GlobalStoreProvider } from "app/store/GlobalStore" import { renderRelayTree } from "app/tests/renderRelayTree" +import { CleanRelayFragment } from "app/utils/relayHelpers" import { Theme } from "palette" import React from "react" import { graphql } from "react-relay" @@ -20,7 +21,7 @@ const PartnerLocationSectionFixture = { } describe("PartnerLoationSection", () => { - const getWrapper = async (partner: Omit) => + const getWrapper = async (partner: CleanRelayFragment) => await renderRelayTree({ Component: (props: any) => { return ( diff --git a/src/app/Scenes/Partner/Components/PartnerLocationSection.tsx b/src/app/Scenes/Partner/Components/PartnerLocationSection.tsx index b2f39aa01e2..9713f290bac 100644 --- a/src/app/Scenes/Partner/Components/PartnerLocationSection.tsx +++ b/src/app/Scenes/Partner/Components/PartnerLocationSection.tsx @@ -1,4 +1,4 @@ -import { PartnerLocationSection_partner } from "__generated__/PartnerLocationSection_partner.graphql" +import { PartnerLocationSection_partner$data } from "__generated__/PartnerLocationSection_partner.graphql" import { navigate } from "app/navigation/navigate" import { get } from "app/utils/get" import { Button, Sans, Spacer } from "palette" @@ -6,10 +6,10 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - partner: PartnerLocationSection_partner + partner: PartnerLocationSection_partner$data } -const createLocationsString = (partner: PartnerLocationSection_partner) => { +const createLocationsString = (partner: PartnerLocationSection_partner$data) => { const locationsCount = partner.locations?.totalCount let lastUniqCity const uniqCities = (partner.cities || []).slice(0) diff --git a/src/app/Scenes/Partner/Components/PartnerMap.tsx b/src/app/Scenes/Partner/Components/PartnerMap.tsx index 8786719c8f6..34e3516bd72 100644 --- a/src/app/Scenes/Partner/Components/PartnerMap.tsx +++ b/src/app/Scenes/Partner/Components/PartnerMap.tsx @@ -1,7 +1,7 @@ import { useActionSheet } from "@expo/react-native-action-sheet" import MapboxGL from "@react-native-mapbox-gl/maps" import { themeGet } from "@styled-system/theme-get" -import { PartnerMap_location } from "__generated__/PartnerMap_location.graphql" +import { PartnerMap_location$data } from "__generated__/PartnerMap_location.graphql" import { cityAndPostalCode, tappedOnMap } from "app/Components/LocationMap/LocationMap" import { Pin } from "app/Icons/Pin" import { ArtsyMapStyleURL } from "app/Scenes/Map/GlobalMap" @@ -15,7 +15,7 @@ import styled from "styled-components/native" MapboxGL.setAccessToken(Config.MAPBOX_API_CLIENT_KEY) const PartnerMap: React.FC<{ - location: PartnerMap_location + location: PartnerMap_location$data }> = ({ location }) => { const { address, address2, city, postalCode, internalID } = location let { lat, lng } = location.coordinates ?? { lat: null, lng: null } diff --git a/src/app/Scenes/Partner/Components/PartnerOverview.tests.tsx b/src/app/Scenes/Partner/Components/PartnerOverview.tests.tsx index 290000abcd0..5513a47c7cc 100644 --- a/src/app/Scenes/Partner/Components/PartnerOverview.tests.tsx +++ b/src/app/Scenes/Partner/Components/PartnerOverview.tests.tsx @@ -1,7 +1,4 @@ -import { - PartnerOverviewTestsQuery, - PartnerOverviewTestsQueryRawResponse, -} from "__generated__/PartnerOverviewTestsQuery.graphql" +import { PartnerOverviewTestsQuery } from "__generated__/PartnerOverviewTestsQuery.graphql" import { ArtistListItem } from "app/Components/ArtistListItem" import { StickyTabPage } from "app/Components/StickyTabPage/StickyTabPage" import { extractText } from "app/tests/extractText" @@ -14,7 +11,7 @@ import { PartnerOverviewFragmentContainer as PartnerOverview } from "./PartnerOv jest.unmock("react-relay") -const PartnerOverviewFixture: NonNullable = { +const PartnerOverviewFixture: NonNullable = { id: "293032r423", slug: "gagosian", internalID: "4d8b92c44eb68a1b2c0004cb", @@ -144,7 +141,7 @@ describe("PartnerOverview", () => { }) const artists: NonNullable< - NonNullable["artists"] + NonNullable["artists"] >["edges"] = [ { cursor: "a", diff --git a/src/app/Scenes/Partner/Components/PartnerOverview.tsx b/src/app/Scenes/Partner/Components/PartnerOverview.tsx index aeb9005ac06..e9c20ac5155 100644 --- a/src/app/Scenes/Partner/Components/PartnerOverview.tsx +++ b/src/app/Scenes/Partner/Components/PartnerOverview.tsx @@ -1,4 +1,4 @@ -import { PartnerOverview_partner } from "__generated__/PartnerOverview_partner.graphql" +import { PartnerOverview_partner$data } from "__generated__/PartnerOverview_partner.graphql" import { ArtistListItemContainer as ArtistListItem } from "app/Components/ArtistListItem" import { ReadMore } from "app/Components/ReadMore" import Spinner from "app/Components/Spinner" @@ -14,7 +14,7 @@ import { PartnerLocationSectionContainer as PartnerLocationSection } from "./Par const PAGE_SIZE = 10 export const PartnerOverview: React.FC<{ - partner: PartnerOverview_partner + partner: PartnerOverview_partner$data relay: RelayPaginationProp }> = ({ partner, relay }) => { const [fetchingNextPage, setFetchingNextPage] = useState(false) diff --git a/src/app/Scenes/Partner/Components/PartnerShowRailItem.tsx b/src/app/Scenes/Partner/Components/PartnerShowRailItem.tsx index d3b8b0083cd..f2b0b6fddb9 100644 --- a/src/app/Scenes/Partner/Components/PartnerShowRailItem.tsx +++ b/src/app/Scenes/Partner/Components/PartnerShowRailItem.tsx @@ -1,4 +1,4 @@ -import { PartnerShowRailItem_show } from "__generated__/PartnerShowRailItem_show.graphql" +import { PartnerShowRailItem_show$data } from "__generated__/PartnerShowRailItem_show.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" import { exhibitionDates } from "app/Scenes/Map/exhibitionPeriodParser" @@ -17,7 +17,7 @@ const ImageView = styled(OpaqueImageView)` ` interface Props { - show: PartnerShowRailItem_show + show: PartnerShowRailItem_show$data } @track() diff --git a/src/app/Scenes/Partner/Components/PartnerShows.tests.tsx b/src/app/Scenes/Partner/Components/PartnerShows.tests.tsx index e26e5cd89d5..789009e625c 100644 --- a/src/app/Scenes/Partner/Components/PartnerShows.tests.tsx +++ b/src/app/Scenes/Partner/Components/PartnerShows.tests.tsx @@ -1,7 +1,4 @@ -import { - PartnerShowsTestsQuery, - PartnerShowsTestsQueryRawResponse, -} from "__generated__/PartnerShowsTestsQuery.graphql" +import { PartnerShowsTestsQuery } from "__generated__/PartnerShowsTestsQuery.graphql" import { StickyTabPage } from "app/Components/StickyTabPage/StickyTabPage" import { mockEnvironmentPayload } from "app/tests/mockEnvironmentPayload" import { renderWithWrappersTL } from "app/tests/renderWithWrappers" @@ -96,7 +93,7 @@ describe("PartnerShows", () => { }) }) -const PartnerShowsFixture: PartnerShowsTestsQueryRawResponse["partner"] = { +const PartnerShowsFixture: PartnerShowsTestsQuery["rawResponse"]["partner"] = { id: "gagosian-id", slug: "gagosian", internalID: "4d8b92c44eb68a1b2c0004cb", diff --git a/src/app/Scenes/Partner/Components/PartnerShows.tsx b/src/app/Scenes/Partner/Components/PartnerShows.tsx index eb440a5ce92..b296e705fed 100644 --- a/src/app/Scenes/Partner/Components/PartnerShows.tsx +++ b/src/app/Scenes/Partner/Components/PartnerShows.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { PartnerShows_partner } from "__generated__/PartnerShows_partner.graphql" +import { PartnerShows_partner$data } from "__generated__/PartnerShows_partner.graphql" import { useNativeValue } from "app/Components/StickyTabPage/reanimatedHelpers" import { StickyTabPageFlatList, @@ -20,7 +20,9 @@ const PAGE_SIZE = 32 interface ShowGridItemProps { show: NonNullable< - NonNullable["edges"]>[0]>["node"] + NonNullable< + NonNullable["edges"]>[0] + >["node"] > itemIndex: number } @@ -70,7 +72,7 @@ class ShowGridItem extends React.Component { } export const PartnerShows: React.FC<{ - partner: PartnerShows_partner + partner: PartnerShows_partner$data relay: RelayPaginationProp }> = ({ partner, relay }) => { const [isLoadingMore, setIsLoadingMore] = useState(false) diff --git a/src/app/Scenes/Partner/Components/PartnerShowsRail.tsx b/src/app/Scenes/Partner/Components/PartnerShowsRail.tsx index c564339ab1c..9bada22ccd1 100644 --- a/src/app/Scenes/Partner/Components/PartnerShowsRail.tsx +++ b/src/app/Scenes/Partner/Components/PartnerShowsRail.tsx @@ -1,4 +1,4 @@ -import { PartnerShowsRail_partner } from "__generated__/PartnerShowsRail_partner.graphql" +import { PartnerShowsRail_partner$data } from "__generated__/PartnerShowsRail_partner.graphql" import { extractNodes } from "app/utils/extractNodes" import { isCloseToEdge } from "app/utils/isCloseToEdge" import { Sans, Spacer } from "palette" @@ -10,7 +10,7 @@ import { PartnerShowRailItemContainer as RailItem } from "./PartnerShowRailItem" const PAGE_SIZE = 6 const PartnerShowsRail: React.FC<{ - partner: PartnerShowsRail_partner + partner: PartnerShowsRail_partner$data relay: RelayPaginationProp }> = ({ partner, relay }) => { const [fetchingNextPage, setFetchingNextPage] = useState(false) diff --git a/src/app/Scenes/Partner/Components/PartnerSubscriberBanner.tsx b/src/app/Scenes/Partner/Components/PartnerSubscriberBanner.tsx index 3e8929f4a6b..c9ca49610bc 100644 --- a/src/app/Scenes/Partner/Components/PartnerSubscriberBanner.tsx +++ b/src/app/Scenes/Partner/Components/PartnerSubscriberBanner.tsx @@ -1,11 +1,11 @@ -import { PartnerSubscriberBanner_partner } from "__generated__/PartnerSubscriberBanner_partner.graphql" +import { PartnerSubscriberBanner_partner$data } from "__generated__/PartnerSubscriberBanner_partner.graphql" import { navigate } from "app/navigation/navigate" import { Box, LinkText, SimpleMessage } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface PartnerSubscriberBannerProps { - partner: PartnerSubscriberBanner_partner + partner: PartnerSubscriberBanner_partner$data } export const PartnerSubscriberBanner: React.FC = ({ partner }) => { diff --git a/src/app/Scenes/Partner/Partner.tsx b/src/app/Scenes/Partner/Partner.tsx index 5d4dd855105..521a6946ea8 100644 --- a/src/app/Scenes/Partner/Partner.tsx +++ b/src/app/Scenes/Partner/Partner.tsx @@ -1,4 +1,4 @@ -import { Partner_partner } from "__generated__/Partner_partner.graphql" +import { Partner_partner$data } from "__generated__/Partner_partner.graphql" import { PartnerQuery } from "__generated__/PartnerQuery.graphql" import { ArtworkFiltersStoreProvider } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { HeaderTabsGridPlaceholder } from "app/Components/HeaderTabGridPlaceholder" @@ -17,7 +17,7 @@ import { PartnerShowsFragmentContainer as PartnerShows } from "./Components/Part import { PartnerSubscriberBannerFragmentContainer as PartnerSubscriberBanner } from "./Components/PartnerSubscriberBanner" interface Props { - partner: Partner_partner + partner: Partner_partner$data relay: RelayRefetchProp } diff --git a/src/app/Scenes/Partner/Screens/PartnerLocations.tests.tsx b/src/app/Scenes/Partner/Screens/PartnerLocations.tests.tsx index fdc77465dab..7926949a488 100644 --- a/src/app/Scenes/Partner/Screens/PartnerLocations.tests.tsx +++ b/src/app/Scenes/Partner/Screens/PartnerLocations.tests.tsx @@ -1,5 +1,6 @@ -import { PartnerLocations_partner } from "__generated__/PartnerLocations_partner.graphql" +import { PartnerLocations_partner$data } from "__generated__/PartnerLocations_partner.graphql" import { renderRelayTree } from "app/tests/renderRelayTree" +import { CleanRelayFragment } from "app/utils/relayHelpers" import React from "react" import { graphql, RelayPaginationProp } from "react-relay" import { PartnerLocationsFixture } from "./__fixtures__/PartnerLocations-fixture" @@ -8,7 +9,7 @@ import { PartnerLocationsContainer as PartnerLocations } from "./PartnerLocation jest.unmock("react-relay") describe("PartnerLocations", () => { - const getWrapper = async (partner: Omit) => + const getWrapper = async (partner: CleanRelayFragment) => await renderRelayTree({ Component: (props: any) => { return ( diff --git a/src/app/Scenes/Partner/Screens/PartnerLocations.tsx b/src/app/Scenes/Partner/Screens/PartnerLocations.tsx index 72c2ca3ec43..1f24640296c 100644 --- a/src/app/Scenes/Partner/Screens/PartnerLocations.tsx +++ b/src/app/Scenes/Partner/Screens/PartnerLocations.tsx @@ -1,4 +1,4 @@ -import { PartnerLocations_partner } from "__generated__/PartnerLocations_partner.graphql" +import { PartnerLocations_partner$data } from "__generated__/PartnerLocations_partner.graphql" import { PartnerLocationsQuery } from "__generated__/PartnerLocationsQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { extractNodes } from "app/utils/extractNodes" @@ -13,7 +13,7 @@ import { PartnerMapContainer as PartnerMap } from "../Components/PartnerMap" const PAGE_SIZE = 4 const PartnerLocations: React.FC<{ - partner: PartnerLocations_partner + partner: PartnerLocations_partner$data relay: RelayPaginationProp }> = ({ partner, relay }) => { const [fetchingNextPage, setFetchingNextPage] = useState(false) diff --git a/src/app/Scenes/Sale/Components/BuyNowArtworksRail.tsx b/src/app/Scenes/Sale/Components/BuyNowArtworksRail.tsx index 61a33f55a6f..ddd02c63c49 100644 --- a/src/app/Scenes/Sale/Components/BuyNowArtworksRail.tsx +++ b/src/app/Scenes/Sale/Components/BuyNowArtworksRail.tsx @@ -1,4 +1,4 @@ -import { BuyNowArtworksRail_sale } from "__generated__/BuyNowArtworksRail_sale.graphql" +import { BuyNowArtworksRail_sale$data } from "__generated__/BuyNowArtworksRail_sale.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import { createFragmentContainer } from "react-relay" import { graphql } from "react-relay" interface BuyNowArtworksRailProps { - sale: BuyNowArtworksRail_sale + sale: BuyNowArtworksRail_sale$data } export const BuyNowArtworksRail: React.FC = ({ sale }) => { diff --git a/src/app/Scenes/Sale/Components/RegisterToBidButton.tsx b/src/app/Scenes/Sale/Components/RegisterToBidButton.tsx index 3afcb33ddff..deaa2241329 100644 --- a/src/app/Scenes/Sale/Components/RegisterToBidButton.tsx +++ b/src/app/Scenes/Sale/Components/RegisterToBidButton.tsx @@ -4,8 +4,8 @@ import { tappedRegisterToBid, TappedRegisterToBidArgs, } from "@artsy/cohesion" -import { RegisterToBidButton_me } from "__generated__/RegisterToBidButton_me.graphql" -import { RegisterToBidButton_sale } from "__generated__/RegisterToBidButton_sale.graphql" +import { RegisterToBidButton_me$data } from "__generated__/RegisterToBidButton_me.graphql" +import { RegisterToBidButton_sale$data } from "__generated__/RegisterToBidButton_sale.graphql" import { Box, Button, CheckIcon, Flex, Spacer, Text } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" @@ -13,8 +13,8 @@ import { useTracking } from "react-tracking" import { navigate } from "../../../navigation/navigate" interface RegisterToBidButtonProps { - sale: RegisterToBidButton_sale - me: RegisterToBidButton_me + sale: RegisterToBidButton_sale$data + me: RegisterToBidButton_me$data contextType: ScreenOwnerType contextModule: ContextModule } diff --git a/src/app/Scenes/Sale/Components/SaleActiveBidItem.tsx b/src/app/Scenes/Sale/Components/SaleActiveBidItem.tsx index a86696659d4..7cb63dfa0a7 100644 --- a/src/app/Scenes/Sale/Components/SaleActiveBidItem.tsx +++ b/src/app/Scenes/Sale/Components/SaleActiveBidItem.tsx @@ -1,4 +1,4 @@ -import { SaleActiveBidItem_lotStanding } from "__generated__/SaleActiveBidItem_lotStanding.graphql" +import { SaleActiveBidItem_lotStanding$data } from "__generated__/SaleActiveBidItem_lotStanding.graphql" import { navigate } from "app/navigation/navigate" import { HighestBid, Outbid, ReserveNotMet } from "app/Scenes/MyBids/Components/BiddingStatuses" import { LotFragmentContainer } from "app/Scenes/MyBids/Components/Lot" @@ -9,7 +9,7 @@ import { TouchableOpacity } from "react-native" import { createFragmentContainer, graphql } from "react-relay" interface SaleActiveBidItemProps { - lotStanding: SaleActiveBidItem_lotStanding + lotStanding: SaleActiveBidItem_lotStanding$data } export const SaleActiveBidItem: React.FC = ({ lotStanding }) => { diff --git a/src/app/Scenes/Sale/Components/SaleActiveBids.tsx b/src/app/Scenes/Sale/Components/SaleActiveBids.tsx index c3e36ed1182..a7e1c320c04 100644 --- a/src/app/Scenes/Sale/Components/SaleActiveBids.tsx +++ b/src/app/Scenes/Sale/Components/SaleActiveBids.tsx @@ -1,4 +1,4 @@ -import { SaleActiveBids_me } from "__generated__/SaleActiveBids_me.graphql" +import { SaleActiveBids_me$data } from "__generated__/SaleActiveBids_me.graphql" import { SectionTitle } from "app/Components/SectionTitle" import { Flex, Separator } from "palette" import React, { useEffect, useRef } from "react" @@ -8,7 +8,7 @@ import useInterval from "react-use/lib/useInterval" import { SaleActiveBidItemContainer } from "./SaleActiveBidItem" interface SaleActiveBidsProps { - me: SaleActiveBids_me + me: SaleActiveBids_me$data saleID: string relay: RelayRefetchProp } diff --git a/src/app/Scenes/Sale/Components/SaleArtworkList.tsx b/src/app/Scenes/Sale/Components/SaleArtworkList.tsx index 7d3305ec8e5..202f40725e9 100644 --- a/src/app/Scenes/Sale/Components/SaleArtworkList.tsx +++ b/src/app/Scenes/Sale/Components/SaleArtworkList.tsx @@ -1,5 +1,5 @@ import { ScreenOwnerType } from "@artsy/cohesion" -import { SaleArtworkList_connection } from "__generated__/SaleArtworkList_connection.graphql" +import { SaleArtworkList_connection$data } from "__generated__/SaleArtworkList_connection.graphql" import { PAGE_SIZE } from "app/Components/constants" import Spinner from "app/Components/Spinner" import { ZeroState } from "app/Components/States/ZeroState" @@ -11,7 +11,7 @@ import { extractNodes } from "../../../utils/extractNodes" import { SaleArtworkListItemContainer as SaleArtworkListItem } from "./SaleArtworkListItem" interface Props { - connection: SaleArtworkList_connection + connection: SaleArtworkList_connection$data loadMore: RelayPaginationProp["loadMore"] hasMore: RelayPaginationProp["hasMore"] isLoading: RelayPaginationProp["isLoading"] diff --git a/src/app/Scenes/Sale/Components/SaleArtworkListItem.tsx b/src/app/Scenes/Sale/Components/SaleArtworkListItem.tsx index bf2600b03fc..1111130141f 100644 --- a/src/app/Scenes/Sale/Components/SaleArtworkListItem.tsx +++ b/src/app/Scenes/Sale/Components/SaleArtworkListItem.tsx @@ -5,7 +5,7 @@ import { tappedEntityGroup, TappedEntityGroupArgs, } from "@artsy/cohesion" -import { SaleArtworkListItem_artwork } from "__generated__/SaleArtworkListItem_artwork.graphql" +import { SaleArtworkListItem_artwork$data } from "__generated__/SaleArtworkListItem_artwork.graphql" import { saleMessageOrBidInfo } from "app/Components/ArtworkGrids/ArtworkGridItem" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" @@ -16,7 +16,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface Props { - artwork: SaleArtworkListItem_artwork + artwork: SaleArtworkListItem_artwork$data contextScreenOwnerType?: ScreenOwnerType contextScreenOwnerId?: string contextScreenOwnerSlug?: string diff --git a/src/app/Scenes/Sale/Components/SaleArtworksRail.tsx b/src/app/Scenes/Sale/Components/SaleArtworksRail.tsx index 46cde3fc9c1..dad727c257f 100644 --- a/src/app/Scenes/Sale/Components/SaleArtworksRail.tsx +++ b/src/app/Scenes/Sale/Components/SaleArtworksRail.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { SaleArtworksRail_me } from "__generated__/SaleArtworksRail_me.graphql" +import { SaleArtworksRail_me$data } from "__generated__/SaleArtworksRail_me.graphql" import { CardRailFlatList } from "app/Components/Home/CardRailFlatList" import { SaleArtworkTileRailCardContainer } from "app/Components/SaleArtworkTileRailCard" import { SectionTitle } from "app/Components/SectionTitle" @@ -10,7 +10,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface Props { - me: SaleArtworksRail_me + me: SaleArtworksRail_me$data } export const INITIAL_NUMBER_TO_RENDER = 4 diff --git a/src/app/Scenes/Sale/Components/SaleHeader.tsx b/src/app/Scenes/Sale/Components/SaleHeader.tsx index 25877cbf8b2..e1709050821 100644 --- a/src/app/Scenes/Sale/Components/SaleHeader.tsx +++ b/src/app/Scenes/Sale/Components/SaleHeader.tsx @@ -1,5 +1,5 @@ import Clipboard from "@react-native-community/clipboard" -import { SaleHeader_sale } from "__generated__/SaleHeader_sale.graphql" +import { SaleHeader_sale$data } from "__generated__/SaleHeader_sale.graphql" import { CustomShareSheet, CustomShareSheetItem } from "app/Components/CustomShareSheet" import { getShareURL } from "app/Components/ShareSheet/helpers" import { useToast } from "app/Components/Toast/toastHook" @@ -20,7 +20,7 @@ export const COVER_IMAGE_HEIGHT = 260 const SHARE_ICON_SIZE = 23 interface Props { - sale: SaleHeader_sale + sale: SaleHeader_sale$data scrollAnim: Animated.Value } diff --git a/src/app/Scenes/Sale/Components/SaleLotsList.tsx b/src/app/Scenes/Sale/Components/SaleLotsList.tsx index 33065bd4c78..bfb44c79677 100644 --- a/src/app/Scenes/Sale/Components/SaleLotsList.tsx +++ b/src/app/Scenes/Sale/Components/SaleLotsList.tsx @@ -1,7 +1,7 @@ import { OwnerType } from "@artsy/cohesion" import { themeGet } from "@styled-system/theme-get" -import { SaleLotsList_saleArtworksConnection } from "__generated__/SaleLotsList_saleArtworksConnection.graphql" -import { SaleLotsList_unfilteredSaleArtworksConnection } from "__generated__/SaleLotsList_unfilteredSaleArtworksConnection.graphql" +import { SaleLotsList_saleArtworksConnection$data } from "__generated__/SaleLotsList_saleArtworksConnection.graphql" +import { SaleLotsList_unfilteredSaleArtworksConnection$data } from "__generated__/SaleLotsList_unfilteredSaleArtworksConnection.graphql" import { filterArtworksParams, FilterParamName, @@ -22,8 +22,8 @@ import styled from "styled-components/native" import { SaleArtworkListContainer } from "./SaleArtworkList" interface Props { - saleArtworksConnection: SaleLotsList_saleArtworksConnection - unfilteredSaleArtworksConnection: SaleLotsList_unfilteredSaleArtworksConnection | null + saleArtworksConnection: SaleLotsList_saleArtworksConnection$data + unfilteredSaleArtworksConnection: SaleLotsList_unfilteredSaleArtworksConnection$data | null relay: RelayPaginationProp saleID: string saleSlug: string diff --git a/src/app/Scenes/Sale/Sale.tsx b/src/app/Scenes/Sale/Sale.tsx index c7e6dd3ee92..3bdf5b2e1e3 100644 --- a/src/app/Scenes/Sale/Sale.tsx +++ b/src/app/Scenes/Sale/Sale.tsx @@ -1,9 +1,8 @@ import { ContextModule, OwnerType } from "@artsy/cohesion" import { captureMessage } from "@sentry/react-native" -import { Sale_me } from "__generated__/Sale_me.graphql" -import { Sale_sale } from "__generated__/Sale_sale.graphql" +import { Sale_me$data } from "__generated__/Sale_me.graphql" +import { Sale_sale$data } from "__generated__/Sale_sale.graphql" import { SaleAboveTheFoldQuery } from "__generated__/SaleAboveTheFoldQuery.graphql" -import { SaleBelowTheFoldQuery } from "__generated__/SaleBelowTheFoldQuery.graphql" import { AnimatedArtworkFilterButton, ArtworkFilterNavigator, @@ -30,7 +29,7 @@ import { useTracking } from "react-tracking" import useInterval from "react-use/lib/useInterval" import usePrevious from "react-use/lib/usePrevious" import RelayModernEnvironment from "relay-runtime/lib/store/RelayModernEnvironment" -import { SaleBelowTheFoldQueryResponse } from "../../../__generated__/SaleBelowTheFoldQuery.graphql" +import { SaleBelowTheFoldQuery } from "../../../__generated__/SaleBelowTheFoldQuery.graphql" import { CascadingEndTimesBanner } from "../Artwork/Components/CascadingEndTimesBanner" import { BuyNowArtworksRailContainer } from "./Components/BuyNowArtworksRail" import { RegisterToBidButtonContainer } from "./Components/RegisterToBidButton" @@ -42,9 +41,9 @@ import { saleStatus } from "./helpers" interface Props { relay: RelayRefetchProp - me: Sale_me - sale: Sale_sale - below: SaleBelowTheFoldQueryResponse + me: Sale_me$data + sale: Sale_sale$data + below: SaleBelowTheFoldQuery["response"] } interface SaleSection { diff --git a/src/app/Scenes/SaleInfo/SaleInfo.tsx b/src/app/Scenes/SaleInfo/SaleInfo.tsx index fa738283189..178ec81b3dc 100644 --- a/src/app/Scenes/SaleInfo/SaleInfo.tsx +++ b/src/app/Scenes/SaleInfo/SaleInfo.tsx @@ -1,5 +1,5 @@ -import { SaleInfo_me } from "__generated__/SaleInfo_me.graphql" -import { SaleInfo_sale } from "__generated__/SaleInfo_sale.graphql" +import { SaleInfo_me$data } from "__generated__/SaleInfo_me.graphql" +import { SaleInfo_sale$data } from "__generated__/SaleInfo_sale.graphql" import { SaleInfoQueryRendererQuery } from "__generated__/SaleInfoQueryRendererQuery.graphql" import { MenuItem } from "app/Components/MenuItem" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -23,8 +23,8 @@ import { RegisterToBidButtonContainer } from "../Sale/Components/RegisterToBidBu import { saleStatus } from "../Sale/helpers" interface Props { - sale: SaleInfo_sale - me: SaleInfo_me + sale: SaleInfo_sale$data + me: SaleInfo_me$data } const AuctionSupport = () => { @@ -134,14 +134,14 @@ export const SaleInfo: React.FC = ({ sale, me }) => { const makePercent = (value: number) => parseFloat((value * 100).toFixed(5)) -const createPremiumDisplay = (props: { sale: SaleInfo_sale }) => { +const createPremiumDisplay = (props: { sale: SaleInfo_sale$data }) => { return props.sale.buyersPremium?.map((item, index) => ( )) } interface BuyersPremiumItemProps { - sale: SaleInfo_sale + sale: SaleInfo_sale$data currentValue: { amount: string | null percent: number | null @@ -173,7 +173,7 @@ const BuyersPremiumItem: React.FC = (props) => { ) } -const BuyersPremium: React.FC<{ sale: SaleInfo_sale }> = (props) => { +const BuyersPremium: React.FC<{ sale: SaleInfo_sale$data }> = (props) => { let premiumDisplay const buyersPremium = props.sale.buyersPremium diff --git a/src/app/Scenes/Sales/Components/SaleList.tsx b/src/app/Scenes/Sales/Components/SaleList.tsx index 5e1eddc15a8..b1cac166ae7 100644 --- a/src/app/Scenes/Sales/Components/SaleList.tsx +++ b/src/app/Scenes/Sales/Components/SaleList.tsx @@ -2,14 +2,14 @@ import { isEmpty } from "lodash" import React from "react" import { View } from "react-native" -import { SaleListItem_sale } from "__generated__/SaleListItem_sale.graphql" +import { SaleListItem_sale$data } from "__generated__/SaleListItem_sale.graphql" import { SectionTitle } from "app/Components/SectionTitle" import { FragmentRef } from "react-relay" import { useScreenDimensions } from "shared/hooks" import SaleListItem from "./SaleListItem" export const SaleList: React.FC<{ - sales: Array> + sales: Array> title: string }> = ({ sales, title }) => { const { width } = useScreenDimensions() diff --git a/src/app/Scenes/Sales/Components/SaleListItem.tsx b/src/app/Scenes/Sales/Components/SaleListItem.tsx index 243e662c15b..06ca2841210 100644 --- a/src/app/Scenes/Sales/Components/SaleListItem.tsx +++ b/src/app/Scenes/Sales/Components/SaleListItem.tsx @@ -5,13 +5,13 @@ import { createFragmentContainer, graphql } from "react-relay" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { navigate } from "app/navigation/navigate" -import { SaleListItem_sale } from "__generated__/SaleListItem_sale.graphql" +import { SaleListItem_sale$data } from "__generated__/SaleListItem_sale.graphql" import { formatDisplayTimelyAt } from "app/Scenes/Sale/helpers" import { useFeatureFlag } from "app/store/GlobalStore" import { Sans } from "palette" interface Props { - sale: SaleListItem_sale + sale: SaleListItem_sale$data containerWidth: number index: number columnCount: number diff --git a/src/app/Scenes/Sales/index.tests.tsx b/src/app/Scenes/Sales/Sales.tests.tsx similarity index 99% rename from src/app/Scenes/Sales/index.tests.tsx rename to src/app/Scenes/Sales/Sales.tests.tsx index 16cdf471f69..44722de3cf4 100644 --- a/src/app/Scenes/Sales/index.tests.tsx +++ b/src/app/Scenes/Sales/Sales.tests.tsx @@ -7,7 +7,7 @@ import "react-native" import { graphql, QueryRenderer } from "react-relay" import { createMockEnvironment, MockPayloadGenerator, RelayMockEnvironment } from "relay-test-utils" import { CurrentlyRunningAuctions } from "./CurrentlyRunningAuctions" -import { Sales } from "./index" +import { Sales } from "./Sales" import { UpcomingAuctions } from "./UpcomingAuctions" jest.unmock("react-relay") diff --git a/src/app/Scenes/Sales/index.tsx b/src/app/Scenes/Sales/Sales.tsx similarity index 96% rename from src/app/Scenes/Sales/index.tsx rename to src/app/Scenes/Sales/Sales.tsx index e2d1951ad37..fb8fb1e616e 100644 --- a/src/app/Scenes/Sales/index.tsx +++ b/src/app/Scenes/Sales/Sales.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { SalesQuery, SalesQueryResponse } from "__generated__/SalesQuery.graphql" +import { SalesQuery } from "__generated__/SalesQuery.graphql" import { LotsByFollowedArtistsRailContainer } from "app/Components/LotsByArtistsYouFollowRail/LotsByFollowedArtistsRail" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { Stack } from "app/Components/Stack" @@ -30,7 +30,7 @@ export const SalesScreenQuery = graphql` } ` -export const Sales: React.FC<{ data: SalesQueryResponse }> = ({ data }) => { +export const Sales: React.FC<{ data: SalesQuery["response"] }> = ({ data }) => { const [isRefreshing, setIsRefreshing] = useState(false) // using max_value because we want CurrentlyRunningAuctions & UpcomingAuctions diff --git a/src/app/Scenes/SavedAddresses/SavedAddresses.tsx b/src/app/Scenes/SavedAddresses/SavedAddresses.tsx index 814b2cb1810..a9ac1722dec 100644 --- a/src/app/Scenes/SavedAddresses/SavedAddresses.tsx +++ b/src/app/Scenes/SavedAddresses/SavedAddresses.tsx @@ -1,6 +1,6 @@ import { captureMessage } from "@sentry/react-native" import { themeGet } from "@styled-system/theme-get" -import { SavedAddresses_me } from "__generated__/SavedAddresses_me.graphql" +import { SavedAddresses_me$data } from "__generated__/SavedAddresses_me.graphql" import { SavedAddressesQuery } from "__generated__/SavedAddressesQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { useToast } from "app/Components/Toast/toastHook" @@ -36,7 +36,7 @@ const NUM_ADDRESSES_TO_FETCH = 10 // tslint:disable-next-line:no-empty export const util = { onRefresh: () => {} } -const SavedAddresses: React.FC<{ me: SavedAddresses_me; relay: RelayRefetchProp }> = ({ +const SavedAddresses: React.FC<{ me: SavedAddresses_me$data; relay: RelayRefetchProp }> = ({ me, relay, }) => { diff --git a/src/app/Scenes/SavedAddresses/SavedAddressesForm.tsx b/src/app/Scenes/SavedAddresses/SavedAddressesForm.tsx index f275a59cd8d..a003bf3e4da 100644 --- a/src/app/Scenes/SavedAddresses/SavedAddressesForm.tsx +++ b/src/app/Scenes/SavedAddresses/SavedAddressesForm.tsx @@ -1,5 +1,5 @@ import { captureMessage } from "@sentry/react-native" -import { SavedAddressesForm_me } from "__generated__/SavedAddressesForm_me.graphql" +import { SavedAddressesForm_me$data } from "__generated__/SavedAddressesForm_me.graphql" import { SavedAddressesFormQuery } from "__generated__/SavedAddressesFormQuery.graphql" import { CountrySelect } from "app/Components/CountrySelect" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" @@ -84,10 +84,10 @@ const useStore = createComponentStore({ }), }) -export const SavedAddressesForm: React.FC<{ me: SavedAddressesForm_me; addressId?: string }> = ({ - me, - addressId, -}) => { +export const SavedAddressesForm: React.FC<{ + me: SavedAddressesForm_me$data + addressId?: string +}> = ({ me, addressId }) => { const isEditForm = !!addressId const toast = useToast() const [isValidNumber, setIsValidNumber] = useState(false) diff --git a/src/app/Scenes/SavedAddresses/mutations/addNewAddress.ts b/src/app/Scenes/SavedAddresses/mutations/addNewAddress.ts index 461ac28b272..4ff7981f8fb 100644 --- a/src/app/Scenes/SavedAddresses/mutations/addNewAddress.ts +++ b/src/app/Scenes/SavedAddresses/mutations/addNewAddress.ts @@ -1,13 +1,12 @@ import { addNewAddressMutation, - addNewAddressMutationResponse, UserAddressAttributes, } from "__generated__/addNewAddressMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export const createUserAddress = (address: UserAddressAttributes) => { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { variables: { input: { diff --git a/src/app/Scenes/SavedAddresses/mutations/setAsDefaultAddress.ts b/src/app/Scenes/SavedAddresses/mutations/setAsDefaultAddress.ts index 9fc24926a4c..4e906fa3682 100644 --- a/src/app/Scenes/SavedAddresses/mutations/setAsDefaultAddress.ts +++ b/src/app/Scenes/SavedAddresses/mutations/setAsDefaultAddress.ts @@ -1,13 +1,12 @@ import { setAsDefaultAddressMutation, - setAsDefaultAddressMutationResponse, UpdateUserDefaultAddressInput, } from "__generated__/setAsDefaultAddressMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export const setAsDefaultAddress = (id: UpdateUserDefaultAddressInput["userAddressID"]) => { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { variables: { input: { diff --git a/src/app/Scenes/SavedAddresses/mutations/updateUserAddress.ts b/src/app/Scenes/SavedAddresses/mutations/updateUserAddress.ts index 8dabb154156..b73e13238c6 100644 --- a/src/app/Scenes/SavedAddresses/mutations/updateUserAddress.ts +++ b/src/app/Scenes/SavedAddresses/mutations/updateUserAddress.ts @@ -1,13 +1,10 @@ import { UserAddressAttributes } from "__generated__/addNewAddressMutation.graphql" -import { - updateUserAddressMutation, - updateUserAddressMutationResponse, -} from "__generated__/updateUserAddressMutation.graphql" +import { updateUserAddressMutation } from "__generated__/updateUserAddressMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "react-relay" export const updateUserAddress = (userAddressID: string, address: UserAddressAttributes) => { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { variables: { input: { diff --git a/src/app/Scenes/SavedSearchAlert/EditSavedSearchAlert.tsx b/src/app/Scenes/SavedSearchAlert/EditSavedSearchAlert.tsx index 7a8258ce6c4..6f320efe6fb 100644 --- a/src/app/Scenes/SavedSearchAlert/EditSavedSearchAlert.tsx +++ b/src/app/Scenes/SavedSearchAlert/EditSavedSearchAlert.tsx @@ -1,9 +1,9 @@ import { OwnerType } from "@artsy/cohesion" -import { EditSavedSearchAlert_artists } from "__generated__/EditSavedSearchAlert_artists.graphql" -import { EditSavedSearchAlert_artworksConnection } from "__generated__/EditSavedSearchAlert_artworksConnection.graphql" -import { EditSavedSearchAlert_viewer } from "__generated__/EditSavedSearchAlert_viewer.graphql" +import { EditSavedSearchAlert_artists$data } from "__generated__/EditSavedSearchAlert_artists.graphql" +import { EditSavedSearchAlert_artworksConnection$data } from "__generated__/EditSavedSearchAlert_artworksConnection.graphql" +import { EditSavedSearchAlert_viewer$data } from "__generated__/EditSavedSearchAlert_viewer.graphql" import { EditSavedSearchAlertQuery } from "__generated__/EditSavedSearchAlertQuery.graphql" -import { SavedSearchAlertQueryResponse } from "__generated__/SavedSearchAlertQuery.graphql" +import { SavedSearchAlertQuery } from "__generated__/SavedSearchAlertQuery.graphql" import { Aggregations } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { SavedSearchEntity, @@ -27,11 +27,11 @@ interface EditSavedSearchAlertBaseProps { } interface EditSavedSearchAlertProps { - me: SavedSearchAlertQueryResponse["me"] - viewer: EditSavedSearchAlert_viewer - artists: EditSavedSearchAlert_artists + me: SavedSearchAlertQuery["response"]["me"] + viewer: EditSavedSearchAlert_viewer$data + artists: EditSavedSearchAlert_artists$data savedSearchAlertId: string - artworksConnection: EditSavedSearchAlert_artworksConnection + artworksConnection: EditSavedSearchAlert_artworksConnection$data relay: RelayRefetchProp } @@ -163,7 +163,7 @@ export const EditSavedSearchAlertQueryRenderer: React.FC ( + render: (relayProps: SavedSearchAlertQuery["response"]) => ( environment={defaultEnvironment} query={graphql` diff --git a/src/app/Scenes/SavedSearchAlert/SavedSearchAlert.tsx b/src/app/Scenes/SavedSearchAlert/SavedSearchAlert.tsx index 6b50b492fc4..53995a0629e 100644 --- a/src/app/Scenes/SavedSearchAlert/SavedSearchAlert.tsx +++ b/src/app/Scenes/SavedSearchAlert/SavedSearchAlert.tsx @@ -1,7 +1,4 @@ -import { - SavedSearchAlertQuery, - SavedSearchAlertQueryResponse, -} from "__generated__/SavedSearchAlertQuery.graphql" +import { SavedSearchAlertQuery } from "__generated__/SavedSearchAlertQuery.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import React from "react" import { graphql, QueryRenderer } from "react-relay" @@ -10,7 +7,7 @@ interface SearchCriteriaAlertBaseProps { savedSearchAlertId: string render: (renderProps: { error: Error | null - props: SavedSearchAlertQueryResponse | null + props: SavedSearchAlertQuery["response"] | null retry: (() => void) | null }) => React.ReactNode } diff --git a/src/app/Scenes/SavedSearchAlert/containers/CreateSavedSearchContentContainer.tsx b/src/app/Scenes/SavedSearchAlert/containers/CreateSavedSearchContentContainer.tsx index 28c1e2acb90..94fc4dd8c5a 100644 --- a/src/app/Scenes/SavedSearchAlert/containers/CreateSavedSearchContentContainer.tsx +++ b/src/app/Scenes/SavedSearchAlert/containers/CreateSavedSearchContentContainer.tsx @@ -1,7 +1,7 @@ import { useFocusEffect } from "@react-navigation/core" import { StackNavigationProp } from "@react-navigation/stack" import { captureMessage } from "@sentry/react-native" -import { CreateSavedSearchContentContainer_viewer } from "__generated__/CreateSavedSearchContentContainer_viewer.graphql" +import { CreateSavedSearchContentContainer_viewer$data } from "__generated__/CreateSavedSearchContentContainer_viewer.graphql" import { CreateSavedSearchContentContainerQuery } from "__generated__/CreateSavedSearchContentContainerQuery.graphql" import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -28,7 +28,7 @@ interface CreateSavedSearchAlertContentQueryRendererProps { interface CreateSavedSearchAlertContentProps extends CreateSavedSearchAlertContentQueryRendererProps { relay: RelayRefetchProp - viewer?: CreateSavedSearchContentContainer_viewer | null + viewer?: CreateSavedSearchContentContainer_viewer$data | null loading: boolean } diff --git a/src/app/Scenes/SavedSearchAlert/mutations/createSavedSearchAlert.ts b/src/app/Scenes/SavedSearchAlert/mutations/createSavedSearchAlert.ts index 83f6c12f383..144ea4b2f37 100644 --- a/src/app/Scenes/SavedSearchAlert/mutations/createSavedSearchAlert.ts +++ b/src/app/Scenes/SavedSearchAlert/mutations/createSavedSearchAlert.ts @@ -1,7 +1,4 @@ -import { - createSavedSearchAlertMutation, - createSavedSearchAlertMutationResponse, -} from "__generated__/createSavedSearchAlertMutation.graphql" +import { createSavedSearchAlertMutation } from "__generated__/createSavedSearchAlertMutation.graphql" import { SearchCriteriaAttributes } from "app/Components/ArtworkFilter/SavedSearch/types" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "relay-runtime" @@ -10,7 +7,7 @@ import { SavedSearchAlertFormValues } from "../SavedSearchAlertModel" export const createSavedSearchAlert = ( userAlertSettings: SavedSearchAlertFormValues, attributes: SearchCriteriaAttributes -): Promise => { +): Promise => { return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` diff --git a/src/app/Scenes/SavedSearchAlert/mutations/updateNotificationPreferences.ts b/src/app/Scenes/SavedSearchAlert/mutations/updateNotificationPreferences.ts index c2e67f4649a..9b5b5fd2c37 100644 --- a/src/app/Scenes/SavedSearchAlert/mutations/updateNotificationPreferences.ts +++ b/src/app/Scenes/SavedSearchAlert/mutations/updateNotificationPreferences.ts @@ -1,16 +1,14 @@ import { NotificationPreferenceInput, updateNotificationPreferencesMutation, - updateNotificationPreferencesMutationResponse, - updateNotificationPreferencesMutationVariables, } from "__generated__/updateNotificationPreferencesMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "relay-runtime" export const updateNotificationPreferences = ( subscriptionGroups: NotificationPreferenceInput[] -): Promise => { - const input: updateNotificationPreferencesMutationVariables["input"] = { +): Promise => { + const input: updateNotificationPreferencesMutation["variables"]["input"] = { subscriptionGroups, } diff --git a/src/app/Scenes/SavedSearchAlert/mutations/updateSavedSearchAlert.ts b/src/app/Scenes/SavedSearchAlert/mutations/updateSavedSearchAlert.ts index 6ad450ed27b..76d1e385d25 100644 --- a/src/app/Scenes/SavedSearchAlert/mutations/updateSavedSearchAlert.ts +++ b/src/app/Scenes/SavedSearchAlert/mutations/updateSavedSearchAlert.ts @@ -1,8 +1,4 @@ -import { - updateSavedSearchAlertMutation, - updateSavedSearchAlertMutationResponse, - updateSavedSearchAlertMutationVariables, -} from "__generated__/updateSavedSearchAlertMutation.graphql" +import { updateSavedSearchAlertMutation } from "__generated__/updateSavedSearchAlertMutation.graphql" import { SearchCriteriaAttributes } from "app/Components/ArtworkFilter/SavedSearch/types" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "relay-runtime" @@ -12,8 +8,8 @@ export const updateSavedSearchAlert = ( savedSearchAlertId: string, userAlertSettings: SavedSearchAlertFormValues, attributes: SearchCriteriaAttributes -): Promise => { - const input: updateSavedSearchAlertMutationVariables["input"] = { +): Promise => { + const input: updateSavedSearchAlertMutation["variables"]["input"] = { searchCriteriaID: savedSearchAlertId, userAlertSettings, attributes, diff --git a/src/app/Scenes/SavedSearchAlertsList/Components/SavedSearchesList.tsx b/src/app/Scenes/SavedSearchAlertsList/Components/SavedSearchesList.tsx index 105e8bc3192..0aee9975830 100644 --- a/src/app/Scenes/SavedSearchAlertsList/Components/SavedSearchesList.tsx +++ b/src/app/Scenes/SavedSearchAlertsList/Components/SavedSearchesList.tsx @@ -1,5 +1,5 @@ import { OwnerType } from "@artsy/cohesion" -import { SavedSearchesList_me } from "__generated__/SavedSearchesList_me.graphql" +import { SavedSearchesList_me$data } from "__generated__/SavedSearchesList_me.graphql" import { SAVED_SERCHES_PAGE_SIZE } from "app/Components/constants" import { GoBackProps, navigate, navigationEvents } from "app/navigation/navigate" import { extractNodes } from "app/utils/extractNodes" @@ -14,7 +14,7 @@ import { SavedSearchAlertsListPlaceholder } from "./SavedSearchAlertsListPlaceho import { SavedSearchListItem } from "./SavedSearchListItem" interface SavedSearchesListProps { - me: SavedSearchesList_me + me: SavedSearchesList_me$data relay: RelayPaginationProp } diff --git a/src/app/Scenes/SavedSearchAlertsList/SavedSearchAlertsList.tsx b/src/app/Scenes/SavedSearchAlertsList/SavedSearchAlertsList.tsx index 09754c29d06..b26203d0a28 100644 --- a/src/app/Scenes/SavedSearchAlertsList/SavedSearchAlertsList.tsx +++ b/src/app/Scenes/SavedSearchAlertsList/SavedSearchAlertsList.tsx @@ -1,4 +1,4 @@ -import { SavedSearchAlertsList_me } from "__generated__/SavedSearchAlertsList_me.graphql" +import { SavedSearchAlertsList_me$data } from "__generated__/SavedSearchAlertsList_me.graphql" import { SavedSearchAlertsListQuery } from "__generated__/SavedSearchAlertsListQuery.graphql" import { PageWithSimpleHeader } from "app/Components/PageWithSimpleHeader" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -9,7 +9,7 @@ import { SavedSearchAlertsListPlaceholder } from "./Components/SavedSearchAlerts import { SavedSearchesListContainer as SavedSearchesList } from "./Components/SavedSearchesList" interface SavedSearchAlertsListProps { - me: SavedSearchAlertsList_me + me: SavedSearchAlertsList_me$data } export const SavedSearchAlertsList: React.FC = (props) => { diff --git a/src/app/Scenes/Search/AutosuggestResults.tests.tsx b/src/app/Scenes/Search/AutosuggestResults.tests.tsx index 434ca1ac347..18f9fa89fc8 100644 --- a/src/app/Scenes/Search/AutosuggestResults.tests.tsx +++ b/src/app/Scenes/Search/AutosuggestResults.tests.tsx @@ -1,5 +1,5 @@ -import { AutosuggestResultsPaginationQueryRawResponse } from "__generated__/AutosuggestResultsPaginationQuery.graphql" -import { AutosuggestResultsQueryRawResponse } from "__generated__/AutosuggestResultsQuery.graphql" +import { AutosuggestResultsPaginationQuery$rawResponse } from "__generated__/AutosuggestResultsPaginationQuery.graphql" +import { AutosuggestResultsQuery$rawResponse } from "__generated__/AutosuggestResultsQuery.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" import Spinner from "app/Components/Spinner" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -14,7 +14,7 @@ import { AutosuggestResults } from "./AutosuggestResults" import { AutosuggestSearchResult } from "./components/AutosuggestSearchResult" import { SearchContext } from "./SearchContext" -const FixturePage1: AutosuggestResultsQueryRawResponse = { +const FixturePage1: AutosuggestResultsQuery$rawResponse = { results: { edges: [ { @@ -38,7 +38,7 @@ const FixturePage1: AutosuggestResultsQueryRawResponse = { }, }, } -const FixturePage2: AutosuggestResultsPaginationQueryRawResponse = { +const FixturePage2: AutosuggestResultsPaginationQuery$rawResponse = { results: { edges: [ { @@ -63,7 +63,7 @@ const FixturePage2: AutosuggestResultsPaginationQueryRawResponse = { }, } -const FixturePage3: AutosuggestResultsPaginationQueryRawResponse = { +const FixturePage3: AutosuggestResultsPaginationQuery$rawResponse = { results: { edges: [ { @@ -88,7 +88,7 @@ const FixturePage3: AutosuggestResultsPaginationQueryRawResponse = { }, } -const FixtureEmpty: AutosuggestResultsQueryRawResponse = { +const FixtureEmpty: AutosuggestResultsQuery$rawResponse = { results: { edges: [], pageInfo: { diff --git a/src/app/Scenes/Search/AutosuggestResults.tsx b/src/app/Scenes/Search/AutosuggestResults.tsx index 753df810e42..dc6de311bf0 100644 --- a/src/app/Scenes/Search/AutosuggestResults.tsx +++ b/src/app/Scenes/Search/AutosuggestResults.tsx @@ -1,9 +1,6 @@ import { captureMessage } from "@sentry/react-native" -import { AutosuggestResults_results } from "__generated__/AutosuggestResults_results.graphql" -import { - AutosuggestResultsQuery, - AutosuggestResultsQueryVariables, -} from "__generated__/AutosuggestResultsQuery.graphql" +import { AutosuggestResults_results$data } from "__generated__/AutosuggestResults_results.graphql" +import { AutosuggestResultsQuery } from "__generated__/AutosuggestResultsQuery.graphql" import { AboveTheFoldFlatList } from "app/Components/AboveTheFoldFlatList" import { LoadFailureView } from "app/Components/LoadFailureView" import Spinner from "app/Components/Spinner" @@ -23,7 +20,9 @@ import { import { AutosuggestResultsPlaceholder } from "./components/placeholders/AutosuggestResultsPlaceholder" export type AutosuggestResult = NonNullable< - NonNullable["edges"]>[0]>["node"] + NonNullable< + NonNullable["edges"]>[0] + >["node"] > const INITIAL_BATCH_SIZE = 32 @@ -32,7 +31,7 @@ const SUBSEQUENT_BATCH_SIZE = 64 const AutosuggestResultsFlatList: React.FC<{ query: string // if results are null that means we are waiting on a response from MP - results: AutosuggestResults_results | null + results: AutosuggestResults_results$data | null relay: RelayPaginationProp showResultType?: boolean showQuickNavigationButtons?: boolean @@ -259,7 +258,7 @@ const AutosuggestResultsContainer = createPaginationContainer( export const AutosuggestResults: React.FC<{ query: string - entities?: AutosuggestResultsQueryVariables["entities"] + entities?: AutosuggestResultsQuery["variables"]["entities"] showResultType?: boolean showQuickNavigationButtons?: boolean showOnRetryErrorMessage?: boolean diff --git a/src/app/Scenes/Search/SearchArtworksGrid.tsx b/src/app/Scenes/Search/SearchArtworksGrid.tsx index 325e5f00d65..a6694a87724 100644 --- a/src/app/Scenes/Search/SearchArtworksGrid.tsx +++ b/src/app/Scenes/Search/SearchArtworksGrid.tsx @@ -1,4 +1,4 @@ -import { SearchArtworksGrid_viewer } from "__generated__/SearchArtworksGrid_viewer.graphql" +import { SearchArtworksGrid_viewer$data } from "__generated__/SearchArtworksGrid_viewer.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { useArtworkFilters, @@ -18,7 +18,7 @@ import { createPaginationContainer, graphql, RelayPaginationProp } from "react-r import { useTracking } from "react-tracking" export interface SearchArtworksGridProps { - viewer: SearchArtworksGrid_viewer + viewer: SearchArtworksGrid_viewer$data relay: RelayPaginationProp keyword: string } diff --git a/src/app/Scenes/SellWithArtsy/Components/ArtistList.tsx b/src/app/Scenes/SellWithArtsy/Components/ArtistList.tsx index 48028ec1864..a929990ae72 100644 --- a/src/app/Scenes/SellWithArtsy/Components/ArtistList.tsx +++ b/src/app/Scenes/SellWithArtsy/Components/ArtistList.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType, tappedEntityGroup, TappedEntityGroupArgs } from "@artsy/cohesion" -import { ArtistList_targetSupply } from "__generated__/ArtistList_targetSupply.graphql" +import { ArtistList_targetSupply$data } from "__generated__/ArtistList_targetSupply.graphql" import { navigate } from "app/navigation/navigate" import { PlaceholderBox, PlaceholderText } from "app/utils/placeholders" import { chunk, shuffle } from "lodash" @@ -11,7 +11,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface ArtistListProps { - targetSupply: ArtistList_targetSupply + targetSupply: ArtistList_targetSupply$data isLoading?: boolean } diff --git a/src/app/Scenes/SellWithArtsy/Components/RecentlySold.tsx b/src/app/Scenes/SellWithArtsy/Components/RecentlySold.tsx index 742570e2f72..7c59aac8cf6 100644 --- a/src/app/Scenes/SellWithArtsy/Components/RecentlySold.tsx +++ b/src/app/Scenes/SellWithArtsy/Components/RecentlySold.tsx @@ -1,5 +1,5 @@ import { ContextModule, OwnerType, tappedEntityGroup, TappedEntityGroupArgs } from "@artsy/cohesion" -import { RecentlySold_targetSupply } from "__generated__/RecentlySold_targetSupply.graphql" +import { RecentlySold_targetSupply$data } from "__generated__/RecentlySold_targetSupply.graphql" import { SmallArtworkRail, SmallArtworkRailPlaceholder, @@ -15,7 +15,7 @@ import { useTracking } from "react-tracking" interface RecentlySoldProps { isLoading?: boolean - targetSupply: RecentlySold_targetSupply + targetSupply: RecentlySold_targetSupply$data } const trackingArgs: TappedEntityGroupArgs = { diff --git a/src/app/Scenes/SellWithArtsy/SellWithArtsyHome.tsx b/src/app/Scenes/SellWithArtsy/SellWithArtsyHome.tsx index bb813b07c56..9c961680007 100644 --- a/src/app/Scenes/SellWithArtsy/SellWithArtsyHome.tsx +++ b/src/app/Scenes/SellWithArtsy/SellWithArtsyHome.tsx @@ -1,5 +1,5 @@ import { tappedConsign, TappedConsignArgs } from "@artsy/cohesion" -import { SellWithArtsyHome_targetSupply } from "__generated__/SellWithArtsyHome_targetSupply.graphql" +import { SellWithArtsyHome_targetSupply$data } from "__generated__/SellWithArtsyHome_targetSupply.graphql" import { SellWithArtsyHomeQuery } from "__generated__/SellWithArtsyHomeQuery.graphql" import { navigate } from "app/navigation/navigate" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -18,7 +18,7 @@ import { HowItWorks } from "./Components/HowItWorks" import { RecentlySoldFragmentContainer as RecentlySold } from "./Components/RecentlySold" interface Props { - targetSupply: SellWithArtsyHome_targetSupply + targetSupply: SellWithArtsyHome_targetSupply$data isLoading?: boolean } diff --git a/src/app/Scenes/SellWithArtsy/SubmitArtwork/ContactInformation/ContactInformation.tsx b/src/app/Scenes/SellWithArtsy/SubmitArtwork/ContactInformation/ContactInformation.tsx index 2e81c072d0d..0587d12f55e 100644 --- a/src/app/Scenes/SellWithArtsy/SubmitArtwork/ContactInformation/ContactInformation.tsx +++ b/src/app/Scenes/SellWithArtsy/SubmitArtwork/ContactInformation/ContactInformation.tsx @@ -1,5 +1,5 @@ import { captureMessage } from "@sentry/react-native" -import { ContactInformation_me } from "__generated__/ContactInformation_me.graphql" +import { ContactInformation_me$data } from "__generated__/ContactInformation_me.graphql" import { ContactInformationQueryRendererQuery } from "__generated__/ContactInformationQueryRendererQuery.graphql" import { ErrorView } from "app/Components/ErrorView/ErrorView" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -16,7 +16,7 @@ import { ContactInformationFormModel, contactInformationValidationSchema } from export const ContactInformation: React.FC<{ handlePress: (submissionId: string) => void - me: ContactInformation_me | null + me: ContactInformation_me$data | null }> = ({ handlePress, me }) => { const { userID } = GlobalStore.useAppState((store) => store.auth) const { submissionId } = GlobalStore.useAppState((state) => state.artworkSubmission.submission) diff --git a/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/addAssetToConsignment.ts b/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/addAssetToConsignment.ts index d1ce3a928f7..5151fcc4bd4 100644 --- a/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/addAssetToConsignment.ts +++ b/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/addAssetToConsignment.ts @@ -1,13 +1,12 @@ import { addAssetToConsignmentMutation, - addAssetToConsignmentMutationResponse, AddAssetToConsignmentSubmissionInput, } from "__generated__/addAssetToConsignmentMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" import { commitMutation, graphql } from "relay-runtime" export const addAssetToConsignment = (input: AddAssetToConsignmentSubmissionInput) => { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { commitMutation(defaultEnvironment, { mutation: graphql` mutation addAssetToConsignmentMutation($input: AddAssetToConsignmentSubmissionInput!) { diff --git a/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/gemini/getGeminiCredentialsForEnvironment.ts b/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/gemini/getGeminiCredentialsForEnvironment.ts index 0ef4f2b0520..e3e083d529a 100644 --- a/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/gemini/getGeminiCredentialsForEnvironment.ts +++ b/src/app/Scenes/SellWithArtsy/SubmitArtwork/UploadPhotos/utils/gemini/getGeminiCredentialsForEnvironment.ts @@ -1,6 +1,5 @@ import { getGeminiCredentialsForEnvironmentMutation, - getGeminiCredentialsForEnvironmentMutationResponse, RequestCredentialsForAssetUploadInput, } from "__generated__/getGeminiCredentialsForEnvironmentMutation.graphql" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -8,7 +7,7 @@ import { commitMutation, graphql } from "relay-runtime" export type AssetCredentials = // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time πŸ™ - getGeminiCredentialsForEnvironmentMutationResponse["requestCredentialsForAssetUpload"]["asset"] + getGeminiCredentialsForEnvironmentMutation["response"]["requestCredentialsForAssetUpload"]["asset"] export const getGeminiCredentialsForEnvironment = ( input: RequestCredentialsForAssetUploadInput diff --git a/src/app/Scenes/Show/Components/ShowArtworks.tsx b/src/app/Scenes/Show/Components/ShowArtworks.tsx index 5f1b46e3383..d5e1a3a21e5 100644 --- a/src/app/Scenes/Show/Components/ShowArtworks.tsx +++ b/src/app/Scenes/Show/Components/ShowArtworks.tsx @@ -1,6 +1,6 @@ import { OwnerType } from "@artsy/cohesion" -import { Show_show } from "__generated__/Show_show.graphql" -import { ShowArtworks_show } from "__generated__/ShowArtworks_show.graphql" +import { Show_show$data } from "__generated__/Show_show.graphql" +import { ShowArtworks_show$data } from "__generated__/ShowArtworks_show.graphql" import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter" import { aggregationsType, FilterArray } from "app/Components/ArtworkFilter/ArtworkFilterHelpers" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" @@ -13,13 +13,13 @@ import React, { useEffect } from "react" import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" interface Props { - show: ShowArtworks_show + show: ShowArtworks_show$data relay: RelayPaginationProp initiallyAppliedFilter?: FilterArray } interface ArtworkProps { - show: Show_show + show: Show_show$data visible: boolean toggleFilterArtworksModal: () => void } @@ -110,7 +110,7 @@ export const ShowArtworksPaginationContainer = createPaginationContainer( slug internalID showArtworks: filterArtworksConnection( - first: 30 + first: $count after: $cursor aggregations: [ ARTIST diff --git a/src/app/Scenes/Show/Components/ShowArtworksEmptyState.tsx b/src/app/Scenes/Show/Components/ShowArtworksEmptyState.tsx index 04cbd518189..0679897aedd 100644 --- a/src/app/Scenes/Show/Components/ShowArtworksEmptyState.tsx +++ b/src/app/Scenes/Show/Components/ShowArtworksEmptyState.tsx @@ -1,10 +1,10 @@ -import { ShowArtworksEmptyState_show } from "__generated__/ShowArtworksEmptyState_show.graphql" +import { ShowArtworksEmptyState_show$data } from "__generated__/ShowArtworksEmptyState_show.graphql" import { Box, BoxProps, SimpleMessage } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" export interface ShowArtworksEmptyStateProps extends BoxProps { - show: ShowArtworksEmptyState_show + show: ShowArtworksEmptyState_show$data } export const ShowArtworksEmptyState: React.FC = ({ diff --git a/src/app/Scenes/Show/Components/ShowContextCard.tsx b/src/app/Scenes/Show/Components/ShowContextCard.tsx index 2490e84fce8..b3c30639d98 100644 --- a/src/app/Scenes/Show/Components/ShowContextCard.tsx +++ b/src/app/Scenes/Show/Components/ShowContextCard.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType } from "@artsy/cohesion" -import { ShowContextCard_show } from "__generated__/ShowContextCard_show.graphql" +import { ShowContextCard_show$data } from "__generated__/ShowContextCard_show.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" export interface ShowContextCardProps extends BoxProps { - show: ShowContextCard_show + show: ShowContextCard_show$data } export const ShowContextCard: React.FC = ({ show, ...rest }) => { @@ -193,7 +193,7 @@ export const ShowContextCardFragmentContainer = createFragmentContainer(ShowCont `, }) -const extractPropsFromFair = (fair: ShowContextCard_show["fair"]): ContextCardProps => ({ +const extractPropsFromFair = (fair: ShowContextCard_show$data["fair"]): ContextCardProps => ({ sectionTitle: `Part of ${fair?.name}`, imageUrls: [fair?.image?.imageUrl ?? ""], iconUrl: fair?.profile?.icon?.imageUrl ?? "", @@ -203,7 +203,9 @@ const extractPropsFromFair = (fair: ShowContextCard_show["fair"]): ContextCardPr }) // TODO: confirm against bestiary of Show types? (regular, reference, online, stub) -const extractPropsFromPartner = (partner: ShowContextCard_show["partner"]): ContextCardProps => ({ +const extractPropsFromPartner = ( + partner: ShowContextCard_show$data["partner"] +): ContextCardProps => ({ sectionTitle: `Presented by ${partner?.name}`, imageUrls: partner?.artworksConnection?.edges?.map((edge) => edge?.node?.image?.url!) || [], title: partner?.name ?? "", diff --git a/src/app/Scenes/Show/Components/ShowHeader.tsx b/src/app/Scenes/Show/Components/ShowHeader.tsx index 32c8775f669..bbebc561891 100644 --- a/src/app/Scenes/Show/Components/ShowHeader.tsx +++ b/src/app/Scenes/Show/Components/ShowHeader.tsx @@ -1,4 +1,4 @@ -import { ShowHeader_show } from "__generated__/ShowHeader_show.graphql" +import { ShowHeader_show$data } from "__generated__/ShowHeader_show.graphql" import { useEventTiming } from "app/utils/useEventTiming" import { DateTime } from "luxon" import { Box, BoxProps, Text } from "palette" @@ -6,7 +6,7 @@ import React, { useEffect, useState } from "react" import { createFragmentContainer, graphql } from "react-relay" export interface ShowHeaderProps extends BoxProps { - show: ShowHeader_show + show: ShowHeader_show$data } export const ShowHeader: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Components/ShowHours.tsx b/src/app/Scenes/Show/Components/ShowHours.tsx index 2b5c3e7a92a..b36dd81bee3 100644 --- a/src/app/Scenes/Show/Components/ShowHours.tsx +++ b/src/app/Scenes/Show/Components/ShowHours.tsx @@ -1,11 +1,11 @@ -import { ShowHours_show } from "__generated__/ShowHours_show.graphql" +import { ShowHours_show$data } from "__generated__/ShowHours_show.graphql" import { BoxProps } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" import { ShowLocationHoursFragmentContainer as ShowLocationHours } from "./ShowLocationHours" export interface ShowHoursProps extends BoxProps { - show: ShowHours_show + show: ShowHours_show$data } export const ShowHours: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Components/ShowInfo.tsx b/src/app/Scenes/Show/Components/ShowInfo.tsx index 47e4af844e4..b73c5123fab 100644 --- a/src/app/Scenes/Show/Components/ShowInfo.tsx +++ b/src/app/Scenes/Show/Components/ShowInfo.tsx @@ -1,4 +1,4 @@ -import { ShowInfo_show } from "__generated__/ShowInfo_show.graphql" +import { ShowInfo_show$data } from "__generated__/ShowInfo_show.graphql" import { navigate } from "app/navigation/navigate" import { Box, BoxProps, ChevronIcon, Text } from "palette" import React from "react" @@ -6,7 +6,7 @@ import { TouchableOpacity } from "react-native" import { createFragmentContainer, graphql } from "react-relay" export interface ShowInfoProps extends BoxProps { - show: ShowInfo_show + show: ShowInfo_show$data } export const ShowInfo: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Components/ShowInstallShots.tsx b/src/app/Scenes/Show/Components/ShowInstallShots.tsx index 0b2647d5c8a..4d079c4c335 100644 --- a/src/app/Scenes/Show/Components/ShowInstallShots.tsx +++ b/src/app/Scenes/Show/Components/ShowInstallShots.tsx @@ -1,4 +1,4 @@ -import { ShowInstallShots_show } from "__generated__/ShowInstallShots_show.graphql" +import { ShowInstallShots_show$data } from "__generated__/ShowInstallShots_show.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { compact } from "lodash" import { Box, BoxProps, Spacer, Text } from "palette" @@ -7,7 +7,7 @@ import { FlatList } from "react-native" import { createFragmentContainer, graphql } from "react-relay" export interface ShowInstallShotsProps extends BoxProps { - show: ShowInstallShots_show + show: ShowInstallShots_show$data } export const ShowInstallShots: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Components/ShowLocation.tsx b/src/app/Scenes/Show/Components/ShowLocation.tsx index 318c8fec601..0cee00c74e1 100644 --- a/src/app/Scenes/Show/Components/ShowLocation.tsx +++ b/src/app/Scenes/Show/Components/ShowLocation.tsx @@ -1,11 +1,11 @@ -import { ShowLocation_show } from "__generated__/ShowLocation_show.graphql" +import { ShowLocation_show$data } from "__generated__/ShowLocation_show.graphql" import { LocationMapContainer as LocationMap } from "app/Components/LocationMap/LocationMap" import { Box, BoxProps } from "palette" import React from "react" import { createFragmentContainer, graphql } from "react-relay" export interface ShowLocationProps extends BoxProps { - show: ShowLocation_show + show: ShowLocation_show$data } export const ShowLocation: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Components/ShowLocationHours.tsx b/src/app/Scenes/Show/Components/ShowLocationHours.tsx index a0ba9de4f04..d597c99b661 100644 --- a/src/app/Scenes/Show/Components/ShowLocationHours.tsx +++ b/src/app/Scenes/Show/Components/ShowLocationHours.tsx @@ -1,4 +1,4 @@ -import { ShowLocationHours_location } from "__generated__/ShowLocationHours_location.graphql" +import { ShowLocationHours_location$data } from "__generated__/ShowLocationHours_location.graphql" import { Markdown } from "app/Components/Markdown" import { defaultRules } from "app/utils/renderMarkdown" import { Box, BoxProps, Text } from "palette" @@ -8,7 +8,7 @@ import { createFragmentContainer, graphql } from "react-relay" const MARKDOWN_RULES = defaultRules({ useNewTextStyles: true }) interface ShowLocationHours extends BoxProps { - location: ShowLocationHours_location + location: ShowLocationHours_location$data } const ShowLocationHours: React.FC = ({ diff --git a/src/app/Scenes/Show/Components/ShowViewingRoom.tsx b/src/app/Scenes/Show/Components/ShowViewingRoom.tsx index e32a1c457ab..30eab29fdef 100644 --- a/src/app/Scenes/Show/Components/ShowViewingRoom.tsx +++ b/src/app/Scenes/Show/Components/ShowViewingRoom.tsx @@ -1,5 +1,5 @@ import { ActionType, ContextModule, OwnerType, TappedViewingRoomCard } from "@artsy/cohesion" -import { ShowViewingRoom_show } from "__generated__/ShowViewingRoom_show.graphql" +import { ShowViewingRoom_show$data } from "__generated__/ShowViewingRoom_show.graphql" import { navigate } from "app/navigation/navigate" import { tagForStatus } from "app/Scenes/ViewingRoom/Components/ViewingRoomsListItem" import { Box, BoxProps, MediumCard } from "palette" @@ -9,7 +9,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" export interface ShowViewingRoomProps extends BoxProps { - show: ShowViewingRoom_show + show: ShowViewingRoom_show$data } export const ShowViewingRoom: React.FC = ({ show, ...rest }) => { diff --git a/src/app/Scenes/Show/Screens/ShowMoreInfo.tsx b/src/app/Scenes/Show/Screens/ShowMoreInfo.tsx index 33048ae21bf..d344193dffb 100644 --- a/src/app/Scenes/Show/Screens/ShowMoreInfo.tsx +++ b/src/app/Scenes/Show/Screens/ShowMoreInfo.tsx @@ -1,4 +1,4 @@ -import { ShowMoreInfo_show } from "__generated__/ShowMoreInfo_show.graphql" +import { ShowMoreInfo_show$data } from "__generated__/ShowMoreInfo_show.graphql" import { ShowMoreInfoQuery } from "__generated__/ShowMoreInfoQuery.graphql" import { PartnerEntityHeaderFragmentContainer as PartnerEntityHeader } from "app/Components/PartnerEntityHeader" import { ReadMore } from "app/Components/ReadMore" @@ -24,7 +24,7 @@ interface Section { } export interface ShowMoreInfoProps { - show: ShowMoreInfo_show + show: ShowMoreInfo_show$data } export const ShowMoreInfo: React.FC = ({ show }) => { diff --git a/src/app/Scenes/Show/Show.tsx b/src/app/Scenes/Show/Show.tsx index 432d5dadf54..aadf5140aa4 100644 --- a/src/app/Scenes/Show/Show.tsx +++ b/src/app/Scenes/Show/Show.tsx @@ -1,4 +1,4 @@ -import { Show_show } from "__generated__/Show_show.graphql" +import { Show_show$data } from "__generated__/Show_show.graphql" import { ShowQuery } from "__generated__/ShowQuery.graphql" import { ArtworkFiltersStoreProvider } from "app/Components/ArtworkFilter/ArtworkFilterStore" import { HeaderArtworksFilterWithTotalArtworks as HeaderArtworksFilter } from "app/Components/HeaderArtworksFilter/HeaderArtworksFilterWithTotalArtworks" @@ -30,7 +30,7 @@ interface ShowQueryRendererProps { } interface ShowProps { - show: Show_show + show: Show_show$data } export interface ViewableItems { diff --git a/src/app/Scenes/Tag/Tag.tsx b/src/app/Scenes/Tag/Tag.tsx index 33d40535bb2..8ff5b7b7878 100644 --- a/src/app/Scenes/Tag/Tag.tsx +++ b/src/app/Scenes/Tag/Tag.tsx @@ -1,4 +1,4 @@ -import { TagQuery, TagQueryResponse } from "__generated__/TagQuery.graphql" +import { TagQuery } from "__generated__/TagQuery.graphql" import { StickyTabPage, TabProps } from "app/Components/StickyTabPage/StickyTabPage" import About from "app/Components/Tag/About" import { TagArtworksPaginationContainer } from "app/Components/Tag/TagArtworks" @@ -23,7 +23,7 @@ const TABS = { interface TagProps { tagID?: string - tag: NonNullable + tag: NonNullable } interface TagQueryRendererProps { diff --git a/src/app/Scenes/Tag/TagHeader.tsx b/src/app/Scenes/Tag/TagHeader.tsx index e23121fe7d6..e1aa516efb8 100644 --- a/src/app/Scenes/Tag/TagHeader.tsx +++ b/src/app/Scenes/Tag/TagHeader.tsx @@ -1,10 +1,10 @@ -import { TagHeader_tag } from "__generated__/TagHeader_tag.graphql" +import { TagHeader_tag$data } from "__generated__/TagHeader_tag.graphql" import { Box, Text } from "palette" import React from "react" import { createFragmentContainer, graphql, RelayProp } from "react-relay" interface HeaderProps { - tag: TagHeader_tag + tag: TagHeader_tag$data relay: RelayProp } diff --git a/src/app/Scenes/VanityURL/VanityURLEntity.tests.tsx b/src/app/Scenes/VanityURL/VanityURLEntity.tests.tsx index febbd83c0f2..ca70ec30fb5 100644 --- a/src/app/Scenes/VanityURL/VanityURLEntity.tests.tsx +++ b/src/app/Scenes/VanityURL/VanityURLEntity.tests.tsx @@ -1,5 +1,4 @@ import { HeaderTabsGridPlaceholder } from "app/Components/HeaderTabGridPlaceholder" -import { defaultEnvironment } from "app/relay/createEnvironment" import { Fair, FairFragmentContainer, FairPlaceholder } from "app/Scenes/Fair/Fair" import { PartnerContainer } from "app/Scenes/Partner" import { __globalStoreTestUtils__ } from "app/store/GlobalStore" @@ -29,10 +28,11 @@ const TestRenderer: React.FC<{ } describe("VanityURLEntity", () => { - const env = defaultEnvironment as any as ReturnType + let env: ReturnType - afterEach(() => { - env.mockClear() + beforeEach(() => { + require("app/relay/createEnvironment").reset() + env = require("app/relay/createEnvironment").defaultEnvironment }) it("renders a VanityURLPossibleRedirect when 404", () => { @@ -95,6 +95,8 @@ describe("VanityURLEntity", () => { Query: () => ({ vanityURLEntity: { __typename: "Partner", + id: "some-gallery", + name: "Some Gallery", cities: [], }, }), @@ -105,8 +107,7 @@ describe("VanityURLEntity", () => { expect(partnerComponent).toBeDefined() }) - // TODO: Passes in isolation, but not with other specs - xit("renders a fair when a fair is returned", () => { + it("renders a fair when a fair is returned", () => { const tree = renderWithWrappers( ) @@ -119,6 +120,8 @@ describe("VanityURLEntity", () => { Query: () => ({ vanityURLEntity: { __typename: "Fair", + id: "some-fair", + slug: "some-fair", }, }), }) @@ -141,6 +144,8 @@ describe("VanityURLEntity", () => { data: { vanityURLEntity: { __typename: "UnknownType", + id: "some-unknown", + slug: "some-unknown", }, }, }) diff --git a/src/app/Scenes/VanityURL/VanityURLEntity.tsx b/src/app/Scenes/VanityURL/VanityURLEntity.tsx index f5de51fb868..421b7000b3f 100644 --- a/src/app/Scenes/VanityURL/VanityURLEntity.tsx +++ b/src/app/Scenes/VanityURL/VanityURLEntity.tsx @@ -1,4 +1,4 @@ -import { VanityURLEntity_fairOrPartner } from "__generated__/VanityURLEntity_fairOrPartner.graphql" +import { VanityURLEntity_fairOrPartner$data } from "__generated__/VanityURLEntity_fairOrPartner.graphql" import { VanityURLEntityQuery } from "__generated__/VanityURLEntityQuery.graphql" import { HeaderTabsGridPlaceholder } from "app/Components/HeaderTabGridPlaceholder" import { defaultEnvironment } from "app/relay/createEnvironment" @@ -14,13 +14,18 @@ import { VanityURLPossibleRedirect } from "./VanityURLPossibleRedirect" interface EntityProps { originalSlug: string - fairOrPartner: VanityURLEntity_fairOrPartner + fairOrPartner: VanityURLEntity_fairOrPartner$data } const VanityURLEntity: React.FC = ({ fairOrPartner, originalSlug }) => { - if (fairOrPartner.__typename === "Fair") { + // Because `__typename` is not allowed in fragments anymore, we need to check for the existance of `slug` or `id` in the fragment + // https://github.com/facebook/relay/commit/ed53bb095ddd494092819884cb4f46df94b45b79#diff-4e3d961b12253787bd61506608bc366be34ab276c09690de7df17203de7581e8 + const isFair = fairOrPartner.__typename === "Fair" || "slug" in fairOrPartner + const isPartner = fairOrPartner.__typename === "Partner" || "id" in fairOrPartner + + if (isFair) { return - } else if (fairOrPartner.__typename === "Partner") { + } else if (isPartner) { const { safeAreaInsets } = useScreenDimensions() return ( @@ -41,6 +46,7 @@ const VanityURLEntityFragmentContainer = createFragmentContainer(VanityURLEntity ...Fair_fair } ... on Partner { + id ...Partner_partner } } diff --git a/src/app/Scenes/ViewingRoom/Components/ViewingRoomArtworkRail.tsx b/src/app/Scenes/ViewingRoom/Components/ViewingRoomArtworkRail.tsx index 806c6a836cb..0d1378b67b0 100644 --- a/src/app/Scenes/ViewingRoom/Components/ViewingRoomArtworkRail.tsx +++ b/src/app/Scenes/ViewingRoom/Components/ViewingRoomArtworkRail.tsx @@ -1,4 +1,4 @@ -import { ViewingRoomArtworkRail_viewingRoom } from "__generated__/ViewingRoomArtworkRail_viewingRoom.graphql" +import { ViewingRoomArtworkRail_viewingRoom$data } from "__generated__/ViewingRoomArtworkRail_viewingRoom.graphql" import { SmallArtworkRail } from "app/Components/ArtworkRail/SmallArtworkRail" import { SectionTitle } from "app/Components/SectionTitle" import { navigate } from "app/navigation/navigate" @@ -10,7 +10,7 @@ import { createFragmentContainer, graphql } from "react-relay" import { useTracking } from "react-tracking" interface ViewingRoomArtworkRailProps { - viewingRoom: ViewingRoomArtworkRail_viewingRoom + viewingRoom: ViewingRoomArtworkRail_viewingRoom$data } export const ViewingRoomArtworkRail: React.FC = ({ viewingRoom }) => { diff --git a/src/app/Scenes/ViewingRoom/Components/ViewingRoomHeader.tsx b/src/app/Scenes/ViewingRoom/Components/ViewingRoomHeader.tsx index a0df5651b8e..0a98b8ca0b0 100644 --- a/src/app/Scenes/ViewingRoom/Components/ViewingRoomHeader.tsx +++ b/src/app/Scenes/ViewingRoom/Components/ViewingRoomHeader.tsx @@ -1,4 +1,4 @@ -import { ViewingRoomHeader_viewingRoom } from "__generated__/ViewingRoomHeader_viewingRoom.graphql" +import { ViewingRoomHeader_viewingRoom$data } from "__generated__/ViewingRoomHeader_viewingRoom.graphql" import { durationSections } from "app/Components/Countdown" import { CountdownTimer, CountdownTimerProps } from "app/Components/Countdown/CountdownTimer" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" @@ -12,7 +12,7 @@ import styled from "styled-components/native" import { ViewingRoomStatus } from "../ViewingRoom" interface ViewingRoomHeaderProps { - viewingRoom: ViewingRoomHeader_viewingRoom + viewingRoom: ViewingRoomHeader_viewingRoom$data } export const BackgroundImage = styled(OpaqueImageView)<{ height: number; width: number }>` diff --git a/src/app/Scenes/ViewingRoom/Components/ViewingRoomSubsections.tsx b/src/app/Scenes/ViewingRoom/Components/ViewingRoomSubsections.tsx index 3b23f06cb2e..69d53b82bd0 100644 --- a/src/app/Scenes/ViewingRoom/Components/ViewingRoomSubsections.tsx +++ b/src/app/Scenes/ViewingRoom/Components/ViewingRoomSubsections.tsx @@ -1,4 +1,4 @@ -import { ViewingRoomSubsections_viewingRoom } from "__generated__/ViewingRoomSubsections_viewingRoom.graphql" +import { ViewingRoomSubsections_viewingRoom$data } from "__generated__/ViewingRoomSubsections_viewingRoom.graphql" import OpaqueImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { Box, Text } from "palette" import { _maxWidth as maxWidth } from "palette" @@ -6,7 +6,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" interface ViewingRoomSubsectionProps { - viewingRoom: ViewingRoomSubsections_viewingRoom + viewingRoom: ViewingRoomSubsections_viewingRoom$data } export const ViewingRoomSubsections: React.FC = (props) => { diff --git a/src/app/Scenes/ViewingRoom/Components/ViewingRoomViewWorksButton.tsx b/src/app/Scenes/ViewingRoom/Components/ViewingRoomViewWorksButton.tsx index be95e2eba74..f60e7e5e390 100644 --- a/src/app/Scenes/ViewingRoom/Components/ViewingRoomViewWorksButton.tsx +++ b/src/app/Scenes/ViewingRoom/Components/ViewingRoomViewWorksButton.tsx @@ -1,5 +1,5 @@ import { themeGet } from "@styled-system/theme-get" -import { ViewingRoomViewWorksButton_viewingRoom } from "__generated__/ViewingRoomViewWorksButton_viewingRoom.graphql" +import { ViewingRoomViewWorksButton_viewingRoom$data } from "__generated__/ViewingRoomViewWorksButton_viewingRoom.graphql" import { AnimatedBottomButton } from "app/Components/AnimatedBottomButton" import { navigate } from "app/navigation/navigate" import { Schema } from "app/utils/track" @@ -11,7 +11,7 @@ import { useTracking } from "react-tracking" import styled from "styled-components/native" interface ViewingRoomViewWorksButtonProps { - viewingRoom: ViewingRoomViewWorksButton_viewingRoom + viewingRoom: ViewingRoomViewWorksButton_viewingRoom$data isVisible: boolean } diff --git a/src/app/Scenes/ViewingRoom/ViewingRoom.tsx b/src/app/Scenes/ViewingRoom/ViewingRoom.tsx index bb825b39464..c77f584f4d1 100644 --- a/src/app/Scenes/ViewingRoom/ViewingRoom.tsx +++ b/src/app/Scenes/ViewingRoom/ViewingRoom.tsx @@ -1,4 +1,4 @@ -import { ViewingRoom_viewingRoom } from "__generated__/ViewingRoom_viewingRoom.graphql" +import { ViewingRoom_viewingRoom$data } from "__generated__/ViewingRoom_viewingRoom.graphql" import { ViewingRoomQuery } from "__generated__/ViewingRoomQuery.graphql" import { getShareURL } from "app/Components/ShareSheet/helpers" import { navigate } from "app/navigation/navigate" @@ -21,7 +21,7 @@ import { ViewingRoomSubsectionsContainer } from "./Components/ViewingRoomSubsect import { ViewingRoomViewWorksButtonContainer } from "./Components/ViewingRoomViewWorksButton" interface ViewingRoomProps { - viewingRoom: ViewingRoom_viewingRoom + viewingRoom: ViewingRoom_viewingRoom$data } interface ViewingRoomSection { diff --git a/src/app/Scenes/ViewingRoom/ViewingRoomArtworks.tsx b/src/app/Scenes/ViewingRoom/ViewingRoomArtworks.tsx index b792708ba52..7189a0748d9 100644 --- a/src/app/Scenes/ViewingRoom/ViewingRoomArtworks.tsx +++ b/src/app/Scenes/ViewingRoom/ViewingRoomArtworks.tsx @@ -1,4 +1,4 @@ -import { ViewingRoomArtworks_viewingRoom } from "__generated__/ViewingRoomArtworks_viewingRoom.graphql" +import { ViewingRoomArtworks_viewingRoom$data } from "__generated__/ViewingRoomArtworks_viewingRoom.graphql" import { ViewingRoomArtworksQueryRendererQuery } from "__generated__/ViewingRoomArtworksQueryRendererQuery.graphql" import ImageView from "app/Components/OpaqueImageView/OpaqueImageView" import { ReadMore } from "app/Components/ReadMore" @@ -17,7 +17,7 @@ import { useTracking } from "react-tracking" const PAGE_SIZE = 5 interface ViewingRoomArtworksProps { relay: RelayPaginationProp - viewingRoom: ViewingRoomArtworks_viewingRoom + viewingRoom: ViewingRoomArtworks_viewingRoom$data } interface ArtworkSection { diff --git a/src/app/__fixtures__/ArtworkFixture.ts b/src/app/__fixtures__/ArtworkFixture.ts index 3010c78e1e7..9d0aa19d460 100644 --- a/src/app/__fixtures__/ArtworkFixture.ts +++ b/src/app/__fixtures__/ArtworkFixture.ts @@ -1,6 +1,8 @@ export const ArtworkFixture = { + " $fragmentType": null as any, " $refType": null as any, " $fragmentRefs": null as any, + " $fragmentSpreads": null as any, id: "abbas-kiarostami-untitled-7", internalID: "5b2b745e9c18db204fc32e11", _id: "5b2b745e9c18db204fc32e11", diff --git a/src/app/tests/MockRelayRendererFixtures.tsx b/src/app/tests/MockRelayRendererFixtures.tsx index 16fb622cab8..b9103ae84be 100644 --- a/src/app/tests/MockRelayRendererFixtures.tsx +++ b/src/app/tests/MockRelayRendererFixtures.tsx @@ -1,6 +1,5 @@ -import { MockRelayRendererFixtures_artist } from "__generated__/MockRelayRendererFixtures_artist.graphql" -import { MockRelayRendererFixtures_artwork } from "__generated__/MockRelayRendererFixtures_artwork.graphql" -import { MockRelayRendererFixtures_artworkMetadata } from "__generated__/MockRelayRendererFixtures_artworkMetadata.graphql" +import { MockRelayRendererFixtures_artist$data } from "__generated__/MockRelayRendererFixtures_artist.graphql" +import { MockRelayRendererFixtures_artwork$data } from "__generated__/MockRelayRendererFixtures_artwork.graphql" import { MockRelayRendererFixturesArtistQuery } from "__generated__/MockRelayRendererFixturesArtistQuery.graphql" import { ContextConsumer } from "app/utils/Context" import renderWithLoadProgress from "app/utils/renderWithLoadProgress" @@ -12,9 +11,7 @@ import { Image, Text, View } from "react-native" import { createFragmentContainer, graphql, QueryRenderer } from "react-relay" const Metadata = createFragmentContainer( - (props: { artworkMetadata: MockRelayRendererFixtures_artworkMetadata }) => ( - {props.artworkMetadata.title} - ), + (props: { artworkMetadata: any }) => {props.artworkMetadata.title}, { artworkMetadata: graphql` fragment MockRelayRendererFixtures_artworkMetadata on Artwork { @@ -25,7 +22,7 @@ const Metadata = createFragmentContainer( ) export const Artwork = createFragmentContainer( - (props: { artwork: MockRelayRendererFixtures_artwork }) => ( + (props: { artwork: MockRelayRendererFixtures_artwork$data }) => ( {props.artist.name}, + (props: { artist: MockRelayRendererFixtures_artist$data }) => {props.artist.name}, { artist: graphql` fragment MockRelayRendererFixtures_artist on Artist { diff --git a/src/app/utils/convertCityToGeoJSON.ts b/src/app/utils/convertCityToGeoJSON.ts index f2d97eb9c26..e31e708146a 100644 --- a/src/app/utils/convertCityToGeoJSON.ts +++ b/src/app/utils/convertCityToGeoJSON.ts @@ -1,4 +1,4 @@ -import { GlobalMap_viewer } from "__generated__/GlobalMap_viewer.graphql" +import { GlobalMap_viewer$data } from "__generated__/GlobalMap_viewer.graphql" import { Fair, Show } from "app/Scenes/Map/types" @@ -19,10 +19,10 @@ import { Fair, Show } from "app/Scenes/Map/types" // } export type FairsEdge = NonNullable< - NonNullable["fairs"]>["edges"] + NonNullable["fairs"]>["edges"] > export type ShowsEdge = NonNullable< - NonNullable["shows"]>["edges"] + NonNullable["shows"]>["edges"] > export const showsToGeoCityShow = (edges: Show[]): Show[] => diff --git a/src/app/utils/getOrderStatus.ts b/src/app/utils/getOrderStatus.ts index 07eff38bf46..1ed444c595c 100644 --- a/src/app/utils/getOrderStatus.ts +++ b/src/app/utils/getOrderStatus.ts @@ -1,11 +1,11 @@ import { CommerceOrderStateEnum, - OrderDetailsHeader_info, + OrderDetailsHeader_info$data, } from "__generated__/OrderDetailsHeader_info.graphql" import { OrderHistoryRowLineItem } from "./getTrackingUrl" export type OrderDetailsHeaderLineItem = NonNullable< - NonNullable["edges"]>[0] + NonNullable["edges"]>[0] >["node"] export type OrderState = Exclude< diff --git a/src/app/utils/getTrackingUrl.ts b/src/app/utils/getTrackingUrl.ts index 3251c16dc46..073c53eec23 100644 --- a/src/app/utils/getTrackingUrl.ts +++ b/src/app/utils/getTrackingUrl.ts @@ -1,12 +1,12 @@ -import { OrderHistoryRow_order } from "__generated__/OrderHistoryRow_order.graphql" -import { TrackOrderSection_section } from "__generated__/TrackOrderSection_section.graphql" +import { OrderHistoryRow_order$data } from "__generated__/OrderHistoryRow_order.graphql" +import { TrackOrderSection_section$data } from "__generated__/TrackOrderSection_section.graphql" export type OrderHistoryRowLineItem = NonNullable< - NonNullable["edges"]>[0] + NonNullable["edges"]>[0] >["node"] export type OrderDetailsTrackOrderSectionLineItem = NonNullable< - NonNullable["edges"]>[0] + NonNullable["edges"]>[0] >["node"] export function getTrackingUrl( diff --git a/src/app/utils/relayHelpers.ts b/src/app/utils/relayHelpers.ts index b2ab8d88c7d..375a3f01e72 100644 --- a/src/app/utils/relayHelpers.ts +++ b/src/app/utils/relayHelpers.ts @@ -1,6 +1,11 @@ import { defaultEnvironment } from "app/relay/createEnvironment" import { Record } from "relay-runtime/lib/store/RelayStoreTypes" +export type CleanRelayFragment = Omit< + T, + "$refType" | " $fragmentRefs" | " $fragmentSpreads" | " $fragmentType" +> + const getStore = () => defaultEnvironment.getStore() /** diff --git a/src/app/utils/verifyEmail.ts b/src/app/utils/verifyEmail.ts index f63b68fbbc4..ee765264320 100644 --- a/src/app/utils/verifyEmail.ts +++ b/src/app/utils/verifyEmail.ts @@ -1,11 +1,8 @@ -import { - verifyEmailMutation, - verifyEmailMutationResponse, -} from "__generated__/verifyEmailMutation.graphql" +import { verifyEmailMutation } from "__generated__/verifyEmailMutation.graphql" import { commitMutation, Environment, graphql } from "react-relay" export const verifyEmail = async (relayEnvironment: Environment) => { - return new Promise((done, reject) => { + return new Promise((done, reject) => { commitMutation(relayEnvironment, { onCompleted: (data, errors) => (errors && errors.length ? reject(errors) : done(data)), onError: (error) => reject(error), diff --git a/src/app/utils/verifyID.ts b/src/app/utils/verifyID.ts index 08c4ac037b0..0c5ca29f48e 100644 --- a/src/app/utils/verifyID.ts +++ b/src/app/utils/verifyID.ts @@ -1,8 +1,8 @@ -import { verifyIDMutation, verifyIDMutationResponse } from "__generated__/verifyIDMutation.graphql" +import { verifyIDMutation } from "__generated__/verifyIDMutation.graphql" import { commitMutation, Environment, graphql } from "react-relay" export const verifyID = async (relayEnvironment: Environment) => { - return new Promise((done, reject) => { + return new Promise((done, reject) => { commitMutation(relayEnvironment, { onCompleted: (data, errors) => (errors && errors.length ? reject(errors) : done(data)), onError: (error) => reject(error), diff --git a/yarn.lock b/yarn.lock index ae2944bb0f3..dc2ee3c1860 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4475,12 +4475,14 @@ babel-plugin-polyfill-regenerator@^0.3.0: dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" -babel-plugin-relay@12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-relay/-/babel-plugin-relay-12.0.0.tgz#cdce02494b69e9477a4507f9972f8473081b732d" - integrity sha512-fQWmS3YEu1smPx4xrn+7RyzDAlgVDG5q2m5cb+qC/Tr2+gANkxqGtQ+YPiOX6g4rgdbE+7a6RT3lViBExYBVKw== +babel-plugin-relay@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-relay/-/babel-plugin-relay-14.0.0.tgz#fb34a2f35e4b6ab5464ec82d7109b9973c5fea31" + integrity sha512-lOZplk+U6kBM7BsqpexpEIyQbob/XjUDdRin93WMfZEfXc2P+a6UiegZaXv5XdpG61tLUnvqjs4Td+UQxtqb8g== dependencies: babel-plugin-macros "^2.0.0" + cosmiconfig "^5.0.5" + graphql "15.3.0" "babel-plugin-styled-components@>= 1": version "1.10.0" @@ -5468,6 +5470,13 @@ cross-fetch@^3.0.4, cross-fetch@^3.0.6: dependencies: node-fetch "2.6.1" +cross-fetch@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -6640,18 +6649,18 @@ fbjs@^1.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -fbjs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165" - integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== +fbjs@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6" + integrity sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ== dependencies: - cross-fetch "^3.0.4" + cross-fetch "^3.1.5" fbjs-css-vars "^1.0.0" loose-envify "^1.0.0" object-assign "^4.1.0" promise "^7.1.1" setimmediate "^1.0.5" - ua-parser-js "^0.7.18" + ua-parser-js "^0.7.30" fd-slicer@~1.1.0: version "1.1.0" @@ -7289,6 +7298,11 @@ graphql@14.5.6: dependencies: iterall "^1.2.2" +graphql@15.3.0: + version "15.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" + integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== + grouped-queue@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c" @@ -7622,11 +7636,6 @@ immer-peasy@3.1.3: resolved "https://registry.yarnpkg.com/immer-peasy/-/immer-peasy-3.1.3.tgz#d0ea8d388f47ec6b15ab2ca19ffb9f0bf4310110" integrity sha512-WzoZ96A93jOmcDOLNChMWAqy+ZU8vEYQx2DcKjgo7P5SToiJs+GL+5yQbWzH8X02Lhvv6xrGgVNa1xbki66Eow== -immutable@~3.7.6: - version "3.7.6" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" - integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= - import-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" @@ -11734,16 +11743,16 @@ react-relay-network-modern@6.2.1: core-js "^3.0.0" extract-files "^9.0.0" -react-relay@12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/react-relay/-/react-relay-12.0.0.tgz#1b4d9429253b3d7c4d1dff5de7337a1de8b896e5" - integrity sha512-nDWJherEDtK35kK+gcDLUT6dhUG7EYQ8ePDJiCKBqCnkCx1272Ll7JcmYRBwyeL+IEp7J+CnUOAhv82VZxUh6g== +react-relay@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/react-relay/-/react-relay-14.0.0.tgz#c9f9b8912bcef589782bea6a382548d55d20d522" + integrity sha512-zqT8ZS1lq24p1R8nW5Vi03oB1Ix8aYJxyuSl4bB8XDjSNL0kFuAdN8R5LrundUd3vuKjkV1UBfb1xuuoRroUhA== dependencies: "@babel/runtime" "^7.0.0" - fbjs "^3.0.0" + fbjs "^3.0.2" invariant "^2.2.4" nullthrows "^1.1.1" - relay-runtime "12.0.0" + relay-runtime "14.0.0" react-shallow-renderer@^16.13.1: version "16.14.1" @@ -12104,35 +12113,10 @@ regjsparser@^0.8.2: dependencies: jsesc "~0.5.0" -relay-compiler-language-typescript@15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/relay-compiler-language-typescript/-/relay-compiler-language-typescript-15.0.1.tgz#78e952cdf6d7c9f833f168c6f8765e985a791d3d" - integrity sha512-hy760TxYhylNhSDkkxrQJvEqbhtknE8YtzmY+tRpgKGCq1Axi7eh3YjCLmfc3P2jumJXNEROQTkqqz8IbgU+tg== - dependencies: - invariant "^2.2.4" - -relay-compiler@12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-12.0.0.tgz#9f292d483fb871976018704138423a96c8a45439" - integrity sha512-SWqeSQZ+AMU/Cr7iZsHi1e78Z7oh00I5SvR092iCJq79aupqJ6Ds+I1Pz/Vzo5uY5PY0jvC4rBJXzlIN5g9boQ== - dependencies: - "@babel/core" "^7.14.0" - "@babel/generator" "^7.14.0" - "@babel/parser" "^7.14.0" - "@babel/runtime" "^7.0.0" - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.0.0" - babel-preset-fbjs "^3.4.0" - chalk "^4.0.0" - fb-watchman "^2.0.0" - fbjs "^3.0.0" - glob "^7.1.1" - immutable "~3.7.6" - invariant "^2.2.4" - nullthrows "^1.1.1" - relay-runtime "12.0.0" - signedsource "^1.0.0" - yargs "^15.3.1" +relay-compiler@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-14.0.0.tgz#03ab000c246c7c46a26b77584b345621155a770e" + integrity sha512-1h4lwvHg5efhivqpMfG6SS4cGoCJH3BsRelihwD+GNiylBnLKArSE6zyW7LfEwSpuDfJ+l6rrRfSL8IVZwOZ0g== relay-config@12.0.1: version "12.0.1" @@ -12148,24 +12132,24 @@ relay-mock-network-layer@3.0.0: dependencies: graphql-tools "^4.0.2" -relay-runtime@12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-12.0.0.tgz#1e039282bdb5e0c1b9a7dc7f6b9a09d4f4ff8237" - integrity sha512-QU6JKr1tMsry22DXNy9Whsq5rmvwr3LSZiiWV/9+DFpuTWvp+WFhobWMc8TC4OjKFfNhEZy7mOiqUAn5atQtug== +relay-runtime@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-14.0.0.tgz#e2fa40d73569d2ba5810c773fb85ac872b08b5d0" + integrity sha512-Rnf6EgCl3QY85il/gTEh6GHAR9hoRkjYWgMR2Y3Afugb8qLR0vL6m/GBYqol8W3L8B+XqZ2U04/g624DRpEqAw== dependencies: "@babel/runtime" "^7.0.0" - fbjs "^3.0.0" + fbjs "^3.0.2" invariant "^2.2.4" -relay-test-utils@12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/relay-test-utils/-/relay-test-utils-12.0.0.tgz#c8c2cdbef404430f71fdc846e3c7897a63efbbc9" - integrity sha512-LgTJACMDfk53Ua5lX3urWPAUSJ68tfLb2dDLKUszzChFDhHuILHpPsNghs/PXW4qM7k0tKILEacfw6mxQyhOgg== +relay-test-utils@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/relay-test-utils/-/relay-test-utils-14.0.0.tgz#2f67e369810f5714652bd72c46238fb52f247420" + integrity sha512-jWklGWWTFx+ZxMIisle6+0eyGVYqnarKpGwpgCitwWhGLoqTRIy2ChmqTX4ZPKfU3fq4g6Vqb1CXyga1GrHHnQ== dependencies: "@babel/runtime" "^7.0.0" - fbjs "^3.0.0" + fbjs "^3.0.2" invariant "^2.2.4" - relay-runtime "12.0.0" + relay-runtime "14.0.0" remove-markdown@0.1.0: version "0.1.0" @@ -12644,11 +12628,6 @@ signale@^1.4.0: figures "^2.0.0" pkg-conf "^2.1.0" -signedsource@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" - integrity sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo= - simple-markdown@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/simple-markdown/-/simple-markdown-0.7.3.tgz#e32150b2ec6f8287197d09869fd928747a9c5640" @@ -13777,7 +13756,7 @@ typical@^5.0.0, typical@^5.1.0: resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== -ua-parser-js@^0.7.18, ua-parser-js@^0.7.9: +ua-parser-js@^0.7.18, ua-parser-js@^0.7.30, ua-parser-js@^0.7.9: version "0.7.31" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6" integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==