diff --git a/.babelrc b/.babelrc index 0db564e20f..93b1d078bc 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,4 @@ { - "plugins": ["relay"], + "plugins": [["relay", { "artifactDirectory": "./src/__generated__" }]], "presets": ["react-native"] } diff --git a/.gitattributes b/.gitattributes index a19ade077d..ec297efdeb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ CHANGELOG.md merge=union +src/__generated__/*.graphql.ts linguist-generated \ No newline at end of file diff --git a/.gitignore b/.gitignore index a5ad99bcb6..3b7c8a9ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ ## Build generated build/ DerivedData -__generated__ dist ## Various settings diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..39610a4c52 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +src/__generated__/*.ts +node_modules \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3595fda43d..4875a9db69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ ## Master +* Upgrade to latest Relay, including our custome Node ID and language plugin patches - alloy +* Switch to using TypeScript artifacts generated by relay-compiler and the TS plugin - alloy + ### 1.4.5 * Schema fixes for LotsByFollowedArtists.tsx - ashkan diff --git a/package.json b/package.json index a634218bd3..a3a37747d5 100644 --- a/package.json +++ b/package.json @@ -11,16 +11,16 @@ "main": "index.ios.js", "scripts": { "bundle": - "yarn relay && react-native bundle --platform=ios --dev=false --entry-file=index.ios.js --bundle-output Pod/Assets/Emission.js --sourcemap-output Pod/Assets/Emission.js.map --assets-dest Pod/Assets && rm -rf Pod/Assets/assets/node_modules", + "react-native bundle --platform=ios --dev=false --entry-file=index.ios.js --bundle-output Pod/Assets/Emission.js --sourcemap-output Pod/Assets/Emission.js.map --assets-dest Pod/Assets && rm -rf Pod/Assets/assets/node_modules", "bundle-with-storybooks": - "yarn relay && react-native bundle --platform=ios --dev=true --entry-file=Example/Emission/index.ios.js --bundle-output Pod/Assets/Emission.js --assets-dest Pod/Assets", + "react-native bundle --platform=ios --dev=true --entry-file=Example/Emission/index.ios.js --bundle-output Pod/Assets/Emission.js --assets-dest Pod/Assets", "type-check": "tsc --noEmit --pretty", "lint": "tslint 'src/**/*.{ts,tsx}'", "lint-fix": "lint -- --fix", "prettier-write": "prettier --write", "prettier-project": "yarn run prettier-write 'src/**/*.{ts,tsx}'", "stylelint-project": " stylelint -- 'src/**/*.{ts,tsx}'", - "ci": "yarn relay && yarn type-check && yarn lint && yarn prettier-project -l && yarn test:ci", + "ci": "yarn type-check && yarn lint && yarn prettier-project -l && yarn test:ci", "danger": "danger", "start": "yarn start-servers", "start-servers": "concurrently --kill-others 'yarn start-packager' 'yarn relay --watch' 'yarn storybook'", @@ -33,7 +33,8 @@ "test": "jest", "test:ci": "jest --outputFile test-results.json --json", "testing": "jest --watch", - "relay": "relay-compiler --src ./src --schema data/schema.graphql --extensions ts tsx", + "relay": + "relay-compiler --src ./src --schema data/schema.graphql --language typescript --artifactDirectory ./src/__generated__", "sync-colors": "cd externals/elan && git fetch && git checkout origin/master && cp components/lib/variables/colors.json ../../data", "sync-externals": "npm run-script sync-schema && npm run-script sync-colors", @@ -46,7 +47,8 @@ "git push --follow-tags && env EMISSION_ROOT=\"$(pwd)\" pod repo push artsy --allow-warnings --use-json --skip-import-validation", "postinstall": "sed -i '' 's/#import /#import \"RCTValueAnimatedNode.h\"/' ./node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h && ./scripts/post_installs.sh || true", - "prestorybook": "rnstl" + "prestorybook": "rnstl", + "prepare": "patch-package" }, "repository": { "type": "git", @@ -60,6 +62,10 @@ }, "homepage": "https://github.com/artsy/emission#readme", "files": ["index.js", "data", "lib"], + "resolutions": { + "graphql": "^0.12.3", + "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.1/relay-runtime-1.5.0-artsy.1.tgz" + }, "dependencies": { "lodash": "^4.17.4", "moment": "^2.19.4", @@ -71,9 +77,9 @@ "react-native-parallax-scroll-view": "https://github.com/orta/react-native-parallax-scroll-view", "react-native-scrollable-tab-view": "^0.8.0", "react-native-sentry": "^0.30.2", - "react-relay": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/react-relay-1.3.0-artsy.1.tgz", + "react-relay": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.1/react-relay-1.5.0-artsy.1.tgz", "react-tracking": "^5.0.0", - "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-runtime-artsy.1.tgz", + "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.1/relay-runtime-1.5.0-artsy.1.tgz", "remove-markdown": "0.1.0", "styled-components": "^2.0.0" }, @@ -85,13 +91,13 @@ "@types/query-string": "^5.0.0", "@types/react": "^16.0.5", "@types/react-native": "^0.48.0", - "@types/react-relay": "^1.3.1", + "@types/react-relay": "^1.3.3", "@types/react-tracking": "^5.0.0", - "@types/relay-runtime": "^1.3.1", + "@types/relay-runtime": "^1.3.2", "awesome-typescript-loader": "^3.2.3", "babel-jest": "^18.0.0", "babel-plugin-relay": - "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/babel-plugin-relay-1.3.0-artsy.1.tgz", + "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.1/babel-plugin-relay-1.5.0-artsy.1.tgz", "babel-polyfill": "^6.13.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", @@ -106,13 +112,17 @@ "jest-react-native": "18.0.0", "jest-styled-components": "^4.9.0", "lint-staged": "^6.0.0", + "patch-package": "^5.0.0", + "postinstall-prepare": "^1.0.1", "prettier": "1.9.2", "react-dom": "16.0.0-alpha.12", "react-native-storybook-loader": "^1.6.0", "react-storybooks-relay-container": "^1.0.0", "react-test-renderer": "16.0.0-alpha.12", "recursive-readdir-sync": "^1.0.6", - "relay-compiler": "https://github.com/alloy/relay/releases/download/v1.3.0-artsy/relay-compiler-1.3.0-artsy.1.tgz", + "relay-compiler": + "https://github.com/alloy/relay/releases/download/v1.5.0-artsy.1/relay-compiler-1.5.0-artsy.1.tgz", + "relay-compiler-language-typescript": "^0.9.0", "relay2ts": "^0.2.0", "snapshot-diff": "^0.2.1", "stylelint": "^7.13.0", diff --git a/patches/graphql+0.12.3.patch b/patches/graphql+0.12.3.patch new file mode 100644 index 0000000000..481901bbd7 --- /dev/null +++ b/patches/graphql+0.12.3.patch @@ -0,0 +1,24 @@ +patch-package +--- a/node_modules/graphql/utilities/assertValidName.js ++++ b/node_modules/graphql/utilities/assertValidName.js +@@ -41,13 +41,13 @@ function assertValidName(name) { + */ + function isValidNameError(name, node) { + !(typeof name === 'string') ? (0, _invariant2.default)(0, 'Expected string') : void 0; +- if (name.length > 1 && name[0] === '_' && name[1] === '_' && +- // Note: this special case is not part of the spec and exists only to +- // support legacy server configurations. Do not rely on this special case +- // as it may be removed at any time. +- name !== '__configs__') { +- return new _GraphQLError.GraphQLError('Name "' + name + '" must not begin with "__", which is reserved by ' + 'GraphQL introspection.', node); +- } ++ // if (name.length > 1 && name[0] === '_' && name[1] === '_' && ++ // // Note: this special case is not part of the spec and exists only to ++ // // support legacy server configurations. Do not rely on this special case ++ // // as it may be removed at any time. ++ // name !== '__configs__') { ++ // return new _GraphQLError.GraphQLError('Name "' + name + '" must not begin with "__", which is reserved by ' + 'GraphQL introspection.', node); ++ // } + if (!NAME_RX.test(name)) { + return new _GraphQLError.GraphQLError('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "' + name + '" does not.', node); + } diff --git a/src/__generated__/About_artist.graphql.ts b/src/__generated__/About_artist.graphql.ts new file mode 100644 index 0000000000..7951ad5af8 --- /dev/null +++ b/src/__generated__/About_artist.graphql.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type About_artist = { + readonly has_metadata: boolean | null; + readonly is_display_auction_link: boolean | null; + readonly id: string; + readonly related_artists: ReadonlyArray<({ + }) | null> | null; + readonly articles: ReadonlyArray<({ + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "About_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "has_metadata", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_display_auction_link", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "Biography_artist", + "args": null + }, + { + "kind": "LinkedField", + "alias": "related_artists", + "name": "artists", + "storageKey": "artists(size:16)", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 16, + "type": "Int" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "RelatedArtists_artists", + "args": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "articles", + "storageKey": null, + "args": null, + "concreteType": "Article", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Articles_articles", + "args": null + }, + v0 + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '0d92b625a9f137deef4539f44df5d64c'; +export default node; diff --git a/src/__generated__/About_gene.graphql.ts b/src/__generated__/About_gene.graphql.ts new file mode 100644 index 0000000000..49984cb60d --- /dev/null +++ b/src/__generated__/About_gene.graphql.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type About_gene = { + readonly trending_artists: ReadonlyArray<({ + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "About_gene", + "type": "Gene", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "FragmentSpread", + "name": "Biography_gene", + "args": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "trending_artists", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "RelatedArtists_artists", + "args": null + }, + v0 + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'f49aab34dd4e87ee0079aac465f2313a'; +export default node; diff --git a/src/__generated__/ActiveBid_bid.graphql.ts b/src/__generated__/ActiveBid_bid.graphql.ts new file mode 100644 index 0000000000..b240f30795 --- /dev/null +++ b/src/__generated__/ActiveBid_bid.graphql.ts @@ -0,0 +1,227 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ActiveBid_bid = { + readonly is_leading_bidder: boolean | null; + readonly sale: ({ + readonly href: string | null; + readonly is_live_open: boolean | null; + }) | null; + readonly most_recent_bid: ({ + readonly __id: string; + readonly max_bid: ({ + readonly display: string | null; + }) | null; + readonly sale_artwork: ({ + readonly artwork: ({ + readonly href: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; + readonly artist_names: string | null; + }) | null; + readonly counts: ({ + readonly bidder_positions: any | null; + }) | null; + readonly highest_bid: ({ + readonly display: string | null; + }) | null; + readonly lot_number: string | null; + readonly reserve_status: string | null; + }) | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ActiveBid_bid", + "type": "LotStanding", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v2 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + } + ], + "idField": "__id" + } + ] +}; +})(); +(node as any).hash = 'b7dfb7280121bbc46555b5ccaa2b2f0c'; +export default node; diff --git a/src/__generated__/ActiveBidsQuery.graphql.ts b/src/__generated__/ActiveBidsQuery.graphql.ts new file mode 100644 index 0000000000..8680b2f5eb --- /dev/null +++ b/src/__generated__/ActiveBidsQuery.graphql.ts @@ -0,0 +1,321 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ActiveBidsQueryVariables = { +}; +export type ActiveBidsQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ActiveBidsQuery { + me { + ...ActiveBids_me + __id + } +} + +fragment ActiveBids_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + ...ActiveBid_bid + } + __id +} + +fragment ActiveBid_bid on LotStanding { + is_leading_bidder + sale { + href + is_live_open + __id + } + most_recent_bid { + __id + max_bid { + display + } + sale_artwork { + artwork { + href + image { + url + } + artist_names + __id + } + counts { + bidder_positions + } + highest_bid { + display + id + } + lot_number + reserve_status + __id + } + } +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ActiveBidsQuery", + "id": null, + "text": "query ActiveBidsQuery {\n me {\n ...ActiveBids_me\n __id\n }\n}\n\nfragment ActiveBids_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n ...ActiveBid_bid\n }\n __id\n}\n\nfragment ActiveBid_bid on LotStanding {\n is_leading_bidder\n sale {\n href\n is_live_open\n __id\n }\n most_recent_bid {\n __id\n max_bid {\n display\n }\n sale_artwork {\n artwork {\n href\n image {\n url\n }\n artist_names\n __id\n }\n counts {\n bidder_positions\n }\n highest_bid {\n display\n id\n }\n lot_number\n reserve_status\n __id\n }\n }\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ActiveBidsQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ActiveBids_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ActiveBidsQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v1 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '483ea8a9a4515e5f1b1d1adba38c309a'; +export default node; diff --git a/src/__generated__/ActiveBidsRefetchQuery.graphql.ts b/src/__generated__/ActiveBidsRefetchQuery.graphql.ts new file mode 100644 index 0000000000..3ea343315f --- /dev/null +++ b/src/__generated__/ActiveBidsRefetchQuery.graphql.ts @@ -0,0 +1,321 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ActiveBidsRefetchQueryVariables = { +}; +export type ActiveBidsRefetchQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ActiveBidsRefetchQuery { + me { + ...ActiveBids_me + __id + } +} + +fragment ActiveBids_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + ...ActiveBid_bid + } + __id +} + +fragment ActiveBid_bid on LotStanding { + is_leading_bidder + sale { + href + is_live_open + __id + } + most_recent_bid { + __id + max_bid { + display + } + sale_artwork { + artwork { + href + image { + url + } + artist_names + __id + } + counts { + bidder_positions + } + highest_bid { + display + id + } + lot_number + reserve_status + __id + } + } +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ActiveBidsRefetchQuery", + "id": null, + "text": "query ActiveBidsRefetchQuery {\n me {\n ...ActiveBids_me\n __id\n }\n}\n\nfragment ActiveBids_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n ...ActiveBid_bid\n }\n __id\n}\n\nfragment ActiveBid_bid on LotStanding {\n is_leading_bidder\n sale {\n href\n is_live_open\n __id\n }\n most_recent_bid {\n __id\n max_bid {\n display\n }\n sale_artwork {\n artwork {\n href\n image {\n url\n }\n artist_names\n __id\n }\n counts {\n bidder_positions\n }\n highest_bid {\n display\n id\n }\n lot_number\n reserve_status\n __id\n }\n }\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ActiveBidsRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ActiveBids_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ActiveBidsRefetchQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v1 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'b529b67581dfe01e1ade3820469a2902'; +export default node; diff --git a/src/__generated__/ActiveBids_me.graphql.ts b/src/__generated__/ActiveBids_me.graphql.ts new file mode 100644 index 0000000000..1a02a151a8 --- /dev/null +++ b/src/__generated__/ActiveBids_me.graphql.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ActiveBids_me = { + readonly lot_standings: ReadonlyArray<({ + readonly most_recent_bid: ({ + readonly __id: string; + }) | null; + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ActiveBids_me", + "type": "Me", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0 + ], + "idField": "__id" + }, + { + "kind": "FragmentSpread", + "name": "ActiveBid_bid", + "args": null + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '7a308d9363d144841752a8266770a87e'; +export default node; diff --git a/src/__generated__/Article_article.graphql.ts b/src/__generated__/Article_article.graphql.ts new file mode 100644 index 0000000000..74a872f147 --- /dev/null +++ b/src/__generated__/Article_article.graphql.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Article_article = { + readonly thumbnail_title: string | null; + readonly href: string | null; + readonly author: ({ + readonly name: string | null; + }) | null; + readonly thumbnail_image: ({ + readonly url: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Article_article", + "type": "Article", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "thumbnail_title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "author", + "storageKey": null, + "args": null, + "concreteType": "Author", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "thumbnail_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '0c88898acb243d600094f137ff15cde0'; +export default node; diff --git a/src/__generated__/Articles_articles.graphql.ts b/src/__generated__/Articles_articles.graphql.ts new file mode 100644 index 0000000000..5fb87f46da --- /dev/null +++ b/src/__generated__/Articles_articles.graphql.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Articles_articles = ReadonlyArray<{ + readonly __id: string; + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Articles_articles", + "type": "Article", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "Article_article", + "args": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'da4adfd005ba319a9b348baea0b82933'; +export default node; diff --git a/src/__generated__/ArtistCard_artist.graphql.ts b/src/__generated__/ArtistCard_artist.graphql.ts new file mode 100644 index 0000000000..15374577d3 --- /dev/null +++ b/src/__generated__/ArtistCard_artist.graphql.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtistCard_artist = { + readonly id: string; + readonly _id: string; + readonly href: string | null; + readonly name: string | null; + readonly formatted_artworks_count: string | null; + readonly formatted_nationality_and_birthday: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "ArtistCard_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "formatted_artworks_count", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "formatted_nationality_and_birthday", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '420e85984a492f3845bd86d1795b912c'; +export default node; diff --git a/src/__generated__/ArtistForSaleArtworksGridQuery.graphql.ts b/src/__generated__/ArtistForSaleArtworksGridQuery.graphql.ts new file mode 100644 index 0000000000..5af704004c --- /dev/null +++ b/src/__generated__/ArtistForSaleArtworksGridQuery.graphql.ts @@ -0,0 +1,551 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistArtworksFilters = "IS_FOR_SALE" | "IS_NOT_FOR_SALE" | "%future added value"; +export type ArtistForSaleArtworksGridQueryVariables = { + readonly __id: string; + readonly count: number; + readonly cursor?: string | null; + readonly filter?: ReadonlyArray | null; +}; +export type ArtistForSaleArtworksGridQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query ArtistForSaleArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $filter: [ArtistArtworksFilters] +) { + node(__id: $__id) { + __typename + ... on Artist { + ...ArtistForSaleArtworksGrid_artist_3KQYpM + } + __id + } +} + +fragment ArtistForSaleArtworksGrid_artist_3KQYpM on Artist { + __id + forSaleArtworks: artworks_connection(first: $count, after: $cursor, filter: $filter, sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "filter", + "type": "[ArtistArtworksFilters]", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v5 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistForSaleArtworksGridQuery", + "id": null, + "text": "query ArtistForSaleArtworksGridQuery(\n $__id: ID!\n $count: Int!\n $cursor: String\n $filter: [ArtistArtworksFilters]\n) {\n node(__id: $__id) {\n __typename\n ... on Artist {\n ...ArtistForSaleArtworksGrid_artist_3KQYpM\n }\n __id\n }\n}\n\nfragment ArtistForSaleArtworksGrid_artist_3KQYpM on Artist {\n __id\n forSaleArtworks: artworks_connection(first: $count, after: $cursor, filter: $filter, sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistForSaleArtworksGridQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v2, + { + "kind": "InlineFragment", + "type": "Artist", + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtistForSaleArtworksGrid_artist", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": null + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistForSaleArtworksGridQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "Artist", + "selections": [ + { + "kind": "LinkedField", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v4 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v4 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v5, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v5, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v3 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "handle": "connection", + "key": "ArtistForSaleArtworksGrid_forSaleArtworks", + "filters": [ + "filter", + "sort" + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'd53e753743bf0e1d97d6a8353cf1e7ea'; +export default node; diff --git a/src/__generated__/ArtistForSaleArtworksGrid_artist.graphql.ts b/src/__generated__/ArtistForSaleArtworksGrid_artist.graphql.ts new file mode 100644 index 0000000000..407fb1a395 --- /dev/null +++ b/src/__generated__/ArtistForSaleArtworksGrid_artist.graphql.ts @@ -0,0 +1,203 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtistForSaleArtworksGrid_artist = { + readonly __id: string; + readonly forSaleArtworks: ({ + readonly pageInfo: { + readonly hasNextPage: boolean; + readonly startCursor: string | null; + readonly endCursor: string | null; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly id: string; + readonly __id: string; + readonly image: ({ + readonly aspect_ratio: number | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ArtistForSaleArtworksGrid_artist", + "type": "Artist", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "forSaleArtworks" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "filter", + "type": "[ArtistArtworksFilters]", + "defaultValue": [ + "IS_FOR_SALE" + ] + } + ], + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": "forSaleArtworks", + "name": "__ArtistForSaleArtworksGrid_forSaleArtworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Artwork_artwork", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'cb614bfbea19314be0d0ce69f75315b5'; +export default node; diff --git a/src/__generated__/ArtistHeaderQuery.graphql.ts b/src/__generated__/ArtistHeaderQuery.graphql.ts new file mode 100644 index 0000000000..aa0df82dd1 --- /dev/null +++ b/src/__generated__/ArtistHeaderQuery.graphql.ts @@ -0,0 +1,171 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistHeaderQueryVariables = { + readonly artistID: string; +}; +export type ArtistHeaderQueryResponse = { + readonly artist: ({ + }) | null; +}; + + + +/* +query ArtistHeaderQuery( + $artistID: String! +) { + artist(id: $artistID) { + ...Header_artist + __id + } +} + +fragment Header_artist on Artist { + _id + id + name + nationality + birthday + counts { + follows + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "artistID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "artistID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistHeaderQuery", + "id": null, + "text": "query ArtistHeaderQuery(\n $artistID: String!\n) {\n artist(id: $artistID) {\n ...Header_artist\n __id\n }\n}\n\nfragment Header_artist on Artist {\n _id\n id\n name\n nationality\n birthday\n counts {\n follows\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistHeaderQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Header_artist", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistHeaderQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "nationality", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "birthday", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "follows", + "args": null, + "storageKey": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'e7898450d087c728259c6cf89d6d7ce0'; +export default node; diff --git a/src/__generated__/ArtistNotForSaleArtworksGridQuery.graphql.ts b/src/__generated__/ArtistNotForSaleArtworksGridQuery.graphql.ts new file mode 100644 index 0000000000..a80849b50e --- /dev/null +++ b/src/__generated__/ArtistNotForSaleArtworksGridQuery.graphql.ts @@ -0,0 +1,551 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistArtworksFilters = "IS_FOR_SALE" | "IS_NOT_FOR_SALE" | "%future added value"; +export type ArtistNotForSaleArtworksGridQueryVariables = { + readonly __id: string; + readonly count: number; + readonly cursor?: string | null; + readonly filter?: ReadonlyArray | null; +}; +export type ArtistNotForSaleArtworksGridQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query ArtistNotForSaleArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $filter: [ArtistArtworksFilters] +) { + node(__id: $__id) { + __typename + ... on Artist { + ...ArtistNotForSaleArtworksGrid_artist_3KQYpM + } + __id + } +} + +fragment ArtistNotForSaleArtworksGrid_artist_3KQYpM on Artist { + __id + notForSaleArtworks: artworks_connection(first: $count, after: $cursor, filter: $filter, sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "filter", + "type": "[ArtistArtworksFilters]", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v5 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistNotForSaleArtworksGridQuery", + "id": null, + "text": "query ArtistNotForSaleArtworksGridQuery(\n $__id: ID!\n $count: Int!\n $cursor: String\n $filter: [ArtistArtworksFilters]\n) {\n node(__id: $__id) {\n __typename\n ... on Artist {\n ...ArtistNotForSaleArtworksGrid_artist_3KQYpM\n }\n __id\n }\n}\n\nfragment ArtistNotForSaleArtworksGrid_artist_3KQYpM on Artist {\n __id\n notForSaleArtworks: artworks_connection(first: $count, after: $cursor, filter: $filter, sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistNotForSaleArtworksGridQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v2, + { + "kind": "InlineFragment", + "type": "Artist", + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtistNotForSaleArtworksGrid_artist", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": null + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistNotForSaleArtworksGridQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "Artist", + "selections": [ + { + "kind": "LinkedField", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v4 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v4 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v5, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v5, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v3 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "handle": "connection", + "key": "ArtistNotForSaleArtworksGrid_notForSaleArtworks", + "filters": [ + "filter", + "sort" + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '05075e0c740a2b8f3712c708ae6b6407'; +export default node; diff --git a/src/__generated__/ArtistNotForSaleArtworksGrid_artist.graphql.ts b/src/__generated__/ArtistNotForSaleArtworksGrid_artist.graphql.ts new file mode 100644 index 0000000000..b4ef7946e6 --- /dev/null +++ b/src/__generated__/ArtistNotForSaleArtworksGrid_artist.graphql.ts @@ -0,0 +1,203 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtistNotForSaleArtworksGrid_artist = { + readonly __id: string; + readonly notForSaleArtworks: ({ + readonly pageInfo: { + readonly hasNextPage: boolean; + readonly startCursor: string | null; + readonly endCursor: string | null; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly id: string; + readonly __id: string; + readonly image: ({ + readonly aspect_ratio: number | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ArtistNotForSaleArtworksGrid_artist", + "type": "Artist", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "notForSaleArtworks" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "filter", + "type": "[ArtistArtworksFilters]", + "defaultValue": [ + "IS_NOT_FOR_SALE" + ] + } + ], + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": "notForSaleArtworks", + "name": "__ArtistNotForSaleArtworksGrid_notForSaleArtworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "filter", + "variableName": "filter", + "type": "[ArtistArtworksFilters]" + }, + { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Artwork_artwork", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '0a2227851191d149ed117a8277e8acd1'; +export default node; diff --git a/src/__generated__/ArtistQuery.graphql.ts b/src/__generated__/ArtistQuery.graphql.ts new file mode 100644 index 0000000000..af5538e344 --- /dev/null +++ b/src/__generated__/ArtistQuery.graphql.ts @@ -0,0 +1,1061 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistQueryVariables = { + readonly artistID: string; +}; +export type ArtistQueryResponse = { + readonly artist: ({ + }) | null; +}; + + + +/* +query ArtistQuery( + $artistID: String! +) { + artist(id: $artistID) { + ...Artist_artist + __id + } +} + +fragment Artist_artist on Artist { + _id + id + has_metadata + counts { + artworks + partner_shows + related_artists + articles + } + ...Header_artist + ...About_artist + ...Shows_artist + ...Artworks_artist + __id +} + +fragment Header_artist on Artist { + _id + id + name + nationality + birthday + counts { + follows + } + __id +} + +fragment About_artist on Artist { + has_metadata + is_display_auction_link + id + ...Biography_artist + related_artists: artists(size: 16) { + ...RelatedArtists_artists + __id + } + articles { + ...Articles_articles + __id + } + __id +} + +fragment Shows_artist on Artist { + current_shows: partner_shows(status: "running") { + ...VariableSizeShowsList_shows + __id + } + upcoming_shows: partner_shows(status: "upcoming") { + ...VariableSizeShowsList_shows + __id + } + past_small_shows: partner_shows(status: "closed", size: 20) @skip(if: $isPad) { + ...SmallList_shows + __id + } + past_large_shows: partner_shows(status: "closed", size: 20) @include(if: $isPad) { + ...VariableSizeShowsList_shows + __id + } + __id +} + +fragment Artworks_artist on Artist { + counts { + artworks + for_sale_artworks + } + ...ArtistForSaleArtworksGrid_artist + ...ArtistNotForSaleArtworksGrid_artist + __id +} + +fragment ArtistForSaleArtworksGrid_artist on Artist { + __id + forSaleArtworks: artworks_connection(first: 10, filter: [IS_FOR_SALE], sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment ArtistNotForSaleArtworksGrid_artist on Artist { + __id + notForSaleArtworks: artworks_connection(first: 10, filter: [IS_NOT_FOR_SALE], sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} + +fragment VariableSizeShowsList_shows on PartnerShow { + __id + ...Show_show +} + +fragment SmallList_shows on PartnerShow { + ...Show_show + __id +} + +fragment Show_show on PartnerShow { + href + cover_image { + url(version: "large") + } + ...Metadata_show + __id +} + +fragment Metadata_show on PartnerShow { + kind + name + exhibition_period + status_update + status + partner { + name + __id + } + location { + city + __id + } + __id +} + +fragment Biography_artist on Artist { + bio + blurb + __id +} + +fragment RelatedArtists_artists on Artist { + __id + ...RelatedArtist_artist +} + +fragment Articles_articles on Article { + __id + ...Article_article +} + +fragment Article_article on Article { + thumbnail_title + href + author { + name + __id + } + thumbnail_image { + url(version: "large") + } + __id +} + +fragment RelatedArtist_artist on Artist { + href + name + counts { + for_sale_artworks + artworks + } + image { + url(version: "large") + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "artistID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "artistID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v9 = [ + v8 +], +v10 = [ + v5, + v2 +], +v11 = { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 +}, +v12 = { + "kind": "ScalarField", + "alias": null, + "name": "kind", + "args": null, + "storageKey": null +}, +v13 = { + "kind": "ScalarField", + "alias": null, + "name": "exhibition_period", + "args": null, + "storageKey": null +}, +v14 = { + "kind": "ScalarField", + "alias": null, + "name": "status_update", + "args": null, + "storageKey": null +}, +v15 = { + "kind": "ScalarField", + "alias": null, + "name": "status", + "args": null, + "storageKey": null +}, +v16 = { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v10, + "idField": "__id" +}, +v17 = { + "kind": "LinkedField", + "alias": null, + "name": "location", + "storageKey": null, + "args": null, + "concreteType": "Location", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "city", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" +}, +v18 = [ + v2, + v7, + v11, + v12, + v5, + v13, + v14, + v15, + v16, + v17 +], +v19 = { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" +}, +v20 = { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" +}, +v21 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v22 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v6, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + v8 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v21 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v21 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v10, + "idField": "__id" + }, + v16, + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } +], +v23 = [ + "filter", + "sort" +], +v24 = [ + { + "kind": "Literal", + "name": "size", + "value": 20, + "type": "Int" + }, + { + "kind": "Literal", + "name": "status", + "value": "closed", + "type": "String" + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistQuery", + "id": null, + "text": "query ArtistQuery(\n $artistID: String!\n) {\n artist(id: $artistID) {\n ...Artist_artist\n __id\n }\n}\n\nfragment Artist_artist on Artist {\n _id\n id\n has_metadata\n counts {\n artworks\n partner_shows\n related_artists\n articles\n }\n ...Header_artist\n ...About_artist\n ...Shows_artist\n ...Artworks_artist\n __id\n}\n\nfragment Header_artist on Artist {\n _id\n id\n name\n nationality\n birthday\n counts {\n follows\n }\n __id\n}\n\nfragment About_artist on Artist {\n has_metadata\n is_display_auction_link\n id\n ...Biography_artist\n related_artists: artists(size: 16) {\n ...RelatedArtists_artists\n __id\n }\n articles {\n ...Articles_articles\n __id\n }\n __id\n}\n\nfragment Shows_artist on Artist {\n current_shows: partner_shows(status: \"running\") {\n ...VariableSizeShowsList_shows\n __id\n }\n upcoming_shows: partner_shows(status: \"upcoming\") {\n ...VariableSizeShowsList_shows\n __id\n }\n past_small_shows: partner_shows(status: \"closed\", size: 20) @skip(if: $isPad) {\n ...SmallList_shows\n __id\n }\n past_large_shows: partner_shows(status: \"closed\", size: 20) @include(if: $isPad) {\n ...VariableSizeShowsList_shows\n __id\n }\n __id\n}\n\nfragment Artworks_artist on Artist {\n counts {\n artworks\n for_sale_artworks\n }\n ...ArtistForSaleArtworksGrid_artist\n ...ArtistNotForSaleArtworksGrid_artist\n __id\n}\n\nfragment ArtistForSaleArtworksGrid_artist on Artist {\n __id\n forSaleArtworks: artworks_connection(first: 10, filter: [IS_FOR_SALE], sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment ArtistNotForSaleArtworksGrid_artist on Artist {\n __id\n notForSaleArtworks: artworks_connection(first: 10, filter: [IS_NOT_FOR_SALE], sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n\nfragment VariableSizeShowsList_shows on PartnerShow {\n __id\n ...Show_show\n}\n\nfragment SmallList_shows on PartnerShow {\n ...Show_show\n __id\n}\n\nfragment Show_show on PartnerShow {\n href\n cover_image {\n url(version: \"large\")\n }\n ...Metadata_show\n __id\n}\n\nfragment Metadata_show on PartnerShow {\n kind\n name\n exhibition_period\n status_update\n status\n partner {\n name\n __id\n }\n location {\n city\n __id\n }\n __id\n}\n\nfragment Biography_artist on Artist {\n bio\n blurb\n __id\n}\n\nfragment RelatedArtists_artists on Artist {\n __id\n ...RelatedArtist_artist\n}\n\nfragment Articles_articles on Article {\n __id\n ...Article_article\n}\n\nfragment Article_article on Article {\n thumbnail_title\n href\n author {\n name\n __id\n }\n thumbnail_image {\n url(version: \"large\")\n }\n __id\n}\n\nfragment RelatedArtist_artist on Artist {\n href\n name\n counts {\n for_sale_artworks\n artworks\n }\n image {\n url(version: \"large\")\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artist_artist", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "has_metadata", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "partner_shows", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "related_artists", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "articles", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "follows", + "args": null, + "storageKey": null + }, + v4 + ] + }, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "nationality", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "birthday", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_display_auction_link", + "args": null, + "storageKey": null + }, + v6, + { + "kind": "ScalarField", + "alias": null, + "name": "blurb", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": "related_artists", + "name": "artists", + "storageKey": "artists(size:16)", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 16, + "type": "Int" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": [ + v2, + v7, + v5, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + v4, + v3 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "articles", + "storageKey": null, + "args": null, + "concreteType": "Article", + "plural": true, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "thumbnail_title", + "args": null, + "storageKey": null + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "author", + "storageKey": null, + "args": null, + "concreteType": "Author", + "plural": false, + "selections": v10, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "thumbnail_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "current_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"running\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "running", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "upcoming_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"upcoming\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "upcoming", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "storageKey": "artworks_connection(filter:[\"IS_FOR_SALE\"],first:10,sort:\"partner_updated_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": v22 + }, + { + "kind": "LinkedHandle", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "handle": "connection", + "key": "ArtistForSaleArtworksGrid_forSaleArtworks", + "filters": v23 + }, + { + "kind": "LinkedField", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "storageKey": "artworks_connection(filter:[\"IS_NOT_FOR_SALE\"],first:10,sort:\"partner_updated_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_NOT_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": v22 + }, + { + "kind": "LinkedHandle", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_NOT_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "handle": "connection", + "key": "ArtistNotForSaleArtworksGrid_notForSaleArtworks", + "filters": v23 + }, + { + "kind": "Condition", + "passingValue": false, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_small_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v24, + "concreteType": "PartnerShow", + "plural": true, + "selections": [ + v7, + v11, + v12, + v5, + v13, + v14, + v15, + v16, + v17, + v2 + ], + "idField": "__id" + } + ] + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_large_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v24, + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '2b80a160abbe2890ba5c998d639c23c3'; +export default node; diff --git a/src/__generated__/ArtistRailRefetchQuery.graphql.ts b/src/__generated__/ArtistRailRefetchQuery.graphql.ts new file mode 100644 index 0000000000..e7dc23aed1 --- /dev/null +++ b/src/__generated__/ArtistRailRefetchQuery.graphql.ts @@ -0,0 +1,252 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistRailRefetchQueryVariables = { + readonly __id: string; + readonly fetchContent: boolean; +}; +export type ArtistRailRefetchQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query ArtistRailRefetchQuery( + $__id: ID! + $fetchContent: Boolean! +) { + node(__id: $__id) { + __typename + ...ArtistRail_rail_abFTe + __id + } +} + +fragment ArtistRail_rail_abFTe on HomePageArtistModule { + __id + key + results @include(if: $fetchContent) { + _id + __id + ...ArtistCard_artist + } +} + +fragment ArtistCard_artist on Artist { + id + _id + href + name + formatted_artworks_count + formatted_nationality_and_birthday + image { + url(version: "large") + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistRailRefetchQuery", + "id": null, + "text": "query ArtistRailRefetchQuery(\n $__id: ID!\n $fetchContent: Boolean!\n) {\n node(__id: $__id) {\n __typename\n ...ArtistRail_rail_abFTe\n __id\n }\n}\n\nfragment ArtistRail_rail_abFTe on HomePageArtistModule {\n __id\n key\n results @include(if: $fetchContent) {\n _id\n __id\n ...ArtistCard_artist\n }\n}\n\nfragment ArtistCard_artist on Artist {\n id\n _id\n href\n name\n formatted_artworks_count\n formatted_nationality_and_birthday\n image {\n url(version: \"large\")\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistRailRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtistRail_rail", + "args": [ + { + "kind": "Variable", + "name": "fetchContent", + "variableName": "fetchContent", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistRailRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "InlineFragment", + "type": "HomePageArtistModule", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "formatted_artworks_count", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "formatted_nationality_and_birthday", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + } + ], + "idField": "__id" + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '83aebf6a7bfdffa29a2ebf916face80f'; +export default node; diff --git a/src/__generated__/ArtistRail_rail.graphql.ts b/src/__generated__/ArtistRail_rail.graphql.ts new file mode 100644 index 0000000000..e3a794f270 --- /dev/null +++ b/src/__generated__/ArtistRail_rail.graphql.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtistRail_rail = { + readonly __id: string; + readonly key: string | null; + readonly results?: ReadonlyArray<({ + readonly _id: string; + readonly __id: string; + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ArtistRail_rail", + "type": "HomePageArtistModule", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": false + } + ], + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "FragmentSpread", + "name": "ArtistCard_artist", + "args": null + } + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '7318209746f30396590ed7fad9d8db09'; +export default node; diff --git a/src/__generated__/Artist_artist.graphql.ts b/src/__generated__/Artist_artist.graphql.ts new file mode 100644 index 0000000000..58b8192517 --- /dev/null +++ b/src/__generated__/Artist_artist.graphql.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Artist_artist = { + readonly _id: string; + readonly id: string; + readonly has_metadata: boolean | null; + readonly counts: ({ + readonly artworks: any | null; + readonly partner_shows: any | null; + readonly related_artists: any | null; + readonly articles: any | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Artist_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "has_metadata", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "partner_shows", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "related_artists", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "articles", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Header_artist", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "About_artist", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "Shows_artist", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "Artworks_artist", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '6dfcb3f59d2bd93131cb1f69a08340e8'; +export default node; diff --git a/src/__generated__/ArtistsMeQuery.graphql.ts b/src/__generated__/ArtistsMeQuery.graphql.ts new file mode 100644 index 0000000000..b1bc193b03 --- /dev/null +++ b/src/__generated__/ArtistsMeQuery.graphql.ts @@ -0,0 +1,306 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistsMeQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type ArtistsMeQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ArtistsMeQuery( + $count: Int! + $cursor: String +) { + me { + ...Artists_me_1G22uz + __id + } +} + +fragment Artists_me_1G22uz on Me { + followed_artists_connection(first: $count, after: $cursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + artist { + id + __id + name + href + image { + url + } + } + __id + __typename + } + cursor + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistsMeQuery", + "id": null, + "text": "query ArtistsMeQuery(\n $count: Int!\n $cursor: String\n) {\n me {\n ...Artists_me_1G22uz\n __id\n }\n}\n\nfragment Artists_me_1G22uz on Me {\n followed_artists_connection(first: $count, after: $cursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n artist {\n id\n __id\n name\n href\n image {\n url\n }\n }\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistsMeQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artists_me", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistsMeQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followed_artists_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "concreteType": "FollowArtistConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowArtistEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowArtist", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "followed_artists_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "handle": "connection", + "key": "Artists_followed_artists_connection", + "filters": null + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'a06e6f32f9eb0bbdc9517ef7065762d2'; +export default node; diff --git a/src/__generated__/ArtistsRendererQuery.graphql.ts b/src/__generated__/ArtistsRendererQuery.graphql.ts new file mode 100644 index 0000000000..a7f74c7027 --- /dev/null +++ b/src/__generated__/ArtistsRendererQuery.graphql.ts @@ -0,0 +1,262 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtistsRendererQueryVariables = { +}; +export type ArtistsRendererQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ArtistsRendererQuery { + me { + ...Artists_me + __id + } +} + +fragment Artists_me on Me { + followed_artists_connection(first: 10) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + artist { + id + __id + name + href + image { + url + } + } + __id + __typename + } + cursor + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtistsRendererQuery", + "id": null, + "text": "query ArtistsRendererQuery {\n me {\n ...Artists_me\n __id\n }\n}\n\nfragment Artists_me on Me {\n followed_artists_connection(first: 10) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n artist {\n id\n __id\n name\n href\n image {\n url\n }\n }\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtistsRendererQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artists_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtistsRendererQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followed_artists_connection", + "storageKey": "followed_artists_connection(first:10)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "FollowArtistConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowArtistEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowArtist", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "followed_artists_connection", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "Artists_followed_artists_connection", + "filters": null + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'db235ffe8620a880041d9f2636675510'; +export default node; diff --git a/src/__generated__/Artists_me.graphql.ts b/src/__generated__/Artists_me.graphql.ts new file mode 100644 index 0000000000..4622963393 --- /dev/null +++ b/src/__generated__/Artists_me.graphql.ts @@ -0,0 +1,199 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Artists_me = { + readonly followed_artists_connection: ({ + readonly pageInfo: { + readonly endCursor: string | null; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly artist: ({ + readonly id: string; + readonly __id: string; + readonly name: string | null; + readonly href: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Artists_me", + "type": "Me", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "followed_artists_connection" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": "followed_artists_connection", + "name": "__Artists_followed_artists_connection_connection", + "storageKey": null, + "args": null, + "concreteType": "FollowArtistConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowArtistEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowArtist", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'c059645d0d983624584a2f9ca233588d'; +export default node; diff --git a/src/__generated__/ArtworkCarouselHeader_rail.graphql.ts b/src/__generated__/ArtworkCarouselHeader_rail.graphql.ts new file mode 100644 index 0000000000..93fbc0ec98 --- /dev/null +++ b/src/__generated__/ArtworkCarouselHeader_rail.graphql.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkCarouselHeader_rail = { + readonly title: string | null; + readonly key: string | null; + readonly followedArtistContext: ({ + readonly artist?: ({ + readonly _id: string; + readonly id: string; + }) | null; + }) | null; + readonly relatedArtistContext: ({ + readonly artist?: ({ + readonly _id: string; + readonly id: string; + }) | null; + readonly based_on?: ({ + readonly name: string | null; + }) | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" +}; +return { + "kind": "Fragment", + "name": "ArtworkCarouselHeader_rail", + "type": "HomePageArtworkModule", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": "followedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": [ + v1 + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "relatedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": [ + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "based_on", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'b6e75f07a90466a7811c73bd3e12abc1'; +export default node; diff --git a/src/__generated__/ArtworkCarouselRefetchQuery.graphql.ts b/src/__generated__/ArtworkCarouselRefetchQuery.graphql.ts new file mode 100644 index 0000000000..1ef7726fd4 --- /dev/null +++ b/src/__generated__/ArtworkCarouselRefetchQuery.graphql.ts @@ -0,0 +1,638 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtworkCarouselRefetchQueryVariables = { + readonly __id: string; + readonly fetchContent: boolean; +}; +export type ArtworkCarouselRefetchQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query ArtworkCarouselRefetchQuery( + $__id: ID! + $fetchContent: Boolean! +) { + node(__id: $__id) { + __typename + ...ArtworkCarousel_rail_abFTe + __id + } +} + +fragment ArtworkCarousel_rail_abFTe on HomePageArtworkModule { + ...ArtworkCarouselHeader_rail + __id + key + params { + medium + price_range + id + } + context { + __typename + ... on HomePageModuleContextFollowedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextRelatedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextFair { + href + __id + } + ... on HomePageModuleContextGene { + href + } + ... on HomePageModuleContextSale { + href + } + ... on Node { + __id + } + } + results @include(if: $fetchContent) { + ...GenericGrid_artworks + __id + } +} + +fragment ArtworkCarouselHeader_rail on HomePageArtworkModule { + title + key + followedArtistContext: context { + __typename + ... on HomePageModuleContextFollowedArtist { + artist { + _id + id + __id + } + } + ... on Node { + __id + } + ... on HomePageModuleContextFair { + __id + } + } + relatedArtistContext: context { + __typename + ... on HomePageModuleContextRelatedArtist { + artist { + _id + id + __id + } + based_on { + name + __id + } + } + ... on Node { + __id + } + ... on HomePageModuleContextFair { + __id + } + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v5, + v2 + ], + "idField": "__id" +}, +v7 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +], +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v9 = [ + v8 +], +v10 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v8, + v2 + ], + "idField": "__id" + } +], +v11 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtworkCarouselRefetchQuery", + "id": null, + "text": "query ArtworkCarouselRefetchQuery(\n $__id: ID!\n $fetchContent: Boolean!\n) {\n node(__id: $__id) {\n __typename\n ...ArtworkCarousel_rail_abFTe\n __id\n }\n}\n\nfragment ArtworkCarousel_rail_abFTe on HomePageArtworkModule {\n ...ArtworkCarouselHeader_rail\n __id\n key\n params {\n medium\n price_range\n id\n }\n context {\n __typename\n ... on HomePageModuleContextFollowedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextRelatedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextFair {\n href\n __id\n }\n ... on HomePageModuleContextGene {\n href\n }\n ... on HomePageModuleContextSale {\n href\n }\n ... on Node {\n __id\n }\n }\n results @include(if: $fetchContent) {\n ...GenericGrid_artworks\n __id\n }\n}\n\nfragment ArtworkCarouselHeader_rail on HomePageArtworkModule {\n title\n key\n followedArtistContext: context {\n __typename\n ... on HomePageModuleContextFollowedArtist {\n artist {\n _id\n id\n __id\n }\n }\n ... on Node {\n __id\n }\n ... on HomePageModuleContextFair {\n __id\n }\n }\n relatedArtistContext: context {\n __typename\n ... on HomePageModuleContextRelatedArtist {\n artist {\n _id\n id\n __id\n }\n based_on {\n name\n __id\n }\n }\n ... on Node {\n __id\n }\n ... on HomePageModuleContextFair {\n __id\n }\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtworkCarouselRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtworkCarousel_rail", + "args": [ + { + "kind": "Variable", + "name": "fetchContent", + "variableName": "fetchContent", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtworkCarouselRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageArtworkModule", + "selections": [ + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": "followedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": [ + v6 + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "relatedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": [ + v6, + { + "kind": "LinkedField", + "alias": null, + "name": "based_on", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": v7, + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "params", + "storageKey": null, + "args": null, + "concreteType": "HomePageModulesParams", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "medium", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "price_range", + "args": null, + "storageKey": null + }, + v5 + ], + "idField": "id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextSale", + "selections": v9 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextGene", + "selections": v9 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFair", + "selections": v9 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": v10 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": v10 + } + ], + "idField": "__id" + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v11 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v11 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v7, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v7, + "idField": "__id" + }, + v8 + ], + "idField": "__id" + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'ae92a4206807e526394ff7e2f1891967'; +export default node; diff --git a/src/__generated__/ArtworkCarousel_rail.graphql.ts b/src/__generated__/ArtworkCarousel_rail.graphql.ts new file mode 100644 index 0000000000..43a4f41703 --- /dev/null +++ b/src/__generated__/ArtworkCarousel_rail.graphql.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkCarousel_rail = { + readonly __id: string; + readonly key: string | null; + readonly params: ({ + readonly medium: string | null; + readonly price_range: string | null; + }) | null; + readonly context: ({ + readonly artist?: ({ + readonly href: string | null; + }) | null; + readonly href?: string | null; + }) | null; + readonly results?: ReadonlyArray<({ + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v2 = [ + v1 +], +v3 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v1, + v0 + ], + "idField": "__id" + } +]; +return { + "kind": "Fragment", + "name": "ArtworkCarousel_rail", + "type": "HomePageArtworkModule", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": false + } + ], + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtworkCarouselHeader_rail", + "args": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "params", + "storageKey": null, + "args": null, + "concreteType": "HomePageModulesParams", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "medium", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "price_range", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ], + "idField": "id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextSale", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextGene", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFair", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": v3 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": v3 + } + ], + "idField": "__id" + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '40c7c47c0d5c7633cf5205f9bf043c9b'; +export default node; diff --git a/src/__generated__/ArtworkPreview_artwork.graphql.ts b/src/__generated__/ArtworkPreview_artwork.graphql.ts new file mode 100644 index 0000000000..ffbf076e81 --- /dev/null +++ b/src/__generated__/ArtworkPreview_artwork.graphql.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkPreview_artwork = { + readonly id: string; + readonly _id: string; + readonly title: string | null; + readonly artist_names: string | null; + readonly date: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "ArtworkPreview_artwork", + "type": "Artwork", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'fbfe9853ba234d79b24c7be89eb378c9'; +export default node; diff --git a/src/__generated__/ArtworkRailHeader_rail.graphql.ts b/src/__generated__/ArtworkRailHeader_rail.graphql.ts new file mode 100644 index 0000000000..aefa14ade5 --- /dev/null +++ b/src/__generated__/ArtworkRailHeader_rail.graphql.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkRailHeader_rail = { + readonly title: string | null; + readonly key: string | null; + readonly context: ({ + readonly artist?: ({ + readonly id: string; + }) | null; + readonly based_on?: ({ + readonly name: string | null; + }) | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ArtworkRailHeader_rail", + "type": "HomePageArtworkModule", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "based_on", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '6405fd5aae7b7073451b921d55d0014e'; +export default node; diff --git a/src/__generated__/ArtworkRailRefetchQuery.graphql.ts b/src/__generated__/ArtworkRailRefetchQuery.graphql.ts new file mode 100644 index 0000000000..4ef0281074 --- /dev/null +++ b/src/__generated__/ArtworkRailRefetchQuery.graphql.ts @@ -0,0 +1,573 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtworkRailRefetchQueryVariables = { + readonly __id: string; + readonly fetchContent: boolean; +}; +export type ArtworkRailRefetchQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query ArtworkRailRefetchQuery( + $__id: ID! + $fetchContent: Boolean! +) { + node(__id: $__id) { + __typename + ...ArtworkRail_rail_abFTe + __id + } +} + +fragment ArtworkRail_rail_abFTe on HomePageArtworkModule { + ...ArtworkRailHeader_rail + __id + key + params { + medium + price_range + id + } + context { + __typename + ... on HomePageModuleContextFollowedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextRelatedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextFair { + href + __id + } + ... on HomePageModuleContextGene { + href + } + ... on HomePageModuleContextSale { + href + } + ... on Node { + __id + } + } + results @include(if: $fetchContent) { + ...GenericGrid_artworks + __id + } +} + +fragment ArtworkRailHeader_rail on HomePageArtworkModule { + title + key + context { + __typename + ... on HomePageModuleContextRelatedArtist { + artist { + id + __id + } + based_on { + name + __id + } + } + ... on Node { + __id + } + ... on HomePageModuleContextFair { + __id + } + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = [ + v5 +], +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v8 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +], +v9 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtworkRailRefetchQuery", + "id": null, + "text": "query ArtworkRailRefetchQuery(\n $__id: ID!\n $fetchContent: Boolean!\n) {\n node(__id: $__id) {\n __typename\n ...ArtworkRail_rail_abFTe\n __id\n }\n}\n\nfragment ArtworkRail_rail_abFTe on HomePageArtworkModule {\n ...ArtworkRailHeader_rail\n __id\n key\n params {\n medium\n price_range\n id\n }\n context {\n __typename\n ... on HomePageModuleContextFollowedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextRelatedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextFair {\n href\n __id\n }\n ... on HomePageModuleContextGene {\n href\n }\n ... on HomePageModuleContextSale {\n href\n }\n ... on Node {\n __id\n }\n }\n results @include(if: $fetchContent) {\n ...GenericGrid_artworks\n __id\n }\n}\n\nfragment ArtworkRailHeader_rail on HomePageArtworkModule {\n title\n key\n context {\n __typename\n ... on HomePageModuleContextRelatedArtist {\n artist {\n id\n __id\n }\n based_on {\n name\n __id\n }\n }\n ... on Node {\n __id\n }\n ... on HomePageModuleContextFair {\n __id\n }\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtworkRailRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtworkRail_rail", + "args": [ + { + "kind": "Variable", + "name": "fetchContent", + "variableName": "fetchContent", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtworkRailRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageArtworkModule", + "selections": [ + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextSale", + "selections": v6 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextGene", + "selections": v6 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v5, + v2 + ], + "idField": "__id" + } + ] + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFair", + "selections": v6 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v7, + v2, + v5 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "based_on", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": v8, + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "params", + "storageKey": null, + "args": null, + "concreteType": "HomePageModulesParams", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "medium", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "price_range", + "args": null, + "storageKey": null + }, + v7 + ], + "idField": "id" + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v9 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v9 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v8, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v8, + "idField": "__id" + }, + v5 + ], + "idField": "__id" + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '9c2ebde1c9a035a51d0b95fa5f3bef61'; +export default node; diff --git a/src/__generated__/ArtworkRail_rail.graphql.ts b/src/__generated__/ArtworkRail_rail.graphql.ts new file mode 100644 index 0000000000..7f9a52335a --- /dev/null +++ b/src/__generated__/ArtworkRail_rail.graphql.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkRail_rail = { + readonly __id: string; + readonly key: string | null; + readonly params: ({ + readonly medium: string | null; + readonly price_range: string | null; + }) | null; + readonly context: ({ + readonly artist?: ({ + readonly href: string | null; + }) | null; + readonly href?: string | null; + }) | null; + readonly results?: ReadonlyArray<({ + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v2 = [ + v1 +], +v3 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v1, + v0 + ], + "idField": "__id" + } +]; +return { + "kind": "Fragment", + "name": "ArtworkRail_rail", + "type": "HomePageArtworkModule", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "fetchContent", + "type": "Boolean!", + "defaultValue": false + } + ], + "selections": [ + { + "kind": "FragmentSpread", + "name": "ArtworkRailHeader_rail", + "args": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "params", + "storageKey": null, + "args": null, + "concreteType": "HomePageModulesParams", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "medium", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "price_range", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ], + "idField": "id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextSale", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextGene", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFair", + "selections": v2 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": v3 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": v3 + } + ], + "idField": "__id" + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "fetchContent", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '41d01e4231ca8c5ff67d56e8989582d5'; +export default node; diff --git a/src/__generated__/Artwork_artwork.graphql.ts b/src/__generated__/Artwork_artwork.graphql.ts new file mode 100644 index 0000000000..55781c4db8 --- /dev/null +++ b/src/__generated__/Artwork_artwork.graphql.ts @@ -0,0 +1,240 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Artwork_artwork = { + readonly title: string | null; + readonly date: string | null; + readonly sale_message: string | null; + readonly is_in_auction: boolean | null; + readonly id: string; + readonly sale_artwork: ({ + readonly opening_bid: ({ + readonly display: string | null; + }) | null; + readonly current_bid: ({ + readonly display: string | null; + }) | null; + readonly bidder_positions_count: number | null; + readonly sale: ({ + readonly is_open: boolean | null; + }) | null; + }) | null; + readonly image: ({ + readonly url: string | null; + readonly aspect_ratio: number | null; + }) | null; + readonly artists: ReadonlyArray<({ + readonly name: string | null; + }) | null> | null; + readonly partner: ({ + readonly name: string | null; + }) | null; + readonly href: string | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v1 +]; +return { + "kind": "Fragment", + "name": "Artwork_artwork", + "type": "Artwork", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v0 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v0 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v2, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v2, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '201b580860a9e4b1c04d9e8fa07300ca'; +export default node; diff --git a/src/__generated__/ArtworksQuery.graphql.ts b/src/__generated__/ArtworksQuery.graphql.ts new file mode 100644 index 0000000000..250d2df6bd --- /dev/null +++ b/src/__generated__/ArtworksQuery.graphql.ts @@ -0,0 +1,503 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtworksQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type ArtworksQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ArtworksQuery( + $count: Int! + $cursor: String +) { + me { + ...Artworks_me_1G22uz + __id + } +} + +fragment Artworks_me_1G22uz on Me { + saved_artworks { + artworks_connection(private: true, first: $count, after: $cursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + ...GenericGrid_artworks + __id + __typename + } + cursor + } + } + __id + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v3 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v1 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtworksQuery", + "id": null, + "text": "query ArtworksQuery(\n $count: Int!\n $cursor: String\n) {\n me {\n ...Artworks_me_1G22uz\n __id\n }\n}\n\nfragment Artworks_me_1G22uz on Me {\n saved_artworks {\n artworks_connection(private: true, first: $count, after: $cursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n ...GenericGrid_artworks\n __id\n __typename\n }\n cursor\n }\n }\n __id\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtworksQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artworks_me", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtworksQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "saved_artworks", + "storageKey": null, + "args": null, + "concreteType": "Collection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "private", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v2 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v2 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v3, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v3, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "private", + "value": true, + "type": "Boolean" + } + ], + "handle": "connection", + "key": "GenericGrid_artworks_connection", + "filters": [ + "private" + ] + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '6dbe7bc57a2235d40925152f64b7e085'; +export default node; diff --git a/src/__generated__/ArtworksRendererQuery.graphql.ts b/src/__generated__/ArtworksRendererQuery.graphql.ts new file mode 100644 index 0000000000..7448030fe2 --- /dev/null +++ b/src/__generated__/ArtworksRendererQuery.graphql.ts @@ -0,0 +1,503 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ArtworksRendererQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type ArtworksRendererQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ArtworksRendererQuery( + $count: Int! + $cursor: String +) { + me { + ...Artworks_me_1G22uz + __id + } +} + +fragment Artworks_me_1G22uz on Me { + saved_artworks { + artworks_connection(private: true, first: $count, after: $cursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + ...GenericGrid_artworks + __id + __typename + } + cursor + } + } + __id + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v3 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v1 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ArtworksRendererQuery", + "id": null, + "text": "query ArtworksRendererQuery(\n $count: Int!\n $cursor: String\n) {\n me {\n ...Artworks_me_1G22uz\n __id\n }\n}\n\nfragment Artworks_me_1G22uz on Me {\n saved_artworks {\n artworks_connection(private: true, first: $count, after: $cursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n ...GenericGrid_artworks\n __id\n __typename\n }\n cursor\n }\n }\n __id\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ArtworksRendererQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artworks_me", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ArtworksRendererQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "saved_artworks", + "storageKey": null, + "args": null, + "concreteType": "Collection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "private", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v2 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v2 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v3, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v3, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "private", + "value": true, + "type": "Boolean" + } + ], + "handle": "connection", + "key": "GenericGrid_artworks_connection", + "filters": [ + "private" + ] + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '90f041b339905d44acbcec9a2971f36f'; +export default node; diff --git a/src/__generated__/Artworks_artist.graphql.ts b/src/__generated__/Artworks_artist.graphql.ts new file mode 100644 index 0000000000..eedb0716fb --- /dev/null +++ b/src/__generated__/Artworks_artist.graphql.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Artworks_artist = { + readonly counts: ({ + readonly artworks: any | null; + readonly for_sale_artworks: any | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Artworks_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "ArtistForSaleArtworksGrid_artist", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "ArtistNotForSaleArtworksGrid_artist", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'aacec13b07a0e12d6ed4f1b6fbd616ae'; +export default node; diff --git a/src/__generated__/Artworks_me.graphql.ts b/src/__generated__/Artworks_me.graphql.ts new file mode 100644 index 0000000000..de5dc3f469 --- /dev/null +++ b/src/__generated__/Artworks_me.graphql.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Artworks_me = { + readonly saved_artworks: ({ + readonly artworks_connection: ({ + readonly pageInfo: { + readonly endCursor: string | null; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + }) | null; + }) | null> | null; + }) | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Artworks_me", + "type": "Me", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "saved_artworks", + "artworks_connection" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": "" + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "saved_artworks", + "storageKey": null, + "args": null, + "concreteType": "Collection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": "artworks_connection", + "name": "__GenericGrid_artworks_connection_connection", + "storageKey": "__GenericGrid_artworks_connection_connection(private:true)", + "args": [ + { + "kind": "Literal", + "name": "private", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + v0 + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'f484562e664cc89148f04ad77f24f405'; +export default node; diff --git a/src/__generated__/AttachmentPreview_attachment.graphql.ts b/src/__generated__/AttachmentPreview_attachment.graphql.ts new file mode 100644 index 0000000000..81f05083f7 --- /dev/null +++ b/src/__generated__/AttachmentPreview_attachment.graphql.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type AttachmentPreview_attachment = { + readonly id: string; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "AttachmentPreview_attachment", + "type": "Attachment", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ] +}; +(node as any).hash = 'c55e4e996032f6359f162b9312ae80cb'; +export default node; diff --git a/src/__generated__/Biography_artist.graphql.ts b/src/__generated__/Biography_artist.graphql.ts new file mode 100644 index 0000000000..8179fbca88 --- /dev/null +++ b/src/__generated__/Biography_artist.graphql.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Biography_artist = { + readonly bio: string | null; + readonly blurb: string | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Biography_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "blurb", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'c69d884d6a5b77e0d57f6324d613c6be'; +export default node; diff --git a/src/__generated__/Biography_gene.graphql.ts b/src/__generated__/Biography_gene.graphql.ts new file mode 100644 index 0000000000..ab7b28fb2b --- /dev/null +++ b/src/__generated__/Biography_gene.graphql.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Biography_gene = { + readonly description: string | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Biography_gene", + "type": "Gene", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "description", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '50849d2daf12d006bf14b29f169ebd34'; +export default node; diff --git a/src/__generated__/CategoriesMeQuery.graphql.ts b/src/__generated__/CategoriesMeQuery.graphql.ts new file mode 100644 index 0000000000..eb10ea7ff9 --- /dev/null +++ b/src/__generated__/CategoriesMeQuery.graphql.ts @@ -0,0 +1,306 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type CategoriesMeQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type CategoriesMeQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query CategoriesMeQuery( + $count: Int! + $cursor: String +) { + me { + ...Categories_me_1G22uz + __id + } +} + +fragment Categories_me_1G22uz on Me { + followed_genes(first: $count, after: $cursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + gene { + id + __id + name + href + image { + url + } + } + __id + __typename + } + cursor + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "CategoriesMeQuery", + "id": null, + "text": "query CategoriesMeQuery(\n $count: Int!\n $cursor: String\n) {\n me {\n ...Categories_me_1G22uz\n __id\n }\n}\n\nfragment Categories_me_1G22uz on Me {\n followed_genes(first: $count, after: $cursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n gene {\n id\n __id\n name\n href\n image {\n url\n }\n }\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "CategoriesMeQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Categories_me", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "CategoriesMeQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followed_genes", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "concreteType": "FollowGeneConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowGeneEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowGene", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": null, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "followed_genes", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "handle": "connection", + "key": "Categories_followed_genes", + "filters": null + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'e6ea0c0167f35c399e0d6490f9672e4d'; +export default node; diff --git a/src/__generated__/CategoriesRendererQuery.graphql.ts b/src/__generated__/CategoriesRendererQuery.graphql.ts new file mode 100644 index 0000000000..399b49f8dd --- /dev/null +++ b/src/__generated__/CategoriesRendererQuery.graphql.ts @@ -0,0 +1,262 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type CategoriesRendererQueryVariables = { +}; +export type CategoriesRendererQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query CategoriesRendererQuery { + me { + ...Categories_me + __id + } +} + +fragment Categories_me on Me { + followed_genes(first: 10) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + gene { + id + __id + name + href + image { + url + } + } + __id + __typename + } + cursor + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "CategoriesRendererQuery", + "id": null, + "text": "query CategoriesRendererQuery {\n me {\n ...Categories_me\n __id\n }\n}\n\nfragment Categories_me on Me {\n followed_genes(first: 10) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n gene {\n id\n __id\n name\n href\n image {\n url\n }\n }\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "CategoriesRendererQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Categories_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "CategoriesRendererQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followed_genes", + "storageKey": "followed_genes(first:10)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "FollowGeneConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowGeneEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowGene", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": null, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "followed_genes", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "Categories_followed_genes", + "filters": null + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'b70381a6a0f14668279e15e043e0337a'; +export default node; diff --git a/src/__generated__/Categories_me.graphql.ts b/src/__generated__/Categories_me.graphql.ts new file mode 100644 index 0000000000..a463908a01 --- /dev/null +++ b/src/__generated__/Categories_me.graphql.ts @@ -0,0 +1,199 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Categories_me = { + readonly followed_genes: ({ + readonly pageInfo: { + readonly endCursor: string | null; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly gene: ({ + readonly id: string; + readonly __id: string; + readonly name: string | null; + readonly href: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Categories_me", + "type": "Me", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "followed_genes" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": "followed_genes", + "name": "__Categories_followed_genes_connection", + "storageKey": null, + "args": null, + "concreteType": "FollowGeneConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowGeneEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowGene", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": null, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'f1a9e289f208bfcf51a972afc0cdf102'; +export default node; diff --git a/src/__generated__/ConversationSnippet_conversation.graphql.ts b/src/__generated__/ConversationSnippet_conversation.graphql.ts new file mode 100644 index 0000000000..fb4b001cd9 --- /dev/null +++ b/src/__generated__/ConversationSnippet_conversation.graphql.ts @@ -0,0 +1,216 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ConversationSnippet_conversation = { + readonly id: string | null; + readonly to: { + readonly name: string; + }; + readonly last_message: string | null; + readonly last_message_at: string | null; + readonly unread: boolean | null; + readonly items: ReadonlyArray<({ + readonly item: ({ + readonly __typename: "Artwork"; + readonly date: string | null; + readonly title: string | null; + readonly artist_names: string | null; + readonly image: ({ + readonly url: string | null; + }) | null; + } | { + readonly __typename: "Show"; + readonly fair: ({ + readonly name: string | null; + }) | null; + readonly name: string | null; + readonly cover_image: ({ + readonly url: string | null; + }) | null; + } | { + /*This will never be '% other', but we need some + value in case none of the concrete values match.*/ + readonly __typename: "%other"; + }) | null; + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Fragment", + "name": "ConversationSnippet_conversation", + "type": "Conversation", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v0 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v0, + v1 + ], + "idField": "__id" + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v2 + } + ] + }, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v2 + } + ] + } + ], + "idField": "__id" + } + ] + }, + v1 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'cbb14f6e62aa56f7c8e18f2ef16e8662'; +export default node; diff --git a/src/__generated__/Conversation_me.graphql.ts b/src/__generated__/Conversation_me.graphql.ts new file mode 100644 index 0000000000..7eabbe1f14 --- /dev/null +++ b/src/__generated__/Conversation_me.graphql.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Conversation_me = { + readonly conversation: ({ + readonly id: string | null; + readonly __id: string; + readonly to: { + readonly name: string; + readonly initials: string | null; + }; + readonly from: { + readonly email: string; + }; + readonly last_message_id: string | null; + readonly initial_message: string; + readonly unread: boolean | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Conversation_me", + "type": "Me", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "RootArgument", + "name": "conversationID", + "type": "String!" + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversation", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "id", + "variableName": "conversationID", + "type": "String!" + } + ], + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "ConversationInitiator", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "Messages_conversation", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initial_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'af2ea77ea1be72f5d6d7072b5909b8ea'; +export default node; diff --git a/src/__generated__/ConversationsQuery.graphql.ts b/src/__generated__/ConversationsQuery.graphql.ts new file mode 100644 index 0000000000..5a960b1a3a --- /dev/null +++ b/src/__generated__/ConversationsQuery.graphql.ts @@ -0,0 +1,435 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type ConversationsQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type ConversationsQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query ConversationsQuery( + $count: Int! + $cursor: String +) { + me { + ...Conversations_me_1G22uz + __id + } +} + +fragment Conversations_me_1G22uz on Me { + conversations(first: $count, after: $cursor) { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + id + last_message + ...ConversationSnippet_conversation + __id + __typename + } + cursor + } + } + __id +} + +fragment ConversationSnippet_conversation on Conversation { + id + to { + name + } + last_message + last_message_at + unread + items { + item { + __typename + ... on Artwork { + date + title + artist_names + image { + url + } + } + ... on Show { + fair { + name + __id + } + name + cover_image { + url + } + } + ... on Node { + __id + } + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "ConversationsQuery", + "id": null, + "text": "query ConversationsQuery(\n $count: Int!\n $cursor: String\n) {\n me {\n ...Conversations_me_1G22uz\n __id\n }\n}\n\nfragment Conversations_me_1G22uz on Me {\n conversations(first: $count, after: $cursor) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n id\n last_message\n ...ConversationSnippet_conversation\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n\nfragment ConversationSnippet_conversation on Conversation {\n id\n to {\n name\n }\n last_message\n last_message_at\n unread\n items {\n item {\n __typename\n ... on Artwork {\n date\n title\n artist_names\n image {\n url\n }\n }\n ... on Show {\n fair {\n name\n __id\n }\n name\n cover_image {\n url\n }\n }\n ... on Node {\n __id\n }\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "ConversationsQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Conversations_me", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "ConversationsQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversations", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v2 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v1, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v2, + v1 + ], + "idField": "__id" + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v4 + } + ] + }, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v4 + } + ] + } + ], + "idField": "__id" + } + ] + }, + v1, + v3 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "conversations", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "handle": "connection", + "key": "Conversations_conversations", + "filters": null + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '82b85cf4af654ade37df29ccb3f139d6'; +export default node; diff --git a/src/__generated__/Conversations_me.graphql.ts b/src/__generated__/Conversations_me.graphql.ts new file mode 100644 index 0000000000..f25695f332 --- /dev/null +++ b/src/__generated__/Conversations_me.graphql.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Conversations_me = { + readonly conversations: ({ + readonly pageInfo: { + readonly endCursor: string | null; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly id: string | null; + readonly last_message: string | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Conversations_me", + "type": "Me", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "conversations" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": "" + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": "conversations", + "name": "__Conversations_conversations_connection", + "storageKey": null, + "args": null, + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "ConversationSnippet_conversation", + "args": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'a317e57538747221360b7fc2c92dd6a9'; +export default node; diff --git a/src/__generated__/FairsRail_fairs_module.graphql.ts b/src/__generated__/FairsRail_fairs_module.graphql.ts new file mode 100644 index 0000000000..7f2f3de7af --- /dev/null +++ b/src/__generated__/FairsRail_fairs_module.graphql.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type FairsRail_fairs_module = { + readonly results: ReadonlyArray<({ + readonly id: string; + readonly name: string | null; + readonly profile: ({ + readonly href: string | null; + }) | null; + readonly mobile_image: ({ + readonly id: string | null; + readonly url: string | null; + }) | null; + }) | null>; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "FairsRail_fairs_module", + "type": "HomePageFairsModule", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": true, + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "profile", + "storageKey": null, + "args": null, + "concreteType": "Profile", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "mobile_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] +}; +})(); +(node as any).hash = '85178fd988a5abdc9f3d3c9a166df3da'; +export default node; diff --git a/src/__generated__/ForYou_forYou.graphql.ts b/src/__generated__/ForYou_forYou.graphql.ts new file mode 100644 index 0000000000..70838fa809 --- /dev/null +++ b/src/__generated__/ForYou_forYou.graphql.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ForYou_forYou = { + readonly artwork_modules: ReadonlyArray<({ + readonly __id: string; + }) | null> | null; + readonly artist_modules: ReadonlyArray<({ + readonly __id: string; + }) | null> | null; + readonly fairs_module: ({ + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ForYou_forYou", + "type": "HomePage", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork_modules", + "storageKey": "artwork_modules(exclude:[\"FOLLOWED_ARTISTS\"],max_followed_gene_rails:-1,max_rails:-1,order:[\"ACTIVE_BIDS\",\"RECOMMENDED_WORKS\",\"FOLLOWED_ARTISTS\",\"RELATED_ARTISTS\",\"FOLLOWED_GALLERIES\",\"SAVED_WORKS\",\"LIVE_AUCTIONS\",\"CURRENT_FAIRS\",\"FOLLOWED_GENES\",\"GENERIC_GENES\"])", + "args": [ + { + "kind": "Literal", + "name": "exclude", + "value": [ + "FOLLOWED_ARTISTS" + ], + "type": "[HomePageArtworkModuleTypes]" + }, + { + "kind": "Literal", + "name": "max_followed_gene_rails", + "value": -1, + "type": "Int" + }, + { + "kind": "Literal", + "name": "max_rails", + "value": -1, + "type": "Int" + }, + { + "kind": "Literal", + "name": "order", + "value": [ + "ACTIVE_BIDS", + "RECOMMENDED_WORKS", + "FOLLOWED_ARTISTS", + "RELATED_ARTISTS", + "FOLLOWED_GALLERIES", + "SAVED_WORKS", + "LIVE_AUCTIONS", + "CURRENT_FAIRS", + "FOLLOWED_GENES", + "GENERIC_GENES" + ], + "type": "[HomePageArtworkModuleTypes]" + } + ], + "concreteType": "HomePageArtworkModule", + "plural": true, + "selections": [ + v0, + { + "kind": "FragmentSpread", + "name": "ArtworkCarousel_rail", + "args": null + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artist_modules", + "storageKey": null, + "args": null, + "concreteType": "HomePageArtistModule", + "plural": true, + "selections": [ + v0, + { + "kind": "FragmentSpread", + "name": "ArtistRail_rail", + "args": null + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "fairs_module", + "storageKey": null, + "args": null, + "concreteType": "HomePageFairsModule", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "FairsRail_fairs_module", + "args": null + } + ] + } + ] +}; +})(); +(node as any).hash = 'c3546ea7aa3d522db8cb254838ab3898'; +export default node; diff --git a/src/__generated__/GeneArtworksGridQuery.graphql.ts b/src/__generated__/GeneArtworksGridQuery.graphql.ts new file mode 100644 index 0000000000..02915d28e2 --- /dev/null +++ b/src/__generated__/GeneArtworksGridQuery.graphql.ts @@ -0,0 +1,537 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type GeneArtworksGridQueryVariables = { + readonly __id: string; + readonly count: number; + readonly cursor?: string | null; + readonly sort?: string | null; +}; +export type GeneArtworksGridQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query GeneArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String + $sort: String +) { + node(__id: $__id) { + __typename + ... on FilterArtworks { + ...GeneArtworksGrid_filtered_artworks_1RfMLO + } + __id + } +} + +fragment GeneArtworksGrid_filtered_artworks_1RfMLO on FilterArtworks { + __id + artworks: artworks_connection(first: $count, after: $cursor, sort: $sort) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "sort", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v5 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "GeneArtworksGridQuery", + "id": null, + "text": "query GeneArtworksGridQuery(\n $__id: ID!\n $count: Int!\n $cursor: String\n $sort: String\n) {\n node(__id: $__id) {\n __typename\n ... on FilterArtworks {\n ...GeneArtworksGrid_filtered_artworks_1RfMLO\n }\n __id\n }\n}\n\nfragment GeneArtworksGrid_filtered_artworks_1RfMLO on FilterArtworks {\n __id\n artworks: artworks_connection(first: $count, after: $cursor, sort: $sort) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "GeneArtworksGridQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v2, + { + "kind": "InlineFragment", + "type": "FilterArtworks", + "selections": [ + { + "kind": "FragmentSpread", + "name": "GeneArtworksGrid_filtered_artworks", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + }, + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": null + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "GeneArtworksGridQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "FilterArtworks", + "selections": [ + { + "kind": "LinkedField", + "alias": "artworks", + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": "String" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v4 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v4 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v5, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v5, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v3 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "artworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": "String" + } + ], + "handle": "connection", + "key": "GeneArtworksGrid_artworks", + "filters": [ + "sort" + ] + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'f067940108b24080905d5933ab8368e3'; +export default node; diff --git a/src/__generated__/GeneArtworksGrid_filtered_artworks.graphql.ts b/src/__generated__/GeneArtworksGrid_filtered_artworks.graphql.ts new file mode 100644 index 0000000000..63f7cc39ee --- /dev/null +++ b/src/__generated__/GeneArtworksGrid_filtered_artworks.graphql.ts @@ -0,0 +1,195 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type GeneArtworksGrid_filtered_artworks = { + readonly __id: string; + readonly artworks: ({ + readonly pageInfo: { + readonly hasNextPage: boolean; + readonly startCursor: string | null; + readonly endCursor: string | null; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly id: string; + readonly __id: string; + readonly image: ({ + readonly aspect_ratio: number | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "GeneArtworksGrid_filtered_artworks", + "type": "FilterArtworks", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "artworks" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": "" + }, + { + "kind": "LocalArgument", + "name": "sort", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": "artworks", + "name": "__GeneArtworksGrid_artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": "String" + } + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Artwork_artwork", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '2faee4dd09360c72d85e4cc0417940d3'; +export default node; diff --git a/src/__generated__/GeneRefetchQuery.graphql.ts b/src/__generated__/GeneRefetchQuery.graphql.ts new file mode 100644 index 0000000000..778d1d17b4 --- /dev/null +++ b/src/__generated__/GeneRefetchQuery.graphql.ts @@ -0,0 +1,743 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type GeneRefetchQueryVariables = { + readonly geneID: string; + readonly sort?: string | null; + readonly medium?: string | null; + readonly price_range?: string | null; +}; +export type GeneRefetchQueryResponse = { + readonly gene: ({ + }) | null; +}; + + + +/* +query GeneRefetchQuery( + $geneID: String! + $sort: String + $medium: String + $price_range: String +) { + gene(id: $geneID) { + ...Gene_gene_1GUEBN + __id + } +} + +fragment Gene_gene_1GUEBN on Gene { + ...Header_gene + ...About_gene + filtered_artworks(size: 0, medium: $medium, price_range: $price_range, sort: $sort, aggregations: [MEDIUM, PRICE_RANGE, TOTAL], for_sale: true) { + total + aggregations { + slice + counts { + id + name + count + __id + } + } + ...GeneArtworksGrid_filtered_artworks_2GL9EE + __id + } + __id +} + +fragment Header_gene on Gene { + _id + id + name + __id +} + +fragment About_gene on Gene { + ...Biography_gene + trending_artists { + ...RelatedArtists_artists + __id + } + __id +} + +fragment GeneArtworksGrid_filtered_artworks_2GL9EE on FilterArtworks { + __id + artworks: artworks_connection(first: 10, after: "", sort: $sort) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} + +fragment Biography_gene on Gene { + description + __id +} + +fragment RelatedArtists_artists on Artist { + __id + ...RelatedArtist_artist +} + +fragment RelatedArtist_artist on Artist { + href + name + counts { + for_sale_artworks + artworks + } + image { + url(version: "large") + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "geneID", + "type": "String!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "sort", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "medium", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "price_range", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "geneID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v7 = { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": "String" +}, +v8 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v9 = [ + v4, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "GeneRefetchQuery", + "id": null, + "text": "query GeneRefetchQuery(\n $geneID: String!\n $sort: String\n $medium: String\n $price_range: String\n) {\n gene(id: $geneID) {\n ...Gene_gene_1GUEBN\n __id\n }\n}\n\nfragment Gene_gene_1GUEBN on Gene {\n ...Header_gene\n ...About_gene\n filtered_artworks(size: 0, medium: $medium, price_range: $price_range, sort: $sort, aggregations: [MEDIUM, PRICE_RANGE, TOTAL], for_sale: true) {\n total\n aggregations {\n slice\n counts {\n id\n name\n count\n __id\n }\n }\n ...GeneArtworksGrid_filtered_artworks_2GL9EE\n __id\n }\n __id\n}\n\nfragment Header_gene on Gene {\n _id\n id\n name\n __id\n}\n\nfragment About_gene on Gene {\n ...Biography_gene\n trending_artists {\n ...RelatedArtists_artists\n __id\n }\n __id\n}\n\nfragment GeneArtworksGrid_filtered_artworks_2GL9EE on FilterArtworks {\n __id\n artworks: artworks_connection(first: 10, after: \"\", sort: $sort) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n\nfragment Biography_gene on Gene {\n description\n __id\n}\n\nfragment RelatedArtists_artists on Artist {\n __id\n ...RelatedArtist_artist\n}\n\nfragment RelatedArtist_artist on Artist {\n href\n name\n counts {\n for_sale_artworks\n artworks\n }\n image {\n url(version: \"large\")\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "GeneRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": v1, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Gene_gene", + "args": [ + { + "kind": "Variable", + "name": "medium", + "variableName": "medium", + "type": null + }, + { + "kind": "Variable", + "name": "price_range", + "variableName": "price_range", + "type": null + }, + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "GeneRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": v1, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v3, + v4, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "description", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "trending_artists", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": true, + "selections": [ + v2, + v5, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v6 + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "filtered_artworks", + "storageKey": null, + "args": [ + { + "kind": "Literal", + "name": "aggregations", + "value": [ + "MEDIUM", + "PRICE_RANGE", + "TOTAL" + ], + "type": "[ArtworkAggregation]" + }, + { + "kind": "Literal", + "name": "for_sale", + "value": true, + "type": "Boolean" + }, + { + "kind": "Variable", + "name": "medium", + "variableName": "medium", + "type": "String" + }, + { + "kind": "Variable", + "name": "price_range", + "variableName": "price_range", + "type": "String" + }, + { + "kind": "Literal", + "name": "size", + "value": 0, + "type": "Int" + }, + v7 + ], + "concreteType": "FilterArtworks", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "aggregations", + "storageKey": null, + "args": null, + "concreteType": "ArtworksAggregationResults", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "slice", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "AggregationCount", + "plural": true, + "selections": [ + v3, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "count", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + v2, + { + "kind": "LinkedField", + "alias": "artworks", + "name": "artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + v7 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + v6 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v8 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v8 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v9, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v9, + "idField": "__id" + }, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "artworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + v7 + ], + "handle": "connection", + "key": "GeneArtworksGrid_artworks", + "filters": [ + "sort" + ] + } + ], + "idField": "__id" + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'fa33404a84a486157db637d4981770e9'; +export default node; diff --git a/src/__generated__/Gene_gene.graphql.ts b/src/__generated__/Gene_gene.graphql.ts new file mode 100644 index 0000000000..0d8ef50833 --- /dev/null +++ b/src/__generated__/Gene_gene.graphql.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ArtworkAggregation = "COLOR" | "DIMENSION_RANGE" | "FOLLOWED_ARTISTS" | "GALLERY" | "INSTITUTION" | "MAJOR_PERIOD" | "MEDIUM" | "MERCHANDISABLE_ARTISTS" | "PARTNER_CITY" | "PERIOD" | "PRICE_RANGE" | "TOTAL" | "%future added value"; +export type Gene_gene = { + readonly filtered_artworks: ({ + readonly total: number | null; + readonly aggregations: ReadonlyArray<({ + readonly slice: ArtworkAggregation | null; + readonly counts: ReadonlyArray<({ + readonly id: string; + readonly name: string | null; + readonly count: number | null; + }) | null> | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Gene_gene", + "type": "Gene", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "sort", + "type": "String", + "defaultValue": "-partner_updated_at" + }, + { + "kind": "LocalArgument", + "name": "medium", + "type": "String", + "defaultValue": "*" + }, + { + "kind": "LocalArgument", + "name": "price_range", + "type": "String", + "defaultValue": "*-*" + } + ], + "selections": [ + { + "kind": "FragmentSpread", + "name": "Header_gene", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "About_gene", + "args": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "filtered_artworks", + "storageKey": null, + "args": [ + { + "kind": "Literal", + "name": "aggregations", + "value": [ + "MEDIUM", + "PRICE_RANGE", + "TOTAL" + ], + "type": "[ArtworkAggregation]" + }, + { + "kind": "Literal", + "name": "for_sale", + "value": true, + "type": "Boolean" + }, + { + "kind": "Variable", + "name": "medium", + "variableName": "medium", + "type": "String" + }, + { + "kind": "Variable", + "name": "price_range", + "variableName": "price_range", + "type": "String" + }, + { + "kind": "Literal", + "name": "size", + "value": 0, + "type": "Int" + }, + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": "String" + } + ], + "concreteType": "FilterArtworks", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "aggregations", + "storageKey": null, + "args": null, + "concreteType": "ArtworksAggregationResults", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "slice", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "AggregationCount", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "count", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + { + "kind": "FragmentSpread", + "name": "GeneArtworksGrid_filtered_artworks", + "args": [ + { + "kind": "Variable", + "name": "sort", + "variableName": "sort", + "type": null + } + ] + }, + v0 + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'b5dcbf530f6765ce1470ecc52166870e'; +export default node; diff --git a/src/__generated__/GenericGrid_artworks.graphql.ts b/src/__generated__/GenericGrid_artworks.graphql.ts new file mode 100644 index 0000000000..8280c34fe6 --- /dev/null +++ b/src/__generated__/GenericGrid_artworks.graphql.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type GenericGrid_artworks = ReadonlyArray<{ + readonly __id: string; + readonly id: string; + readonly image: ({ + readonly aspect_ratio: number | null; + }) | null; + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "GenericGrid_artworks", + "type": "Artwork", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Artwork_artwork", + "args": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'f3d9eb010a87118abf180da5138dd4e9'; +export default node; diff --git a/src/__generated__/Header_artist.graphql.ts b/src/__generated__/Header_artist.graphql.ts new file mode 100644 index 0000000000..84a85da576 --- /dev/null +++ b/src/__generated__/Header_artist.graphql.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Header_artist = { + readonly _id: string; + readonly id: string; + readonly name: string | null; + readonly nationality: string | null; + readonly birthday: string | null; + readonly counts: ({ + readonly follows: any | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Header_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "nationality", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "birthday", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "follows", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '7305ad117a1e704aab8ba0f23776ecf9'; +export default node; diff --git a/src/__generated__/Header_gene.graphql.ts b/src/__generated__/Header_gene.graphql.ts new file mode 100644 index 0000000000..c4c39fc077 --- /dev/null +++ b/src/__generated__/Header_gene.graphql.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Header_gene = { + readonly _id: string; + readonly id: string; + readonly name: string | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Header_gene", + "type": "Gene", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '36c56f6ad3ec3091e430c42a52e701f6'; +export default node; diff --git a/src/__generated__/Header_sale.graphql.ts b/src/__generated__/Header_sale.graphql.ts new file mode 100644 index 0000000000..1df6c5e2d4 --- /dev/null +++ b/src/__generated__/Header_sale.graphql.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Header_sale = { + readonly name: string | null; + readonly cover_image: ({ + readonly href: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Header_sale", + "type": "Sale", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '5549dfcf5902994061a54baef12fe183'; +export default node; diff --git a/src/__generated__/HeroUnits_hero_units.graphql.ts b/src/__generated__/HeroUnits_hero_units.graphql.ts new file mode 100644 index 0000000000..ce5fca1e16 --- /dev/null +++ b/src/__generated__/HeroUnits_hero_units.graphql.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type HeroUnits_hero_units = ReadonlyArray<{ + readonly __id: string; + readonly href: string | null; + readonly title: string | null; + readonly heading: string | null; + readonly narrow_image_url: string | null; + readonly wide_image_url: string | null; + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "HeroUnits_hero_units", + "type": "HomePageHeroUnit", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "heading", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": "narrow_image_url", + "name": "background_image_url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "NARROW", + "type": "HomePageHeroUnitImageVersion" + } + ], + "storageKey": "background_image_url(version:\"NARROW\")" + }, + { + "kind": "ScalarField", + "alias": "wide_image_url", + "name": "background_image_url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "WIDE", + "type": "HomePageHeroUnitImageVersion" + } + ], + "storageKey": "background_image_url(version:\"WIDE\")" + } + ], + "idField": "__id" +}; +(node as any).hash = '3c5a06f04a69b982da948725f333c9ed'; +export default node; diff --git a/src/__generated__/ImagePreview_attachment.graphql.ts b/src/__generated__/ImagePreview_attachment.graphql.ts new file mode 100644 index 0000000000..5d76d56fc7 --- /dev/null +++ b/src/__generated__/ImagePreview_attachment.graphql.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ImagePreview_attachment = { + readonly download_url: string; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "ImagePreview_attachment", + "type": "Attachment", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "download_url", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "AttachmentPreview_attachment", + "args": null + } + ] +}; +(node as any).hash = '1c4f00856bbc0864503563b67da5d524'; +export default node; diff --git a/src/__generated__/InboxQuery.graphql.ts b/src/__generated__/InboxQuery.graphql.ts new file mode 100644 index 0000000000..8273c0ee42 --- /dev/null +++ b/src/__generated__/InboxQuery.graphql.ts @@ -0,0 +1,689 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type InboxQueryVariables = { + readonly cursor?: string | null; +}; +export type InboxQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query InboxQuery { + me { + ...Inbox_me_38v0Te + __id + } +} + +fragment Inbox_me_38v0Te on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + } + conversations_existence_check: conversations(first: 1) { + edges { + node { + id + __id + } + } + } + ...Conversations_me + ...ActiveBids_me + __id +} + +fragment Conversations_me on Me { + conversations(first: 10, after: "") { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + id + last_message + ...ConversationSnippet_conversation + __id + __typename + } + cursor + } + } + __id +} + +fragment ActiveBids_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + ...ActiveBid_bid + } + __id +} + +fragment ActiveBid_bid on LotStanding { + is_leading_bidder + sale { + href + is_live_open + __id + } + most_recent_bid { + __id + max_bid { + display + } + sale_artwork { + artwork { + href + image { + url + } + artist_names + __id + } + counts { + bidder_positions + } + highest_bid { + display + id + } + lot_number + reserve_status + __id + } + } +} + +fragment ConversationSnippet_conversation on Conversation { + id + to { + name + } + last_message + last_message_at + unread + items { + item { + __typename + ... on Artwork { + date + title + artist_names + image { + url + } + } + ... on Show { + fair { + name + __id + } + name + cover_image { + url + } + } + ... on Node { + __id + } + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +], +v5 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v4 +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v9 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "InboxQuery", + "id": null, + "text": "query InboxQuery {\n me {\n ...Inbox_me_38v0Te\n __id\n }\n}\n\nfragment Inbox_me_38v0Te on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n }\n conversations_existence_check: conversations(first: 1) {\n edges {\n node {\n id\n __id\n }\n }\n }\n ...Conversations_me\n ...ActiveBids_me\n __id\n}\n\nfragment Conversations_me on Me {\n conversations(first: 10, after: \"\") {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n id\n last_message\n ...ConversationSnippet_conversation\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n\nfragment ActiveBids_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n ...ActiveBid_bid\n }\n __id\n}\n\nfragment ActiveBid_bid on LotStanding {\n is_leading_bidder\n sale {\n href\n is_live_open\n __id\n }\n most_recent_bid {\n __id\n max_bid {\n display\n }\n sale_artwork {\n artwork {\n href\n image {\n url\n }\n artist_names\n __id\n }\n counts {\n bidder_positions\n }\n highest_bid {\n display\n id\n }\n lot_number\n reserve_status\n __id\n }\n }\n}\n\nfragment ConversationSnippet_conversation on Conversation {\n id\n to {\n name\n }\n last_message\n last_message_at\n unread\n items {\n item {\n __typename\n ... on Artwork {\n date\n title\n artist_names\n image {\n url\n }\n }\n ... on Show {\n fair {\n name\n __id\n }\n name\n cover_image {\n url\n }\n }\n ... on Node {\n __id\n }\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "InboxQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Inbox_me", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": null + } + ] + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "InboxQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v2 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v3, + v5, + v6, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v2, + v7 + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedField", + "alias": "conversations_existence_check", + "name": "conversations", + "storageKey": "conversations(first:1)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 1, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v7, + v1 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "conversations", + "storageKey": "conversations(after:\"\",first:10)", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v8 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v9, + v1, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v8, + v1 + ], + "idField": "__id" + }, + v8, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v4 + } + ] + }, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + v6, + v5 + ] + } + ], + "idField": "__id" + } + ] + }, + v1, + v9 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "conversations", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "Conversations_conversations", + "filters": null + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '465572f29045f85151e45bf5d4f1fe6b'; +export default node; diff --git a/src/__generated__/InboxRefetchQuery.graphql.ts b/src/__generated__/InboxRefetchQuery.graphql.ts new file mode 100644 index 0000000000..97b91d539f --- /dev/null +++ b/src/__generated__/InboxRefetchQuery.graphql.ts @@ -0,0 +1,673 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type InboxRefetchQueryVariables = { +}; +export type InboxRefetchQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query InboxRefetchQuery { + me { + ...Inbox_me + __id + } +} + +fragment Inbox_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + } + conversations_existence_check: conversations(first: 1) { + edges { + node { + id + __id + } + } + } + ...Conversations_me + ...ActiveBids_me + __id +} + +fragment Conversations_me on Me { + conversations(first: 10, after: "") { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + id + last_message + ...ConversationSnippet_conversation + __id + __typename + } + cursor + } + } + __id +} + +fragment ActiveBids_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + ...ActiveBid_bid + } + __id +} + +fragment ActiveBid_bid on LotStanding { + is_leading_bidder + sale { + href + is_live_open + __id + } + most_recent_bid { + __id + max_bid { + display + } + sale_artwork { + artwork { + href + image { + url + } + artist_names + __id + } + counts { + bidder_positions + } + highest_bid { + display + id + } + lot_number + reserve_status + __id + } + } +} + +fragment ConversationSnippet_conversation on Conversation { + id + to { + name + } + last_message + last_message_at + unread + items { + item { + __typename + ... on Artwork { + date + title + artist_names + image { + url + } + } + ... on Show { + fair { + name + __id + } + name + cover_image { + url + } + } + ... on Node { + __id + } + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v3 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +], +v4 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v3 +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "InboxRefetchQuery", + "id": null, + "text": "query InboxRefetchQuery {\n me {\n ...Inbox_me\n __id\n }\n}\n\nfragment Inbox_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n }\n conversations_existence_check: conversations(first: 1) {\n edges {\n node {\n id\n __id\n }\n }\n }\n ...Conversations_me\n ...ActiveBids_me\n __id\n}\n\nfragment Conversations_me on Me {\n conversations(first: 10, after: \"\") {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n id\n last_message\n ...ConversationSnippet_conversation\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n\nfragment ActiveBids_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n ...ActiveBid_bid\n }\n __id\n}\n\nfragment ActiveBid_bid on LotStanding {\n is_leading_bidder\n sale {\n href\n is_live_open\n __id\n }\n most_recent_bid {\n __id\n max_bid {\n display\n }\n sale_artwork {\n artwork {\n href\n image {\n url\n }\n artist_names\n __id\n }\n counts {\n bidder_positions\n }\n highest_bid {\n display\n id\n }\n lot_number\n reserve_status\n __id\n }\n }\n}\n\nfragment ConversationSnippet_conversation on Conversation {\n id\n to {\n name\n }\n last_message\n last_message_at\n unread\n items {\n item {\n __typename\n ... on Artwork {\n date\n title\n artist_names\n image {\n url\n }\n }\n ... on Show {\n fair {\n name\n __id\n }\n name\n cover_image {\n url\n }\n }\n ... on Node {\n __id\n }\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "InboxRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Inbox_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "InboxRefetchQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v1 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v2, + v4, + v5, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v1, + v6 + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedField", + "alias": "conversations_existence_check", + "name": "conversations", + "storageKey": "conversations(first:1)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 1, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v6, + v0 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "conversations", + "storageKey": "conversations(after:\"\",first:10)", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v6, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v7 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v8, + v0, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v7, + v0 + ], + "idField": "__id" + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v3 + } + ] + }, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + v5, + v4 + ] + } + ], + "idField": "__id" + } + ] + }, + v0, + v8 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "conversations", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "Conversations_conversations", + "filters": null + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '71d6c2e4e70f4a21597ded67b1da105b'; +export default node; diff --git a/src/__generated__/Inbox_me.graphql.ts b/src/__generated__/Inbox_me.graphql.ts new file mode 100644 index 0000000000..355f9f09ac --- /dev/null +++ b/src/__generated__/Inbox_me.graphql.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Inbox_me = { + readonly lot_standings: ReadonlyArray<({ + readonly most_recent_bid: ({ + readonly __id: string; + }) | null; + }) | null> | null; + readonly conversations_existence_check: ({ + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly id: string | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Inbox_me", + "type": "Me", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedField", + "alias": "conversations_existence_check", + "name": "conversations", + "storageKey": "conversations(first:1)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 1, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Conversations_me", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "ActiveBids_me", + "args": null + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'c9ffaa700d881c26db63082d921448bf'; +export default node; diff --git a/src/__generated__/Inquiry_artwork.graphql.ts b/src/__generated__/Inquiry_artwork.graphql.ts new file mode 100644 index 0000000000..ea85fbc142 --- /dev/null +++ b/src/__generated__/Inquiry_artwork.graphql.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Inquiry_artwork = { + readonly _id: string; + readonly id: string; + readonly contact_message: string | null; + readonly partner: ({ + readonly name: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Inquiry_artwork", + "type": "Artwork", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "contact_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "FragmentSpread", + "name": "ArtworkPreview_artwork", + "args": null + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '1af371838f3f0980e5bdf7ddc7af01ee'; +export default node; diff --git a/src/__generated__/InvoicePreviewRefetchQuery.graphql.ts b/src/__generated__/InvoicePreviewRefetchQuery.graphql.ts new file mode 100644 index 0000000000..eeef63ec82 --- /dev/null +++ b/src/__generated__/InvoicePreviewRefetchQuery.graphql.ts @@ -0,0 +1,187 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type InvoicePreviewRefetchQueryVariables = { + readonly conversationId: string; + readonly invoiceId: string; +}; +export type InvoicePreviewRefetchQueryResponse = { + readonly me: ({ + readonly invoice: ({ + }) | null; + }) | null; +}; + + + +/* +query InvoicePreviewRefetchQuery( + $conversationId: String! + $invoiceId: String! +) { + me { + invoice(conversationId: $conversationId, invoiceId: $invoiceId) { + ...InvoicePreview_invoice + __id + } + __id + } +} + +fragment InvoicePreview_invoice on Invoice { + payment_url + state + total + lewitt_invoice_id + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "conversationId", + "type": "String!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "invoiceId", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "conversationId", + "variableName": "conversationId", + "type": "String!" + }, + { + "kind": "Variable", + "name": "invoiceId", + "variableName": "invoiceId", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "InvoicePreviewRefetchQuery", + "id": null, + "text": "query InvoicePreviewRefetchQuery(\n $conversationId: String!\n $invoiceId: String!\n) {\n me {\n invoice(conversationId: $conversationId, invoiceId: $invoiceId) {\n ...InvoicePreview_invoice\n __id\n }\n __id\n }\n}\n\nfragment InvoicePreview_invoice on Invoice {\n payment_url\n state\n total\n lewitt_invoice_id\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "InvoicePreviewRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": v1, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "InvoicePreview_invoice", + "args": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "InvoicePreviewRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": v1, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "state", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lewitt_invoice_id", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'cffdbe930d7bf0e07f33a435edc608c0'; +export default node; diff --git a/src/__generated__/InvoicePreview_invoice.graphql.ts b/src/__generated__/InvoicePreview_invoice.graphql.ts new file mode 100644 index 0000000000..e5e1c1c5a1 --- /dev/null +++ b/src/__generated__/InvoicePreview_invoice.graphql.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type InvoiceState = "PAID" | "REFUNDED" | "UNPAID" | "VOID" | "%future added value"; +export type InvoicePreview_invoice = { + readonly payment_url: string | null; + readonly state: InvoiceState | null; + readonly total: string | null; + readonly lewitt_invoice_id: string; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "InvoicePreview_invoice", + "type": "Invoice", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "state", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lewitt_invoice_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '56513ea1e11975c64fc4c4ee843b52f8'; +export default node; diff --git a/src/__generated__/LotsByFollowedArtistsQuery.graphql.ts b/src/__generated__/LotsByFollowedArtistsQuery.graphql.ts new file mode 100644 index 0000000000..b7af40ca4c --- /dev/null +++ b/src/__generated__/LotsByFollowedArtistsQuery.graphql.ts @@ -0,0 +1,532 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type LotsByFollowedArtistsQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type LotsByFollowedArtistsQueryResponse = { + readonly viewer: ({ + }) | null; +}; + + + +/* +query LotsByFollowedArtistsQuery( + $count: Int! + $cursor: String +) { + viewer { + ...LotsByFollowedArtists_viewer_1G22uz + } +} + +fragment LotsByFollowedArtists_viewer_1G22uz on Viewer { + sale_artworks: sale_artworks(first: $count, after: $cursor, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) { + pageInfo { + endCursor + hasNextPage + } + edges { + cursor + node { + artwork { + ...GenericGrid_artworks + __id + } + __id + __typename + } + } + } +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v3 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v1 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "LotsByFollowedArtistsQuery", + "id": null, + "text": "query LotsByFollowedArtistsQuery(\n $count: Int!\n $cursor: String\n) {\n viewer {\n ...LotsByFollowedArtists_viewer_1G22uz\n }\n}\n\nfragment LotsByFollowedArtists_viewer_1G22uz on Viewer {\n sale_artworks: sale_artworks(first: $count, after: $cursor, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n artwork {\n ...GenericGrid_artworks\n __id\n }\n __id\n __typename\n }\n }\n }\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "LotsByFollowedArtistsQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": "viewer", + "name": "__viewer_viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "LotsByFollowedArtists_viewer", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "LotsByFollowedArtistsQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": "sale_artworks", + "name": "sale_artworks", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "SaleArtworksConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworksEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v2 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v2 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v3, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v3, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "sale_artworks", + "name": "sale_artworks", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "handle": "connection", + "key": "LotsByFollowedArtists_sale_artworks", + "filters": [ + "live_sale", + "is_auction", + "include_artworks_by_followed_artists" + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "viewer", + "args": null, + "handle": "viewer", + "key": "", + "filters": null + } + ] + } +}; +})(); +(node as any).hash = 'b7000438d69fe66f5af0f851e78d6009'; +export default node; diff --git a/src/__generated__/LotsByFollowedArtists_viewer.graphql.ts b/src/__generated__/LotsByFollowedArtists_viewer.graphql.ts new file mode 100644 index 0000000000..807d24b1a3 --- /dev/null +++ b/src/__generated__/LotsByFollowedArtists_viewer.graphql.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type LotsByFollowedArtists_viewer = { + readonly sale_artworks: ({ + readonly pageInfo: { + readonly endCursor: string | null; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly cursor: string; + readonly node: ({ + readonly artwork: ({ + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "LotsByFollowedArtists_viewer", + "type": "Viewer", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "sale_artworks" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": "sale_artworks", + "name": "__LotsByFollowedArtists_sale_artworks_connection", + "storageKey": "__LotsByFollowedArtists_sale_artworks_connection(include_artworks_by_followed_artists:true,is_auction:true,live_sale:true)", + "args": [ + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "SaleArtworksConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworksEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0 + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } + ] + } + ] +}; +})(); +(node as any).hash = 'dcdc4bfa65bbc0cf27b7a438c8c3a5b7'; +export default node; diff --git a/src/__generated__/Message_message.graphql.ts b/src/__generated__/Message_message.graphql.ts new file mode 100644 index 0000000000..51ecaa7901 --- /dev/null +++ b/src/__generated__/Message_message.graphql.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Message_message = { + readonly body: string | null; + readonly created_at: string | null; + readonly is_from_user: boolean | null; + readonly from: ({ + readonly name: string | null; + readonly email: string | null; + }) | null; + readonly invoice: ({ + readonly payment_url: string | null; + }) | null; + readonly attachments: ReadonlyArray<({ + readonly id: string; + readonly content_type: string; + readonly download_url: string; + readonly file_name: string; + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Message_message", + "type": "Message", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "body", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "created_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_from_user", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "MessageInitiator", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": null, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "InvoicePreview_invoice", + "args": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "attachments", + "storageKey": null, + "args": null, + "concreteType": "Attachment", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "content_type", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "download_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "file_name", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "ImagePreview_attachment", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "PDFPreview_attachment", + "args": null + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '04f6dec99660b3ec89bcebc4d828428f'; +export default node; diff --git a/src/__generated__/MessagesQuery.graphql.ts b/src/__generated__/MessagesQuery.graphql.ts new file mode 100644 index 0000000000..2e140afb03 --- /dev/null +++ b/src/__generated__/MessagesQuery.graphql.ts @@ -0,0 +1,780 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type MessagesQueryVariables = { + readonly conversationID: string; + readonly count: number; + readonly after?: string | null; +}; +export type MessagesQueryResponse = { + readonly me: ({ + readonly conversation: ({ + }) | null; + }) | null; +}; + + + +/* +query MessagesQuery( + $conversationID: String! + $count: Int! + $after: String +) { + me { + conversation(id: $conversationID) { + ...Messages_conversation_2QE1um + __id + } + __id + } +} + +fragment Messages_conversation_2QE1um on Conversation { + __id + id + from { + name + email + initials + } + to { + name + initials + } + initial_message + messages(first: $count, after: $after, sort: DESC) { + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + cursor + node { + __id + impulse_id + is_from_user + body + attachments { + id + } + ...Message_message + __typename + } + } + } + items { + artwork: item { + __typename + ... on Artwork { + href + ...ArtworkPreview_artwork + } + ... on Node { + __id + } + } + show: item { + __typename + ... on Show { + href + ...ShowPreview_show + } + ... on Node { + __id + } + } + } +} + +fragment Message_message on Message { + body + created_at + is_from_user + from { + name + email + } + invoice { + payment_url + ...InvoicePreview_invoice + __id + } + attachments { + id + content_type + download_url + file_name + ...ImagePreview_attachment + ...PDFPreview_attachment + } + __id +} + +fragment ArtworkPreview_artwork on Artwork { + id + _id + title + artist_names + date + image { + url + } + __id +} + +fragment ShowPreview_show on Show { + id + _id + name + cover_image { + url + } + fair { + name + __id + } + partner { + __typename + ... on Partner { + name + } + ... on Node { + __id + } + ... on ExternalPartner { + __id + } + } + __id +} + +fragment InvoicePreview_invoice on Invoice { + payment_url + state + total + lewitt_invoice_id + __id +} + +fragment ImagePreview_attachment on Attachment { + download_url + ...AttachmentPreview_attachment +} + +fragment PDFPreview_attachment on Attachment { + file_name + ...AttachmentPreview_attachment +} + +fragment AttachmentPreview_attachment on Attachment { + id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "conversationID", + "type": "String!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "after", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "conversationID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v9 = { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null +}, +v10 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "MessagesQuery", + "id": null, + "text": "query MessagesQuery(\n $conversationID: String!\n $count: Int!\n $after: String\n) {\n me {\n conversation(id: $conversationID) {\n ...Messages_conversation_2QE1um\n __id\n }\n __id\n }\n}\n\nfragment Messages_conversation_2QE1um on Conversation {\n __id\n id\n from {\n name\n email\n initials\n }\n to {\n name\n initials\n }\n initial_message\n messages(first: $count, after: $after, sort: DESC) {\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n edges {\n cursor\n node {\n __id\n impulse_id\n is_from_user\n body\n attachments {\n id\n }\n ...Message_message\n __typename\n }\n }\n }\n items {\n artwork: item {\n __typename\n ... on Artwork {\n href\n ...ArtworkPreview_artwork\n }\n ... on Node {\n __id\n }\n }\n show: item {\n __typename\n ... on Show {\n href\n ...ShowPreview_show\n }\n ... on Node {\n __id\n }\n }\n }\n}\n\nfragment Message_message on Message {\n body\n created_at\n is_from_user\n from {\n name\n email\n }\n invoice {\n payment_url\n ...InvoicePreview_invoice\n __id\n }\n attachments {\n id\n content_type\n download_url\n file_name\n ...ImagePreview_attachment\n ...PDFPreview_attachment\n }\n __id\n}\n\nfragment ArtworkPreview_artwork on Artwork {\n id\n _id\n title\n artist_names\n date\n image {\n url\n }\n __id\n}\n\nfragment ShowPreview_show on Show {\n id\n _id\n name\n cover_image {\n url\n }\n fair {\n name\n __id\n }\n partner {\n __typename\n ... on Partner {\n name\n }\n ... on Node {\n __id\n }\n ... on ExternalPartner {\n __id\n }\n }\n __id\n}\n\nfragment InvoicePreview_invoice on Invoice {\n payment_url\n state\n total\n lewitt_invoice_id\n __id\n}\n\nfragment ImagePreview_attachment on Attachment {\n download_url\n ...AttachmentPreview_attachment\n}\n\nfragment PDFPreview_attachment on Attachment {\n file_name\n ...AttachmentPreview_attachment\n}\n\nfragment AttachmentPreview_attachment on Attachment {\n id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "MessagesQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversation", + "storageKey": null, + "args": v1, + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Messages_conversation", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "after", + "type": null + }, + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "MessagesQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversation", + "storageKey": null, + "args": v1, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v2, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "ConversationInitiator", + "plural": false, + "selections": [ + v4, + v5, + v6 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v4, + v6 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initial_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "messages", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "after", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "DESC", + "type": "sort" + } + ], + "concreteType": "MessageConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasPreviousPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "MessageEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Message", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "impulse_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_from_user", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "body", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "attachments", + "storageKey": null, + "args": null, + "concreteType": "Attachment", + "plural": true, + "selections": [ + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "content_type", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "download_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "file_name", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "created_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "MessageInitiator", + "plural": false, + "selections": [ + v4, + v5 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": null, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "state", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lewitt_invoice_id", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v7 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "messages", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "after", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "DESC", + "type": "sort" + } + ], + "handle": "connection", + "key": "Messages_messages", + "filters": [] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": "artwork", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v7, + v2, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + v8, + v3, + v9, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v10 + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "show", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v7, + v2, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + v8, + v3, + v9, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v10 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v4, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v7, + v2, + { + "kind": "InlineFragment", + "type": "Partner", + "selections": [ + v4 + ] + } + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '8a4e8692f76af568a4c8b73c6306c1c0'; +export default node; diff --git a/src/__generated__/Messages_conversation.graphql.ts b/src/__generated__/Messages_conversation.graphql.ts new file mode 100644 index 0000000000..171e0378a8 --- /dev/null +++ b/src/__generated__/Messages_conversation.graphql.ts @@ -0,0 +1,350 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Messages_conversation = { + readonly __id: string; + readonly id: string | null; + readonly from: { + readonly name: string; + readonly email: string; + readonly initials: string | null; + }; + readonly to: { + readonly name: string; + readonly initials: string | null; + }; + readonly initial_message: string; + readonly messages: ({ + readonly pageInfo: { + readonly startCursor: string | null; + readonly endCursor: string | null; + readonly hasPreviousPage: boolean; + readonly hasNextPage: boolean; + }; + readonly edges: ReadonlyArray<({ + readonly cursor: string; + readonly node: ({ + readonly __id: string; + readonly impulse_id: string; + readonly is_from_user: boolean | null; + readonly body: string | null; + readonly attachments: ReadonlyArray<({ + readonly id: string; + }) | null> | null; + }) | null; + }) | null> | null; + }) | null; + readonly items: ReadonlyArray<({ + readonly artwork: ({ + readonly href?: string | null; + }) | null; + readonly show: ({ + readonly href?: string | null; + }) | null; + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Messages_conversation", + "type": "Conversation", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "after", + "direction": "forward", + "path": [ + "messages" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "after", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + v0, + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "ConversationInitiator", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null + }, + v3 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v2, + v3 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initial_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": "messages", + "name": "__Messages_messages_connection", + "storageKey": null, + "args": null, + "concreteType": "MessageConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasPreviousPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "MessageEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Message", + "plural": false, + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "impulse_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_from_user", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "body", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "attachments", + "storageKey": null, + "args": null, + "concreteType": "Attachment", + "plural": true, + "selections": [ + v1 + ] + }, + { + "kind": "FragmentSpread", + "name": "Message_message", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": "artwork", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + v4, + { + "kind": "FragmentSpread", + "name": "ArtworkPreview_artwork", + "args": null + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "show", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v0, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + v4, + { + "kind": "FragmentSpread", + "name": "ShowPreview_show", + "args": null + } + ] + } + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '943535ecfc6ac6a8a0561ac1e6bdf065'; +export default node; diff --git a/src/__generated__/Metadata_show.graphql.ts b/src/__generated__/Metadata_show.graphql.ts new file mode 100644 index 0000000000..d6864bbb8f --- /dev/null +++ b/src/__generated__/Metadata_show.graphql.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Metadata_show = { + readonly kind: string | null; + readonly name: string | null; + readonly exhibition_period: string | null; + readonly status_update: string | null; + readonly status: string | null; + readonly partner: ({ + readonly name: string | null; + }) | null; + readonly location: ({ + readonly city: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Metadata_show", + "type": "PartnerShow", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "kind", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "exhibition_period", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "status_update", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "status", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": [ + v0, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "location", + "storageKey": null, + "args": null, + "concreteType": "Location", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "city", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '10185232d146c1a914944c67e6b71060'; +export default node; diff --git a/src/__generated__/MyProfile_me.graphql.ts b/src/__generated__/MyProfile_me.graphql.ts new file mode 100644 index 0000000000..e8a48d69c5 --- /dev/null +++ b/src/__generated__/MyProfile_me.graphql.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type MyProfile_me = { + readonly name: string | null; + readonly initials: string | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "MyProfile_me", + "type": "Me", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'b0d654a679f1e4833dcf47729e29a6c1'; +export default node; diff --git a/src/__generated__/Notification_notification.graphql.ts b/src/__generated__/Notification_notification.graphql.ts new file mode 100644 index 0000000000..bc4e287451 --- /dev/null +++ b/src/__generated__/Notification_notification.graphql.ts @@ -0,0 +1,143 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Notification_notification = { + readonly summary: string | null; + readonly artists: string | null; + readonly artworks: ReadonlyArray<({ + readonly artists: ReadonlyArray<({ + readonly href: string | null; + }) | null> | null; + }) | null> | null; + readonly image: ({ + readonly resized: ({ + readonly url: string | null; + }) | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "Notification_notification", + "type": "FollowedArtistsArtworksGroup", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "summary", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artists", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "resized", + "storageKey": "resized(height:80,width:80)", + "args": [ + { + "kind": "Literal", + "name": "height", + "value": 80, + "type": "Int" + }, + { + "kind": "Literal", + "name": "width", + "value": 80, + "type": "Int" + } + ], + "concreteType": "ResizedImageUrl", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ] + }, + v0 + ], + "idField": "__id" +}; +})(); +(node as any).hash = '9bcd451b9edfda79aacce192d92db290'; +export default node; diff --git a/src/__generated__/PDFPreview_attachment.graphql.ts b/src/__generated__/PDFPreview_attachment.graphql.ts new file mode 100644 index 0000000000..4c33036b43 --- /dev/null +++ b/src/__generated__/PDFPreview_attachment.graphql.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type PDFPreview_attachment = { + readonly file_name: string; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "PDFPreview_attachment", + "type": "Attachment", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "file_name", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "AttachmentPreview_attachment", + "args": null + } + ] +}; +(node as any).hash = '812b3b97609acbb604557bdaefbac873'; +export default node; diff --git a/src/__generated__/QueryRenderersArtistQuery.graphql.ts b/src/__generated__/QueryRenderersArtistQuery.graphql.ts new file mode 100644 index 0000000000..542655a659 --- /dev/null +++ b/src/__generated__/QueryRenderersArtistQuery.graphql.ts @@ -0,0 +1,1069 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersArtistQueryVariables = { + readonly artistID: string; + readonly isPad: boolean; +}; +export type QueryRenderersArtistQueryResponse = { + readonly artist: ({ + }) | null; +}; + + + +/* +query QueryRenderersArtistQuery( + $artistID: String! + $isPad: Boolean! +) { + artist(id: $artistID) { + ...Artist_artist + __id + } +} + +fragment Artist_artist on Artist { + _id + id + has_metadata + counts { + artworks + partner_shows + related_artists + articles + } + ...Header_artist + ...About_artist + ...Shows_artist + ...Artworks_artist + __id +} + +fragment Header_artist on Artist { + _id + id + name + nationality + birthday + counts { + follows + } + __id +} + +fragment About_artist on Artist { + has_metadata + is_display_auction_link + id + ...Biography_artist + related_artists: artists(size: 16) { + ...RelatedArtists_artists + __id + } + articles { + ...Articles_articles + __id + } + __id +} + +fragment Shows_artist on Artist { + current_shows: partner_shows(status: "running") { + ...VariableSizeShowsList_shows + __id + } + upcoming_shows: partner_shows(status: "upcoming") { + ...VariableSizeShowsList_shows + __id + } + past_small_shows: partner_shows(status: "closed", size: 20) @skip(if: $isPad) { + ...SmallList_shows + __id + } + past_large_shows: partner_shows(status: "closed", size: 20) @include(if: $isPad) { + ...VariableSizeShowsList_shows + __id + } + __id +} + +fragment Artworks_artist on Artist { + counts { + artworks + for_sale_artworks + } + ...ArtistForSaleArtworksGrid_artist + ...ArtistNotForSaleArtworksGrid_artist + __id +} + +fragment ArtistForSaleArtworksGrid_artist on Artist { + __id + forSaleArtworks: artworks_connection(first: 10, filter: [IS_FOR_SALE], sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment ArtistNotForSaleArtworksGrid_artist on Artist { + __id + notForSaleArtworks: artworks_connection(first: 10, filter: [IS_NOT_FOR_SALE], sort: partner_updated_at_desc) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} + +fragment VariableSizeShowsList_shows on PartnerShow { + __id + ...Show_show +} + +fragment SmallList_shows on PartnerShow { + ...Show_show + __id +} + +fragment Show_show on PartnerShow { + href + cover_image { + url(version: "large") + } + ...Metadata_show + __id +} + +fragment Metadata_show on PartnerShow { + kind + name + exhibition_period + status_update + status + partner { + name + __id + } + location { + city + __id + } + __id +} + +fragment Biography_artist on Artist { + bio + blurb + __id +} + +fragment RelatedArtists_artists on Artist { + __id + ...RelatedArtist_artist +} + +fragment Articles_articles on Article { + __id + ...Article_article +} + +fragment Article_article on Article { + thumbnail_title + href + author { + name + __id + } + thumbnail_image { + url(version: "large") + } + __id +} + +fragment RelatedArtist_artist on Artist { + href + name + counts { + for_sale_artworks + artworks + } + image { + url(version: "large") + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "artistID", + "type": "String!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "isPad", + "type": "Boolean!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "artistID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v9 = [ + v8 +], +v10 = [ + v5, + v2 +], +v11 = { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 +}, +v12 = { + "kind": "ScalarField", + "alias": null, + "name": "kind", + "args": null, + "storageKey": null +}, +v13 = { + "kind": "ScalarField", + "alias": null, + "name": "exhibition_period", + "args": null, + "storageKey": null +}, +v14 = { + "kind": "ScalarField", + "alias": null, + "name": "status_update", + "args": null, + "storageKey": null +}, +v15 = { + "kind": "ScalarField", + "alias": null, + "name": "status", + "args": null, + "storageKey": null +}, +v16 = { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v10, + "idField": "__id" +}, +v17 = { + "kind": "LinkedField", + "alias": null, + "name": "location", + "storageKey": null, + "args": null, + "concreteType": "Location", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "city", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" +}, +v18 = [ + v2, + v7, + v11, + v12, + v5, + v13, + v14, + v15, + v16, + v17 +], +v19 = { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" +}, +v20 = { + "kind": "Literal", + "name": "sort", + "value": "partner_updated_at_desc", + "type": "ArtworkSorts" +}, +v21 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v22 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v6, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + v8 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v21 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v21 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v10, + "idField": "__id" + }, + v16, + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } +], +v23 = [ + "filter", + "sort" +], +v24 = [ + { + "kind": "Literal", + "name": "size", + "value": 20, + "type": "Int" + }, + { + "kind": "Literal", + "name": "status", + "value": "closed", + "type": "String" + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersArtistQuery", + "id": null, + "text": "query QueryRenderersArtistQuery(\n $artistID: String!\n $isPad: Boolean!\n) {\n artist(id: $artistID) {\n ...Artist_artist\n __id\n }\n}\n\nfragment Artist_artist on Artist {\n _id\n id\n has_metadata\n counts {\n artworks\n partner_shows\n related_artists\n articles\n }\n ...Header_artist\n ...About_artist\n ...Shows_artist\n ...Artworks_artist\n __id\n}\n\nfragment Header_artist on Artist {\n _id\n id\n name\n nationality\n birthday\n counts {\n follows\n }\n __id\n}\n\nfragment About_artist on Artist {\n has_metadata\n is_display_auction_link\n id\n ...Biography_artist\n related_artists: artists(size: 16) {\n ...RelatedArtists_artists\n __id\n }\n articles {\n ...Articles_articles\n __id\n }\n __id\n}\n\nfragment Shows_artist on Artist {\n current_shows: partner_shows(status: \"running\") {\n ...VariableSizeShowsList_shows\n __id\n }\n upcoming_shows: partner_shows(status: \"upcoming\") {\n ...VariableSizeShowsList_shows\n __id\n }\n past_small_shows: partner_shows(status: \"closed\", size: 20) @skip(if: $isPad) {\n ...SmallList_shows\n __id\n }\n past_large_shows: partner_shows(status: \"closed\", size: 20) @include(if: $isPad) {\n ...VariableSizeShowsList_shows\n __id\n }\n __id\n}\n\nfragment Artworks_artist on Artist {\n counts {\n artworks\n for_sale_artworks\n }\n ...ArtistForSaleArtworksGrid_artist\n ...ArtistNotForSaleArtworksGrid_artist\n __id\n}\n\nfragment ArtistForSaleArtworksGrid_artist on Artist {\n __id\n forSaleArtworks: artworks_connection(first: 10, filter: [IS_FOR_SALE], sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment ArtistNotForSaleArtworksGrid_artist on Artist {\n __id\n notForSaleArtworks: artworks_connection(first: 10, filter: [IS_NOT_FOR_SALE], sort: partner_updated_at_desc) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n\nfragment VariableSizeShowsList_shows on PartnerShow {\n __id\n ...Show_show\n}\n\nfragment SmallList_shows on PartnerShow {\n ...Show_show\n __id\n}\n\nfragment Show_show on PartnerShow {\n href\n cover_image {\n url(version: \"large\")\n }\n ...Metadata_show\n __id\n}\n\nfragment Metadata_show on PartnerShow {\n kind\n name\n exhibition_period\n status_update\n status\n partner {\n name\n __id\n }\n location {\n city\n __id\n }\n __id\n}\n\nfragment Biography_artist on Artist {\n bio\n blurb\n __id\n}\n\nfragment RelatedArtists_artists on Artist {\n __id\n ...RelatedArtist_artist\n}\n\nfragment Articles_articles on Article {\n __id\n ...Article_article\n}\n\nfragment Article_article on Article {\n thumbnail_title\n href\n author {\n name\n __id\n }\n thumbnail_image {\n url(version: \"large\")\n }\n __id\n}\n\nfragment RelatedArtist_artist on Artist {\n href\n name\n counts {\n for_sale_artworks\n artworks\n }\n image {\n url(version: \"large\")\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersArtistQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Artist_artist", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersArtistQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": v1, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "has_metadata", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "partner_shows", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "related_artists", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "articles", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "follows", + "args": null, + "storageKey": null + }, + v4 + ] + }, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "nationality", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "birthday", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_display_auction_link", + "args": null, + "storageKey": null + }, + v6, + { + "kind": "ScalarField", + "alias": null, + "name": "blurb", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": "related_artists", + "name": "artists", + "storageKey": "artists(size:16)", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 16, + "type": "Int" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": [ + v2, + v7, + v5, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + v4, + v3 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "articles", + "storageKey": null, + "args": null, + "concreteType": "Article", + "plural": true, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "thumbnail_title", + "args": null, + "storageKey": null + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "author", + "storageKey": null, + "args": null, + "concreteType": "Author", + "plural": false, + "selections": v10, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "thumbnail_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "current_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"running\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "running", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "upcoming_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"upcoming\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "upcoming", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "storageKey": "artworks_connection(filter:[\"IS_FOR_SALE\"],first:10,sort:\"partner_updated_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": v22 + }, + { + "kind": "LinkedHandle", + "alias": "forSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "handle": "connection", + "key": "ArtistForSaleArtworksGrid_forSaleArtworks", + "filters": v23 + }, + { + "kind": "LinkedField", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "storageKey": "artworks_connection(filter:[\"IS_NOT_FOR_SALE\"],first:10,sort:\"partner_updated_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_NOT_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": v22 + }, + { + "kind": "LinkedHandle", + "alias": "notForSaleArtworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "filter", + "value": [ + "IS_NOT_FOR_SALE" + ], + "type": "[ArtistArtworksFilters]" + }, + v19, + v20 + ], + "handle": "connection", + "key": "ArtistNotForSaleArtworksGrid_notForSaleArtworks", + "filters": v23 + }, + { + "kind": "Condition", + "passingValue": false, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_small_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v24, + "concreteType": "PartnerShow", + "plural": true, + "selections": [ + v7, + v11, + v12, + v5, + v13, + v14, + v15, + v16, + v17, + v2 + ], + "idField": "__id" + } + ] + }, + { + "kind": "Condition", + "passingValue": true, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_large_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v24, + "concreteType": "PartnerShow", + "plural": true, + "selections": v18, + "idField": "__id" + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '4f96ab0eb841e4e302758c475a4c3561'; +export default node; diff --git a/src/__generated__/QueryRenderersConversationQuery.graphql.ts b/src/__generated__/QueryRenderersConversationQuery.graphql.ts new file mode 100644 index 0000000000..72f6a43024 --- /dev/null +++ b/src/__generated__/QueryRenderersConversationQuery.graphql.ts @@ -0,0 +1,753 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersConversationQueryVariables = { + readonly conversationID: string; +}; +export type QueryRenderersConversationQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query QueryRenderersConversationQuery( + $conversationID: String! +) { + me { + ...Conversation_me + __id + } +} + +fragment Conversation_me on Me { + conversation(id: $conversationID) { + id + __id + to { + name + initials + } + from { + email + } + last_message_id + ...Messages_conversation + initial_message + unread + } + __id +} + +fragment Messages_conversation on Conversation { + __id + id + from { + name + email + initials + } + to { + name + initials + } + initial_message + messages(first: 10, sort: DESC) { + pageInfo { + startCursor + endCursor + hasPreviousPage + hasNextPage + } + edges { + cursor + node { + __id + impulse_id + is_from_user + body + attachments { + id + } + ...Message_message + __typename + } + } + } + items { + artwork: item { + __typename + ... on Artwork { + href + ...ArtworkPreview_artwork + } + ... on Node { + __id + } + } + show: item { + __typename + ... on Show { + href + ...ShowPreview_show + } + ... on Node { + __id + } + } + } +} + +fragment Message_message on Message { + body + created_at + is_from_user + from { + name + email + } + invoice { + payment_url + ...InvoicePreview_invoice + __id + } + attachments { + id + content_type + download_url + file_name + ...ImagePreview_attachment + ...PDFPreview_attachment + } + __id +} + +fragment ArtworkPreview_artwork on Artwork { + id + _id + title + artist_names + date + image { + url + } + __id +} + +fragment ShowPreview_show on Show { + id + _id + name + cover_image { + url + } + fair { + name + __id + } + partner { + __typename + ... on Partner { + name + } + ... on Node { + __id + } + ... on ExternalPartner { + __id + } + } + __id +} + +fragment InvoicePreview_invoice on Invoice { + payment_url + state + total + lewitt_invoice_id + __id +} + +fragment ImagePreview_attachment on Attachment { + download_url + ...AttachmentPreview_attachment +} + +fragment PDFPreview_attachment on Attachment { + file_name + ...AttachmentPreview_attachment +} + +fragment AttachmentPreview_attachment on Attachment { + id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "conversationID", + "type": "String!", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null +}, +v9 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersConversationQuery", + "id": null, + "text": "query QueryRenderersConversationQuery(\n $conversationID: String!\n) {\n me {\n ...Conversation_me\n __id\n }\n}\n\nfragment Conversation_me on Me {\n conversation(id: $conversationID) {\n id\n __id\n to {\n name\n initials\n }\n from {\n email\n }\n last_message_id\n ...Messages_conversation\n initial_message\n unread\n }\n __id\n}\n\nfragment Messages_conversation on Conversation {\n __id\n id\n from {\n name\n email\n initials\n }\n to {\n name\n initials\n }\n initial_message\n messages(first: 10, sort: DESC) {\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n edges {\n cursor\n node {\n __id\n impulse_id\n is_from_user\n body\n attachments {\n id\n }\n ...Message_message\n __typename\n }\n }\n }\n items {\n artwork: item {\n __typename\n ... on Artwork {\n href\n ...ArtworkPreview_artwork\n }\n ... on Node {\n __id\n }\n }\n show: item {\n __typename\n ... on Show {\n href\n ...ShowPreview_show\n }\n ... on Node {\n __id\n }\n }\n }\n}\n\nfragment Message_message on Message {\n body\n created_at\n is_from_user\n from {\n name\n email\n }\n invoice {\n payment_url\n ...InvoicePreview_invoice\n __id\n }\n attachments {\n id\n content_type\n download_url\n file_name\n ...ImagePreview_attachment\n ...PDFPreview_attachment\n }\n __id\n}\n\nfragment ArtworkPreview_artwork on Artwork {\n id\n _id\n title\n artist_names\n date\n image {\n url\n }\n __id\n}\n\nfragment ShowPreview_show on Show {\n id\n _id\n name\n cover_image {\n url\n }\n fair {\n name\n __id\n }\n partner {\n __typename\n ... on Partner {\n name\n }\n ... on Node {\n __id\n }\n ... on ExternalPartner {\n __id\n }\n }\n __id\n}\n\nfragment InvoicePreview_invoice on Invoice {\n payment_url\n state\n total\n lewitt_invoice_id\n __id\n}\n\nfragment ImagePreview_attachment on Attachment {\n download_url\n ...AttachmentPreview_attachment\n}\n\nfragment PDFPreview_attachment on Attachment {\n file_name\n ...AttachmentPreview_attachment\n}\n\nfragment AttachmentPreview_attachment on Attachment {\n id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersConversationQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Conversation_me", + "args": null + }, + v1 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersConversationQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversation", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "id", + "variableName": "conversationID", + "type": "String!" + } + ], + "concreteType": "Conversation", + "plural": false, + "selections": [ + v2, + v1, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v3, + v4 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "ConversationInitiator", + "plural": false, + "selections": [ + v5, + v3, + v4 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initial_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "messages", + "storageKey": "messages(first:10,sort:\"DESC\")", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "DESC", + "type": "sort" + } + ], + "concreteType": "MessageConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasPreviousPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "MessageEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Message", + "plural": false, + "selections": [ + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "impulse_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_from_user", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "body", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "attachments", + "storageKey": null, + "args": null, + "concreteType": "Attachment", + "plural": true, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "content_type", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "download_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "file_name", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "created_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "MessageInitiator", + "plural": false, + "selections": [ + v3, + v5 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": null, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "state", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lewitt_invoice_id", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v6 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "messages", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "DESC", + "type": "sort" + } + ], + "handle": "connection", + "key": "Messages_messages", + "filters": [] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": "artwork", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v6, + v1, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + v7, + v2, + v8, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "show", + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v6, + v1, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + v7, + v2, + v8, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v9 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v3, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v6, + v1, + { + "kind": "InlineFragment", + "type": "Partner", + "selections": [ + v3 + ] + } + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'fe5889d5a36fd2a36e81e4d6f595a8b1'; +export default node; diff --git a/src/__generated__/QueryRenderersForYouQuery.graphql.ts b/src/__generated__/QueryRenderersForYouQuery.graphql.ts new file mode 100644 index 0000000000..98d4a37662 --- /dev/null +++ b/src/__generated__/QueryRenderersForYouQuery.graphql.ts @@ -0,0 +1,525 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersForYouQueryVariables = { +}; +export type QueryRenderersForYouQueryResponse = { + readonly forYou: ({ + }) | null; +}; + + + +/* +query QueryRenderersForYouQuery { + forYou: home_page { + ...ForYou_forYou + } +} + +fragment ForYou_forYou on HomePage { + artwork_modules(max_rails: -1, max_followed_gene_rails: -1, order: [ACTIVE_BIDS, RECOMMENDED_WORKS, FOLLOWED_ARTISTS, RELATED_ARTISTS, FOLLOWED_GALLERIES, SAVED_WORKS, LIVE_AUCTIONS, CURRENT_FAIRS, FOLLOWED_GENES, GENERIC_GENES], exclude: [FOLLOWED_ARTISTS]) { + __id + ...ArtworkCarousel_rail + } + artist_modules { + __id + ...ArtistRail_rail + } + fairs_module { + ...FairsRail_fairs_module + } +} + +fragment ArtworkCarousel_rail on HomePageArtworkModule { + ...ArtworkCarouselHeader_rail + __id + key + params { + medium + price_range + id + } + context { + __typename + ... on HomePageModuleContextFollowedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextRelatedArtist { + artist { + href + __id + } + } + ... on HomePageModuleContextFair { + href + __id + } + ... on HomePageModuleContextGene { + href + } + ... on HomePageModuleContextSale { + href + } + ... on Node { + __id + } + } +} + +fragment ArtistRail_rail on HomePageArtistModule { + __id + key +} + +fragment FairsRail_fairs_module on HomePageFairsModule { + results { + id + name + profile { + href + __id + } + mobile_image { + id + url + } + __id + } +} + +fragment ArtworkCarouselHeader_rail on HomePageArtworkModule { + title + key + followedArtistContext: context { + __typename + ... on HomePageModuleContextFollowedArtist { + artist { + _id + id + __id + } + } + ... on Node { + __id + } + ... on HomePageModuleContextFair { + __id + } + } + relatedArtistContext: context { + __typename + ... on HomePageModuleContextRelatedArtist { + artist { + _id + id + __id + } + based_on { + name + __id + } + } + ... on Node { + __id + } + ... on HomePageModuleContextFair { + __id + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "key", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v3, + v0 + ], + "idField": "__id" +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v7 = [ + v6 +], +v8 = [ + v6, + v0 +], +v9 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "artist", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": v8, + "idField": "__id" + } +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersForYouQuery", + "id": null, + "text": "query QueryRenderersForYouQuery {\n forYou: home_page {\n ...ForYou_forYou\n }\n}\n\nfragment ForYou_forYou on HomePage {\n artwork_modules(max_rails: -1, max_followed_gene_rails: -1, order: [ACTIVE_BIDS, RECOMMENDED_WORKS, FOLLOWED_ARTISTS, RELATED_ARTISTS, FOLLOWED_GALLERIES, SAVED_WORKS, LIVE_AUCTIONS, CURRENT_FAIRS, FOLLOWED_GENES, GENERIC_GENES], exclude: [FOLLOWED_ARTISTS]) {\n __id\n ...ArtworkCarousel_rail\n }\n artist_modules {\n __id\n ...ArtistRail_rail\n }\n fairs_module {\n ...FairsRail_fairs_module\n }\n}\n\nfragment ArtworkCarousel_rail on HomePageArtworkModule {\n ...ArtworkCarouselHeader_rail\n __id\n key\n params {\n medium\n price_range\n id\n }\n context {\n __typename\n ... on HomePageModuleContextFollowedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextRelatedArtist {\n artist {\n href\n __id\n }\n }\n ... on HomePageModuleContextFair {\n href\n __id\n }\n ... on HomePageModuleContextGene {\n href\n }\n ... on HomePageModuleContextSale {\n href\n }\n ... on Node {\n __id\n }\n }\n}\n\nfragment ArtistRail_rail on HomePageArtistModule {\n __id\n key\n}\n\nfragment FairsRail_fairs_module on HomePageFairsModule {\n results {\n id\n name\n profile {\n href\n __id\n }\n mobile_image {\n id\n url\n }\n __id\n }\n}\n\nfragment ArtworkCarouselHeader_rail on HomePageArtworkModule {\n title\n key\n followedArtistContext: context {\n __typename\n ... on HomePageModuleContextFollowedArtist {\n artist {\n _id\n id\n __id\n }\n }\n ... on Node {\n __id\n }\n ... on HomePageModuleContextFair {\n __id\n }\n }\n relatedArtistContext: context {\n __typename\n ... on HomePageModuleContextRelatedArtist {\n artist {\n _id\n id\n __id\n }\n based_on {\n name\n __id\n }\n }\n ... on Node {\n __id\n }\n ... on HomePageModuleContextFair {\n __id\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersForYouQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": "forYou", + "name": "home_page", + "storageKey": null, + "args": null, + "concreteType": "HomePage", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "ForYou_forYou", + "args": null + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersForYouQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": "forYou", + "name": "home_page", + "storageKey": null, + "args": null, + "concreteType": "HomePage", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork_modules", + "storageKey": "artwork_modules(exclude:[\"FOLLOWED_ARTISTS\"],max_followed_gene_rails:-1,max_rails:-1,order:[\"ACTIVE_BIDS\",\"RECOMMENDED_WORKS\",\"FOLLOWED_ARTISTS\",\"RELATED_ARTISTS\",\"FOLLOWED_GALLERIES\",\"SAVED_WORKS\",\"LIVE_AUCTIONS\",\"CURRENT_FAIRS\",\"FOLLOWED_GENES\",\"GENERIC_GENES\"])", + "args": [ + { + "kind": "Literal", + "name": "exclude", + "value": [ + "FOLLOWED_ARTISTS" + ], + "type": "[HomePageArtworkModuleTypes]" + }, + { + "kind": "Literal", + "name": "max_followed_gene_rails", + "value": -1, + "type": "Int" + }, + { + "kind": "Literal", + "name": "max_rails", + "value": -1, + "type": "Int" + }, + { + "kind": "Literal", + "name": "order", + "value": [ + "ACTIVE_BIDS", + "RECOMMENDED_WORKS", + "FOLLOWED_ARTISTS", + "RELATED_ARTISTS", + "FOLLOWED_GALLERIES", + "SAVED_WORKS", + "LIVE_AUCTIONS", + "CURRENT_FAIRS", + "FOLLOWED_GENES", + "GENERIC_GENES" + ], + "type": "[HomePageArtworkModuleTypes]" + } + ], + "concreteType": "HomePageArtworkModule", + "plural": true, + "selections": [ + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "LinkedField", + "alias": "followedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v2, + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": [ + v4 + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "relatedArtistContext", + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v2, + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": [ + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "based_on", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": false, + "selections": [ + v5, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "params", + "storageKey": null, + "args": null, + "concreteType": "HomePageModulesParams", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "medium", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "price_range", + "args": null, + "storageKey": null + }, + v3 + ], + "idField": "id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "context", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v2, + v0, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextSale", + "selections": v7 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextGene", + "selections": v7 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFair", + "selections": v7 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextRelatedArtist", + "selections": v9 + }, + { + "kind": "InlineFragment", + "type": "HomePageModuleContextFollowedArtist", + "selections": v9 + } + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artist_modules", + "storageKey": null, + "args": null, + "concreteType": "HomePageArtistModule", + "plural": true, + "selections": [ + v0, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "fairs_module", + "storageKey": null, + "args": null, + "concreteType": "HomePageFairsModule", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "results", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": true, + "selections": [ + v3, + v5, + { + "kind": "LinkedField", + "alias": null, + "name": "profile", + "storageKey": null, + "args": null, + "concreteType": "Profile", + "plural": false, + "selections": v8, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "mobile_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + v0 + ], + "idField": "__id" + } + ] + } + ] + } + ] + } +}; +})(); +(node as any).hash = '74a905fbc1c502a7df7f92853faa44f8'; +export default node; diff --git a/src/__generated__/QueryRenderersGeneQuery.graphql.ts b/src/__generated__/QueryRenderersGeneQuery.graphql.ts new file mode 100644 index 0000000000..86df0eefc6 --- /dev/null +++ b/src/__generated__/QueryRenderersGeneQuery.graphql.ts @@ -0,0 +1,729 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersGeneQueryVariables = { + readonly geneID: string; + readonly medium?: string | null; + readonly price_range?: string | null; +}; +export type QueryRenderersGeneQueryResponse = { + readonly gene: ({ + }) | null; +}; + + + +/* +query QueryRenderersGeneQuery( + $geneID: String! + $medium: String + $price_range: String +) { + gene(id: $geneID) { + ...Gene_gene_2UkO81 + __id + } +} + +fragment Gene_gene_2UkO81 on Gene { + ...Header_gene + ...About_gene + filtered_artworks(size: 0, medium: $medium, price_range: $price_range, sort: "-partner_updated_at", aggregations: [MEDIUM, PRICE_RANGE, TOTAL], for_sale: true) { + total + aggregations { + slice + counts { + id + name + count + __id + } + } + ...GeneArtworksGrid_filtered_artworks_32r0OK + __id + } + __id +} + +fragment Header_gene on Gene { + _id + id + name + __id +} + +fragment About_gene on Gene { + ...Biography_gene + trending_artists { + ...RelatedArtists_artists + __id + } + __id +} + +fragment GeneArtworksGrid_filtered_artworks_32r0OK on FilterArtworks { + __id + artworks: artworks_connection(first: 10, after: "", sort: "-partner_updated_at") { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} + +fragment Biography_gene on Gene { + description + __id +} + +fragment RelatedArtists_artists on Artist { + __id + ...RelatedArtist_artist +} + +fragment RelatedArtist_artist on Artist { + href + name + counts { + for_sale_artworks + artworks + } + image { + url(version: "large") + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "geneID", + "type": "String!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "medium", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "price_range", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "geneID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v7 = { + "kind": "Literal", + "name": "sort", + "value": "-partner_updated_at", + "type": "String" +}, +v8 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v9 = [ + v4, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersGeneQuery", + "id": null, + "text": "query QueryRenderersGeneQuery(\n $geneID: String!\n $medium: String\n $price_range: String\n) {\n gene(id: $geneID) {\n ...Gene_gene_2UkO81\n __id\n }\n}\n\nfragment Gene_gene_2UkO81 on Gene {\n ...Header_gene\n ...About_gene\n filtered_artworks(size: 0, medium: $medium, price_range: $price_range, sort: \"-partner_updated_at\", aggregations: [MEDIUM, PRICE_RANGE, TOTAL], for_sale: true) {\n total\n aggregations {\n slice\n counts {\n id\n name\n count\n __id\n }\n }\n ...GeneArtworksGrid_filtered_artworks_32r0OK\n __id\n }\n __id\n}\n\nfragment Header_gene on Gene {\n _id\n id\n name\n __id\n}\n\nfragment About_gene on Gene {\n ...Biography_gene\n trending_artists {\n ...RelatedArtists_artists\n __id\n }\n __id\n}\n\nfragment GeneArtworksGrid_filtered_artworks_32r0OK on FilterArtworks {\n __id\n artworks: artworks_connection(first: 10, after: \"\", sort: \"-partner_updated_at\") {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n\nfragment Biography_gene on Gene {\n description\n __id\n}\n\nfragment RelatedArtists_artists on Artist {\n __id\n ...RelatedArtist_artist\n}\n\nfragment RelatedArtist_artist on Artist {\n href\n name\n counts {\n for_sale_artworks\n artworks\n }\n image {\n url(version: \"large\")\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersGeneQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": v1, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Gene_gene", + "args": [ + { + "kind": "Variable", + "name": "medium", + "variableName": "medium", + "type": null + }, + { + "kind": "Variable", + "name": "price_range", + "variableName": "price_range", + "type": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersGeneQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "gene", + "storageKey": null, + "args": v1, + "concreteType": "Gene", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v3, + v4, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "description", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "trending_artists", + "storageKey": null, + "args": null, + "concreteType": "Artist", + "plural": true, + "selections": [ + v2, + v5, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v6 + ] + } + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "filtered_artworks", + "storageKey": null, + "args": [ + { + "kind": "Literal", + "name": "aggregations", + "value": [ + "MEDIUM", + "PRICE_RANGE", + "TOTAL" + ], + "type": "[ArtworkAggregation]" + }, + { + "kind": "Literal", + "name": "for_sale", + "value": true, + "type": "Boolean" + }, + { + "kind": "Variable", + "name": "medium", + "variableName": "medium", + "type": "String" + }, + { + "kind": "Variable", + "name": "price_range", + "variableName": "price_range", + "type": "String" + }, + { + "kind": "Literal", + "name": "size", + "value": 0, + "type": "Int" + }, + v7 + ], + "concreteType": "FilterArtworks", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "aggregations", + "storageKey": null, + "args": null, + "concreteType": "ArtworksAggregationResults", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "slice", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "AggregationCount", + "plural": true, + "selections": [ + v3, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "count", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + v2, + { + "kind": "LinkedField", + "alias": "artworks", + "name": "artworks_connection", + "storageKey": "artworks_connection(after:\"\",first:10,sort:\"-partner_updated_at\")", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + v7 + ], + "concreteType": "ArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + v6 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v8 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v8 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v9, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v9, + "idField": "__id" + }, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "artworks", + "name": "artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + v7 + ], + "handle": "connection", + "key": "GeneArtworksGrid_artworks", + "filters": [ + "sort" + ] + } + ], + "idField": "__id" + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '737eab50164daed47fbc03498ad91fd5'; +export default node; diff --git a/src/__generated__/QueryRenderersInboxQuery.graphql.ts b/src/__generated__/QueryRenderersInboxQuery.graphql.ts new file mode 100644 index 0000000000..d9fa4f6548 --- /dev/null +++ b/src/__generated__/QueryRenderersInboxQuery.graphql.ts @@ -0,0 +1,673 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersInboxQueryVariables = { +}; +export type QueryRenderersInboxQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query QueryRenderersInboxQuery { + me { + ...Inbox_me + __id + } +} + +fragment Inbox_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + } + conversations_existence_check: conversations(first: 1) { + edges { + node { + id + __id + } + } + } + ...Conversations_me + ...ActiveBids_me + __id +} + +fragment Conversations_me on Me { + conversations(first: 10, after: "") { + pageInfo { + endCursor + hasNextPage + } + edges { + node { + id + last_message + ...ConversationSnippet_conversation + __id + __typename + } + cursor + } + } + __id +} + +fragment ActiveBids_me on Me { + lot_standings(live: true) { + most_recent_bid { + __id + } + ...ActiveBid_bid + } + __id +} + +fragment ActiveBid_bid on LotStanding { + is_leading_bidder + sale { + href + is_live_open + __id + } + most_recent_bid { + __id + max_bid { + display + } + sale_artwork { + artwork { + href + image { + url + } + artist_names + __id + } + counts { + bidder_positions + } + highest_bid { + display + id + } + lot_number + reserve_status + __id + } + } +} + +fragment ConversationSnippet_conversation on Conversation { + id + to { + name + } + last_message + last_message_at + unread + items { + item { + __typename + ... on Artwork { + date + title + artist_names + image { + url + } + } + ... on Show { + fair { + name + __id + } + name + cover_image { + url + } + } + ... on Node { + __id + } + } + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v3 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } +], +v4 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v3 +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersInboxQuery", + "id": null, + "text": "query QueryRenderersInboxQuery {\n me {\n ...Inbox_me\n __id\n }\n}\n\nfragment Inbox_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n }\n conversations_existence_check: conversations(first: 1) {\n edges {\n node {\n id\n __id\n }\n }\n }\n ...Conversations_me\n ...ActiveBids_me\n __id\n}\n\nfragment Conversations_me on Me {\n conversations(first: 10, after: \"\") {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n node {\n id\n last_message\n ...ConversationSnippet_conversation\n __id\n __typename\n }\n cursor\n }\n }\n __id\n}\n\nfragment ActiveBids_me on Me {\n lot_standings(live: true) {\n most_recent_bid {\n __id\n }\n ...ActiveBid_bid\n }\n __id\n}\n\nfragment ActiveBid_bid on LotStanding {\n is_leading_bidder\n sale {\n href\n is_live_open\n __id\n }\n most_recent_bid {\n __id\n max_bid {\n display\n }\n sale_artwork {\n artwork {\n href\n image {\n url\n }\n artist_names\n __id\n }\n counts {\n bidder_positions\n }\n highest_bid {\n display\n id\n }\n lot_number\n reserve_status\n __id\n }\n }\n}\n\nfragment ConversationSnippet_conversation on Conversation {\n id\n to {\n name\n }\n last_message\n last_message_at\n unread\n items {\n item {\n __typename\n ... on Artwork {\n date\n title\n artist_names\n image {\n url\n }\n }\n ... on Show {\n fair {\n name\n __id\n }\n name\n cover_image {\n url\n }\n }\n ... on Node {\n __id\n }\n }\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersInboxQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Inbox_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersInboxQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "lot_standings", + "storageKey": "lot_standings(live:true)", + "args": [ + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "LotStanding", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "most_recent_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPosition", + "plural": false, + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "max_bid", + "storageKey": null, + "args": null, + "concreteType": "BidderPositionMaxBid", + "plural": false, + "selections": [ + v1 + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + v2, + v4, + v5, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "highest_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkHighestBid", + "plural": false, + "selections": [ + v1, + v6 + ], + "idField": "id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lot_number", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "reserve_status", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_leading_bidder", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedField", + "alias": "conversations_existence_check", + "name": "conversations", + "storageKey": "conversations(first:1)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 1, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v6, + v0 + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "conversations", + "storageKey": "conversations(after:\"\",first:10)", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "ConversationConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "ConversationEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + v6, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "to", + "storageKey": null, + "args": null, + "concreteType": "ConversationResponder", + "plural": false, + "selections": [ + v7 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "last_message_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "unread", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "items", + "storageKey": null, + "args": null, + "concreteType": "ConversationItem", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "item", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v8, + v0, + { + "kind": "InlineFragment", + "type": "Show", + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v7, + v0 + ], + "idField": "__id" + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": v3 + } + ] + }, + { + "kind": "InlineFragment", + "type": "Artwork", + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + v5, + v4 + ] + } + ], + "idField": "__id" + } + ] + }, + v0, + v8 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "conversations", + "args": [ + { + "kind": "Literal", + "name": "after", + "value": "", + "type": "String" + }, + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "Conversations_conversations", + "filters": null + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'ce5f976e5f8f2b9a1c45e7241a60c8a0'; +export default node; diff --git a/src/__generated__/QueryRenderersInquiryQuery.graphql.ts b/src/__generated__/QueryRenderersInquiryQuery.graphql.ts new file mode 100644 index 0000000000..c20b7903be --- /dev/null +++ b/src/__generated__/QueryRenderersInquiryQuery.graphql.ts @@ -0,0 +1,210 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersInquiryQueryVariables = { + readonly artworkID: string; +}; +export type QueryRenderersInquiryQueryResponse = { + readonly artwork: ({ + }) | null; +}; + + + +/* +query QueryRenderersInquiryQuery( + $artworkID: String! +) { + artwork(id: $artworkID) { + ...Inquiry_artwork + __id + } +} + +fragment Inquiry_artwork on Artwork { + _id + id + contact_message + partner { + name + __id + } + ...ArtworkPreview_artwork + __id +} + +fragment ArtworkPreview_artwork on Artwork { + id + _id + title + artist_names + date + image { + url + } + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "artworkID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "artworkID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersInquiryQuery", + "id": null, + "text": "query QueryRenderersInquiryQuery(\n $artworkID: String!\n) {\n artwork(id: $artworkID) {\n ...Inquiry_artwork\n __id\n }\n}\n\nfragment Inquiry_artwork on Artwork {\n _id\n id\n contact_message\n partner {\n name\n __id\n }\n ...ArtworkPreview_artwork\n __id\n}\n\nfragment ArtworkPreview_artwork on Artwork {\n id\n _id\n title\n artist_names\n date\n image {\n url\n }\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersInquiryQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": v1, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Inquiry_artwork", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersInquiryQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": v1, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "contact_message", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artist_names", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + v2 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '820a207464d113a1f04a3c89649aa9b8'; +export default node; diff --git a/src/__generated__/QueryRenderersMyProfileQuery.graphql.ts b/src/__generated__/QueryRenderersMyProfileQuery.graphql.ts new file mode 100644 index 0000000000..6aa1f2c539 --- /dev/null +++ b/src/__generated__/QueryRenderersMyProfileQuery.graphql.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersMyProfileQueryVariables = { +}; +export type QueryRenderersMyProfileQueryResponse = { + readonly me: ({ + }) | null; +}; + + + +/* +query QueryRenderersMyProfileQuery { + me { + ...MyProfile_me + __id + } +} + +fragment MyProfile_me on Me { + name + initials + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersMyProfileQuery", + "id": null, + "text": "query QueryRenderersMyProfileQuery {\n me {\n ...MyProfile_me\n __id\n }\n}\n\nfragment MyProfile_me on Me {\n name\n initials\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersMyProfileQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "MyProfile_me", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersMyProfileQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "initials", + "args": null, + "storageKey": null + }, + v0 + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '748438ac1bef6795f42e7ff471971cde'; +export default node; diff --git a/src/__generated__/QueryRenderersSaleQuery.graphql.ts b/src/__generated__/QueryRenderersSaleQuery.graphql.ts new file mode 100644 index 0000000000..f5be80a13b --- /dev/null +++ b/src/__generated__/QueryRenderersSaleQuery.graphql.ts @@ -0,0 +1,500 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersSaleQueryVariables = { + readonly saleID: string; +}; +export type QueryRenderersSaleQueryResponse = { + readonly sale: ({ + }) | null; +}; + + + +/* +query QueryRenderersSaleQuery( + $saleID: String! +) { + sale(id: $saleID) { + ...Sale_sale + __id + } +} + +fragment Sale_sale on Sale { + id + name + ...Header_sale + ...SaleArtworksGrid_sale + __id +} + +fragment Header_sale on Sale { + name + cover_image { + href + } + __id +} + +fragment SaleArtworksGrid_sale on Sale { + __id + saleArtworks: sale_artworks_connection(first: 10) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + artwork { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + __id + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "saleID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "saleID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v7 = [ + v4, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersSaleQuery", + "id": null, + "text": "query QueryRenderersSaleQuery(\n $saleID: String!\n) {\n sale(id: $saleID) {\n ...Sale_sale\n __id\n }\n}\n\nfragment Sale_sale on Sale {\n id\n name\n ...Header_sale\n ...SaleArtworksGrid_sale\n __id\n}\n\nfragment Header_sale on Sale {\n name\n cover_image {\n href\n }\n __id\n}\n\nfragment SaleArtworksGrid_sale on Sale {\n __id\n saleArtworks: sale_artworks_connection(first: 10) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n artwork {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n }\n __id\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersSaleQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Sale_sale", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersSaleQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v5 + ] + }, + v2, + { + "kind": "LinkedField", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "storageKey": "sale_artworks_connection(first:10)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "SaleArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v6 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v6 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v7, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v7, + "idField": "__id" + }, + v5 + ], + "idField": "__id" + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "SaleArtworksGrid_saleArtworks", + "filters": null + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '9d4eb1eed042b5703942b17992bacdac'; +export default node; diff --git a/src/__generated__/QueryRenderersWorksForYouQuery.graphql.ts b/src/__generated__/QueryRenderersWorksForYouQuery.graphql.ts new file mode 100644 index 0000000000..67520283fa --- /dev/null +++ b/src/__generated__/QueryRenderersWorksForYouQuery.graphql.ts @@ -0,0 +1,682 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type QueryRenderersWorksForYouQueryVariables = { + readonly selectedArtist: string; +}; +export type QueryRenderersWorksForYouQueryResponse = { + readonly viewer: ({ + }) | null; +}; + + + +/* +query QueryRenderersWorksForYouQuery( + $selectedArtist: String! +) { + viewer { + ...WorksForYou_viewer_2hRnfI + } +} + +fragment WorksForYou_viewer_2hRnfI on Viewer { + me { + followsAndSaves { + notifications: bundledArtworksByArtist(sort: PUBLISHED_AT_DESC, first: 10) { + pageInfo { + hasNextPage + endCursor + } + edges { + node { + __id + ...Notification_notification + __typename + } + cursor + } + } + } + __id + } + selectedArtist: artist(id: $selectedArtist) { + id + href + name + image { + resized(height: 80, width: 80) { + url + } + } + artworks(sort: published_at_desc, size: 6) { + ...GenericGrid_artworks + __id + } + __id + } +} + +fragment Notification_notification on FollowedArtistsArtworksGroup { + summary + artists + artworks { + artists(shallow: true) { + href + __id + } + ...GenericGrid_artworks + __id + } + image { + resized(height: 80, width: 80) { + url + } + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "selectedArtist", + "type": "String!", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null +}, +v3 = [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } +], +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null +}, +v9 = { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null +}, +v10 = { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null +}, +v11 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v12 = { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v11 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v11 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" +}, +v13 = [ + v5, + v1 +], +v14 = { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v13, + "idField": "__id" +}, +v15 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "resized", + "storageKey": "resized(height:80,width:80)", + "args": [ + { + "kind": "Literal", + "name": "height", + "value": 80, + "type": "Int" + }, + { + "kind": "Literal", + "name": "width", + "value": 80, + "type": "Int" + } + ], + "concreteType": "ResizedImageUrl", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ] +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "QueryRenderersWorksForYouQuery", + "id": null, + "text": "query QueryRenderersWorksForYouQuery(\n $selectedArtist: String!\n) {\n viewer {\n ...WorksForYou_viewer_2hRnfI\n }\n}\n\nfragment WorksForYou_viewer_2hRnfI on Viewer {\n me {\n followsAndSaves {\n notifications: bundledArtworksByArtist(sort: PUBLISHED_AT_DESC, first: 10) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n __id\n ...Notification_notification\n __typename\n }\n cursor\n }\n }\n }\n __id\n }\n selectedArtist: artist(id: $selectedArtist) {\n id\n href\n name\n image {\n resized(height: 80, width: 80) {\n url\n }\n }\n artworks(sort: published_at_desc, size: 6) {\n ...GenericGrid_artworks\n __id\n }\n __id\n }\n}\n\nfragment Notification_notification on FollowedArtistsArtworksGroup {\n summary\n artists\n artworks {\n artists(shallow: true) {\n href\n __id\n }\n ...GenericGrid_artworks\n __id\n }\n image {\n resized(height: 80, width: 80) {\n url\n }\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "QueryRenderersWorksForYouQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": "viewer", + "name": "__viewer_viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "WorksForYou_viewer", + "args": [ + { + "kind": "Variable", + "name": "selectedArtist", + "variableName": "selectedArtist", + "type": null + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "QueryRenderersWorksForYouQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followsAndSaves", + "storageKey": null, + "args": null, + "concreteType": "FollowsAndSaves", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": "notifications", + "name": "bundledArtworksByArtist", + "storageKey": "bundledArtworksByArtist(first:10,sort:\"PUBLISHED_AT_DESC\")", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "PUBLISHED_AT_DESC", + "type": "ArtworkSorts" + } + ], + "concreteType": "FollowedArtistsArtworksGroupConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroupEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroup", + "plural": false, + "selections": [ + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "summary", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artists", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": v3, + "concreteType": "Artist", + "plural": true, + "selections": [ + v4, + v1, + v5 + ], + "idField": "__id" + }, + v6, + v7, + v8, + v1, + v9, + v10, + v12, + v14, + v4 + ], + "idField": "__id" + }, + v15, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "notifications", + "name": "bundledArtworksByArtist", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "PUBLISHED_AT_DESC", + "type": "ArtworkSorts" + } + ], + "handle": "connection", + "key": "WorksForYou_notifications", + "filters": [ + "sort" + ] + } + ] + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "selectedArtist", + "name": "artist", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "id", + "variableName": "selectedArtist", + "type": "String!" + } + ], + "concreteType": "Artist", + "plural": false, + "selections": [ + v6, + v4, + v5, + v15, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": "artworks(size:6,sort:\"published_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 6, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "published_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "Artwork", + "plural": true, + "selections": [ + v9, + v1, + v7, + v8, + v2, + v6, + v10, + v12, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": v3, + "concreteType": "Artist", + "plural": true, + "selections": v13, + "idField": "__id" + }, + v14, + v4 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "viewer", + "args": null, + "handle": "viewer", + "key": "", + "filters": null + } + ] + } +}; +})(); +(node as any).hash = '3214ba446deec53110f75845dcede778'; +export default node; diff --git a/src/__generated__/RelatedArtist_artist.graphql.ts b/src/__generated__/RelatedArtist_artist.graphql.ts new file mode 100644 index 0000000000..8f0c042236 --- /dev/null +++ b/src/__generated__/RelatedArtist_artist.graphql.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type RelatedArtist_artist = { + readonly href: string | null; + readonly name: string | null; + readonly counts: ({ + readonly for_sale_artworks: any | null; + readonly artworks: any | null; + }) | null; + readonly image: ({ + readonly url: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "RelatedArtist_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "counts", + "storageKey": null, + "args": null, + "concreteType": "ArtistCounts", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "for_sale_artworks", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artworks", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'a4682903b6829420f1e04aa9d112c254'; +export default node; diff --git a/src/__generated__/RelatedArtists_artists.graphql.ts b/src/__generated__/RelatedArtists_artists.graphql.ts new file mode 100644 index 0000000000..69d393a8f3 --- /dev/null +++ b/src/__generated__/RelatedArtists_artists.graphql.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type RelatedArtists_artists = ReadonlyArray<{ + readonly __id: string; + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "RelatedArtists_artists", + "type": "Artist", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "RelatedArtist_artist", + "args": null + } + ], + "idField": "__id" +}; +(node as any).hash = '8cdbd55b2f71bfb9d3007b47be09e3ce'; +export default node; diff --git a/src/__generated__/SaleArtworksGridQuery.graphql.ts b/src/__generated__/SaleArtworksGridQuery.graphql.ts new file mode 100644 index 0000000000..3d77a19bf6 --- /dev/null +++ b/src/__generated__/SaleArtworksGridQuery.graphql.ts @@ -0,0 +1,525 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SaleArtworksGridQueryVariables = { + readonly __id: string; + readonly count: number; + readonly cursor?: string | null; +}; +export type SaleArtworksGridQueryResponse = { + readonly node: ({ + }) | null; +}; + + + +/* +query SaleArtworksGridQuery( + $__id: ID! + $count: Int! + $cursor: String +) { + node(__id: $__id) { + __typename + ... on Sale { + ...SaleArtworksGrid_sale_1G22uz + } + __id + } +} + +fragment SaleArtworksGrid_sale_1G22uz on Sale { + __id + saleArtworks: sale_artworks_connection(first: $count, after: $cursor) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + artwork { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + __id + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "__id", + "type": "ID!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "__id", + "variableName": "__id", + "type": "ID!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null +}, +v4 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v5 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "SaleArtworksGridQuery", + "id": null, + "text": "query SaleArtworksGridQuery(\n $__id: ID!\n $count: Int!\n $cursor: String\n) {\n node(__id: $__id) {\n __typename\n ... on Sale {\n ...SaleArtworksGrid_sale_1G22uz\n }\n __id\n }\n}\n\nfragment SaleArtworksGrid_sale_1G22uz on Sale {\n __id\n saleArtworks: sale_artworks_connection(first: $count, after: $cursor) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n artwork {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n }\n __id\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SaleArtworksGridQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v2, + { + "kind": "InlineFragment", + "type": "Sale", + "selections": [ + { + "kind": "FragmentSpread", + "name": "SaleArtworksGrid_sale", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + } + ] + } + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SaleArtworksGridQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": v1, + "concreteType": null, + "plural": false, + "selections": [ + v3, + v2, + { + "kind": "InlineFragment", + "type": "Sale", + "selections": [ + { + "kind": "LinkedField", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "concreteType": "SaleArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v4 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v4 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v5, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v5, + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + v2, + v3 + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + } + ], + "handle": "connection", + "key": "SaleArtworksGrid_saleArtworks", + "filters": null + } + ] + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '8382a7d89f9501ca7da6013e02e3ebdd'; +export default node; diff --git a/src/__generated__/SaleArtworksGrid_sale.graphql.ts b/src/__generated__/SaleArtworksGrid_sale.graphql.ts new file mode 100644 index 0000000000..69699a2418 --- /dev/null +++ b/src/__generated__/SaleArtworksGrid_sale.graphql.ts @@ -0,0 +1,197 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type SaleArtworksGrid_sale = { + readonly __id: string; + readonly saleArtworks: ({ + readonly pageInfo: { + readonly hasNextPage: boolean; + readonly startCursor: string | null; + readonly endCursor: string | null; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly artwork: ({ + readonly id: string; + readonly __id: string; + readonly image: ({ + readonly aspect_ratio: number | null; + }) | null; + }) | null; + }) | null; + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "SaleArtworksGrid_sale", + "type": "Sale", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "saleArtworks" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } + ], + "selections": [ + v0, + { + "kind": "LinkedField", + "alias": "saleArtworks", + "name": "__SaleArtworksGrid_saleArtworks_connection", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Artwork_artwork", + "args": null + } + ], + "idField": "__id" + }, + v0, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '173f04eab71fced664dcf4a84bf3f3c5'; +export default node; diff --git a/src/__generated__/SaleListItem_sale.graphql.ts b/src/__generated__/SaleListItem_sale.graphql.ts new file mode 100644 index 0000000000..992171d0cf --- /dev/null +++ b/src/__generated__/SaleListItem_sale.graphql.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type SaleListItem_sale = { + readonly id: string; + readonly name: string | null; + readonly href: string | null; + readonly is_open: boolean | null; + readonly is_live_open: boolean | null; + readonly live_url_if_open: string | null; + readonly start_at: string | null; + readonly end_at: string | null; + readonly registration_ends_at: string | null; + readonly live_start_at: string | null; + readonly display_timely_at: string | null; + readonly cover_image: ({ + readonly url: string | null; + readonly aspect_ratio: number | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "SaleListItem_sale", + "type": "Sale", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "start_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_url_if_open", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "end_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "registration_ends_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_start_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "display_timely_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'fd579669d2b83e54c046f261f2b51833'; +export default node; diff --git a/src/__generated__/SaleQuery.graphql.ts b/src/__generated__/SaleQuery.graphql.ts new file mode 100644 index 0000000000..93b13dfe17 --- /dev/null +++ b/src/__generated__/SaleQuery.graphql.ts @@ -0,0 +1,500 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SaleQueryVariables = { + readonly saleID: string; +}; +export type SaleQueryResponse = { + readonly sale: ({ + }) | null; +}; + + + +/* +query SaleQuery( + $saleID: String! +) { + sale(id: $saleID) { + ...Sale_sale + __id + } +} + +fragment Sale_sale on Sale { + id + name + ...Header_sale + ...SaleArtworksGrid_sale + __id +} + +fragment Header_sale on Sale { + name + cover_image { + href + } + __id +} + +fragment SaleArtworksGrid_sale on Sale { + __id + saleArtworks: sale_artworks_connection(first: 10) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + artwork { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + __id + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "saleID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "saleID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v7 = [ + v4, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "SaleQuery", + "id": null, + "text": "query SaleQuery(\n $saleID: String!\n) {\n sale(id: $saleID) {\n ...Sale_sale\n __id\n }\n}\n\nfragment Sale_sale on Sale {\n id\n name\n ...Header_sale\n ...SaleArtworksGrid_sale\n __id\n}\n\nfragment Header_sale on Sale {\n name\n cover_image {\n href\n }\n __id\n}\n\nfragment SaleArtworksGrid_sale on Sale {\n __id\n saleArtworks: sale_artworks_connection(first: 10) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n artwork {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n }\n __id\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SaleQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Sale_sale", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SaleQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v5 + ] + }, + v2, + { + "kind": "LinkedField", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "storageKey": "sale_artworks_connection(first:10)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "SaleArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v6 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v6 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v7, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v7, + "idField": "__id" + }, + v5 + ], + "idField": "__id" + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "SaleArtworksGrid_saleArtworks", + "filters": null + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = '85940dd1e3b7255f7c1d2f03a233dfcb'; +export default node; diff --git a/src/__generated__/SaleRefetchQuery.graphql.ts b/src/__generated__/SaleRefetchQuery.graphql.ts new file mode 100644 index 0000000000..3caf426bd9 --- /dev/null +++ b/src/__generated__/SaleRefetchQuery.graphql.ts @@ -0,0 +1,500 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SaleRefetchQueryVariables = { + readonly saleID: string; +}; +export type SaleRefetchQueryResponse = { + readonly sale: ({ + }) | null; +}; + + + +/* +query SaleRefetchQuery( + $saleID: String! +) { + sale(id: $saleID) { + ...Sale_sale + __id + } +} + +fragment Sale_sale on Sale { + id + name + ...Header_sale + ...SaleArtworksGrid_sale + __id +} + +fragment Header_sale on Sale { + name + cover_image { + href + } + __id +} + +fragment SaleArtworksGrid_sale on Sale { + __id + saleArtworks: sale_artworks_connection(first: 10) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + node { + artwork { + id + __id + image { + aspect_ratio + } + ...Artwork_artwork + } + __id + __typename + } + cursor + } + } +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "saleID", + "type": "String!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "id", + "variableName": "saleID", + "type": "String!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v6 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v7 = [ + v4, + v2 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "SaleRefetchQuery", + "id": null, + "text": "query SaleRefetchQuery(\n $saleID: String!\n) {\n sale(id: $saleID) {\n ...Sale_sale\n __id\n }\n}\n\nfragment Sale_sale on Sale {\n id\n name\n ...Header_sale\n ...SaleArtworksGrid_sale\n __id\n}\n\nfragment Header_sale on Sale {\n name\n cover_image {\n href\n }\n __id\n}\n\nfragment SaleArtworksGrid_sale on Sale {\n __id\n saleArtworks: sale_artworks_connection(first: 10) {\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n edges {\n node {\n artwork {\n id\n __id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n }\n __id\n __typename\n }\n cursor\n }\n }\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SaleRefetchQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Sale_sale", + "args": null + }, + v2 + ], + "idField": "__id" + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SaleRefetchQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": v1, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + v4, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v5 + ] + }, + v2, + { + "kind": "LinkedField", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "storageKey": "sale_artworks_connection(first:10)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "concreteType": "SaleArtworkConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "startCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v3, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v6 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v6 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v2 + ], + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v7, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v7, + "idField": "__id" + }, + v5 + ], + "idField": "__id" + }, + v2, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "saleArtworks", + "name": "sale_artworks_connection", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + } + ], + "handle": "connection", + "key": "SaleArtworksGrid_saleArtworks", + "filters": null + } + ], + "idField": "__id" + } + ] + } +}; +})(); +(node as any).hash = 'b24bfbdf09d04bfa25e91376d57f5b68'; +export default node; diff --git a/src/__generated__/Sale_sale.graphql.ts b/src/__generated__/Sale_sale.graphql.ts new file mode 100644 index 0000000000..dbc5c6a2b8 --- /dev/null +++ b/src/__generated__/Sale_sale.graphql.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Sale_sale = { + readonly id: string; + readonly name: string | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Sale_sale", + "type": "Sale", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "Header_sale", + "args": null + }, + { + "kind": "FragmentSpread", + "name": "SaleArtworksGrid_sale", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '30b1c1de8097c9e195c5a941c08fe00f'; +export default node; diff --git a/src/__generated__/SalesQuery.graphql.ts b/src/__generated__/SalesQuery.graphql.ts new file mode 100644 index 0000000000..2f497d773e --- /dev/null +++ b/src/__generated__/SalesQuery.graphql.ts @@ -0,0 +1,618 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SalesQueryVariables = { +}; +export type SalesQueryResponse = { + readonly viewer: ({ + }) | null; +}; + + + +/* +query SalesQuery { + viewer { + ...Sales_viewer + } +} + +fragment Sales_viewer on Viewer { + sales(live: true, is_auction: true, size: 100, sort: TIMELY_AT_NAME_ASC) { + ...SaleListItem_sale + href + live_start_at + __id + } + ...LotsByFollowedArtists_viewer +} + +fragment SaleListItem_sale on Sale { + id + name + href + is_open + is_live_open + live_url_if_open + start_at + end_at + registration_ends_at + live_start_at + display_timely_at + cover_image { + url(version: "large") + aspect_ratio + } + __id +} + +fragment LotsByFollowedArtists_viewer on Viewer { + sale_artworks: sale_artworks(first: 10, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) { + pageInfo { + endCursor + hasNextPage + } + edges { + cursor + node { + artwork { + ...GenericGrid_artworks + __id + } + __id + __typename + } + } + } +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v8 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v9 = [ + v4, + v7 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "SalesQuery", + "id": null, + "text": "query SalesQuery {\n viewer {\n ...Sales_viewer\n }\n}\n\nfragment Sales_viewer on Viewer {\n sales(live: true, is_auction: true, size: 100, sort: TIMELY_AT_NAME_ASC) {\n ...SaleListItem_sale\n href\n live_start_at\n __id\n }\n ...LotsByFollowedArtists_viewer\n}\n\nfragment SaleListItem_sale on Sale {\n id\n name\n href\n is_open\n is_live_open\n live_url_if_open\n start_at\n end_at\n registration_ends_at\n live_start_at\n display_timely_at\n cover_image {\n url(version: \"large\")\n aspect_ratio\n }\n __id\n}\n\nfragment LotsByFollowedArtists_viewer on Viewer {\n sale_artworks: sale_artworks(first: 10, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n artwork {\n ...GenericGrid_artworks\n __id\n }\n __id\n __typename\n }\n }\n }\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SalesQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": "viewer", + "name": "__viewer_viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Sales_viewer", + "args": null + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SalesQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sales", + "storageKey": "sales(is_auction:true,live:true,size:100,sort:\"TIMELY_AT_NAME_ASC\")", + "args": [ + v0, + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "size", + "value": 100, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "TIMELY_AT_NAME_ASC", + "type": "SaleSorts" + } + ], + "concreteType": "Sale", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "start_at", + "args": null, + "storageKey": null + }, + v1, + v2, + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_url_if_open", + "args": null, + "storageKey": null + }, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "end_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "registration_ends_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_start_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "display_timely_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v5, + v6 + ] + }, + v7 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "sale_artworks", + "name": "sale_artworks", + "storageKey": "sale_artworks(first:10,include_artworks_by_followed_artists:true,is_auction:true,live_sale:true)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + v0, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "SaleArtworksConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworksEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v6, + v5 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v8 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v8 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + v7 + ], + "idField": "__id" + }, + v7 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v9, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v9, + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "sale_artworks", + "name": "sale_artworks", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + v0, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "handle": "connection", + "key": "LotsByFollowedArtists_sale_artworks", + "filters": [ + "live_sale", + "is_auction", + "include_artworks_by_followed_artists" + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "viewer", + "args": null, + "handle": "viewer", + "key": "", + "filters": null + } + ] + } +}; +})(); +(node as any).hash = '9395045e8ee2d96df4d7ea5907766374'; +export default node; diff --git a/src/__generated__/SalesRendererQuery.graphql.ts b/src/__generated__/SalesRendererQuery.graphql.ts new file mode 100644 index 0000000000..ef432046f1 --- /dev/null +++ b/src/__generated__/SalesRendererQuery.graphql.ts @@ -0,0 +1,618 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SalesRendererQueryVariables = { +}; +export type SalesRendererQueryResponse = { + readonly viewer: ({ + }) | null; +}; + + + +/* +query SalesRendererQuery { + viewer { + ...Sales_viewer + } +} + +fragment Sales_viewer on Viewer { + sales(live: true, is_auction: true, size: 100, sort: TIMELY_AT_NAME_ASC) { + ...SaleListItem_sale + href + live_start_at + __id + } + ...LotsByFollowedArtists_viewer +} + +fragment SaleListItem_sale on Sale { + id + name + href + is_open + is_live_open + live_url_if_open + start_at + end_at + registration_ends_at + live_start_at + display_timely_at + cover_image { + url(version: "large") + aspect_ratio + } + __id +} + +fragment LotsByFollowedArtists_viewer on Viewer { + sale_artworks: sale_artworks(first: 10, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) { + pageInfo { + endCursor + hasNextPage + } + edges { + cursor + node { + artwork { + ...GenericGrid_artworks + __id + } + __id + __typename + } + } + } +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v8 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v9 = [ + v4, + v7 +]; +return { + "kind": "Request", + "operationKind": "query", + "name": "SalesRendererQuery", + "id": null, + "text": "query SalesRendererQuery {\n viewer {\n ...Sales_viewer\n }\n}\n\nfragment Sales_viewer on Viewer {\n sales(live: true, is_auction: true, size: 100, sort: TIMELY_AT_NAME_ASC) {\n ...SaleListItem_sale\n href\n live_start_at\n __id\n }\n ...LotsByFollowedArtists_viewer\n}\n\nfragment SaleListItem_sale on Sale {\n id\n name\n href\n is_open\n is_live_open\n live_url_if_open\n start_at\n end_at\n registration_ends_at\n live_start_at\n display_timely_at\n cover_image {\n url(version: \"large\")\n aspect_ratio\n }\n __id\n}\n\nfragment LotsByFollowedArtists_viewer on Viewer {\n sale_artworks: sale_artworks(first: 10, live_sale: true, is_auction: true, include_artworks_by_followed_artists: true) {\n pageInfo {\n endCursor\n hasNextPage\n }\n edges {\n cursor\n node {\n artwork {\n ...GenericGrid_artworks\n __id\n }\n __id\n __typename\n }\n }\n }\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SalesRendererQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": "viewer", + "name": "__viewer_viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "Sales_viewer", + "args": null + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SalesRendererQuery", + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sales", + "storageKey": "sales(is_auction:true,live:true,size:100,sort:\"TIMELY_AT_NAME_ASC\")", + "args": [ + v0, + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "size", + "value": 100, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "TIMELY_AT_NAME_ASC", + "type": "SaleSorts" + } + ], + "concreteType": "Sale", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "start_at", + "args": null, + "storageKey": null + }, + v1, + v2, + v3, + { + "kind": "ScalarField", + "alias": null, + "name": "is_live_open", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_url_if_open", + "args": null, + "storageKey": null + }, + v4, + { + "kind": "ScalarField", + "alias": null, + "name": "end_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "registration_ends_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_start_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "display_timely_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v5, + v6 + ] + }, + v7 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "sale_artworks", + "name": "sale_artworks", + "storageKey": "sale_artworks(first:10,include_artworks_by_followed_artists:true,is_auction:true,live_sale:true)", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + v0, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "SaleArtworksConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworksEdge", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "artwork", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null + }, + v7, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + v6, + v5 + ] + }, + { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null + }, + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v8 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v8 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + v3, + v7 + ], + "idField": "__id" + }, + v7 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } + ], + "concreteType": "Artist", + "plural": true, + "selections": v9, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v9, + "idField": "__id" + }, + v2 + ], + "idField": "__id" + }, + v7, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "sale_artworks", + "name": "sale_artworks", + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10, + "type": "Int" + }, + { + "kind": "Literal", + "name": "include_artworks_by_followed_artists", + "value": true, + "type": "Boolean" + }, + v0, + { + "kind": "Literal", + "name": "live_sale", + "value": true, + "type": "Boolean" + } + ], + "handle": "connection", + "key": "LotsByFollowedArtists_sale_artworks", + "filters": [ + "live_sale", + "is_auction", + "include_artworks_by_followed_artists" + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "viewer", + "args": null, + "handle": "viewer", + "key": "", + "filters": null + } + ] + } +}; +})(); +(node as any).hash = '96db6414736bd4634b88cf6c32e5121f'; +export default node; diff --git a/src/__generated__/Sales_viewer.graphql.ts b/src/__generated__/Sales_viewer.graphql.ts new file mode 100644 index 0000000000..fa7b3351a7 --- /dev/null +++ b/src/__generated__/Sales_viewer.graphql.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Sales_viewer = { + readonly sales: ReadonlyArray<({ + readonly href: string | null; + readonly live_start_at: string | null; + }) | null> | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Sales_viewer", + "type": "Viewer", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sales", + "storageKey": "sales(is_auction:true,live:true,size:100,sort:\"TIMELY_AT_NAME_ASC\")", + "args": [ + { + "kind": "Literal", + "name": "is_auction", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "live", + "value": true, + "type": "Boolean" + }, + { + "kind": "Literal", + "name": "size", + "value": 100, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "TIMELY_AT_NAME_ASC", + "type": "SaleSorts" + } + ], + "concreteType": "Sale", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "SaleListItem_sale", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "live_start_at", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "FragmentSpread", + "name": "LotsByFollowedArtists_viewer", + "args": null + } + ] +}; +(node as any).hash = '25e30e3a3dcbcda3c87d9765bdde71a5'; +export default node; diff --git a/src/__generated__/SendConversationMessageMutation.graphql.ts b/src/__generated__/SendConversationMessageMutation.graphql.ts new file mode 100644 index 0000000000..278667fa71 --- /dev/null +++ b/src/__generated__/SendConversationMessageMutation.graphql.ts @@ -0,0 +1,356 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type SendConversationMessageMutationVariables = { + readonly input: { + readonly id?: string; + readonly from?: string; + readonly body_text?: string; + readonly reply_to_message_id?: string; + readonly clientMutationId: string | null; + }; +}; +export type SendConversationMessageMutationResponse = { + readonly sendConversationMessage: ({ + readonly messageEdge: ({ + readonly node: ({ + readonly impulse_id: string; + readonly is_from_user: boolean | null; + readonly body: string | null; + readonly __id: string; + }) | null; + }) | null; + }) | null; +}; + + + +/* +mutation SendConversationMessageMutation( + $input: SendConversationMessageMutationInput! +) { + sendConversationMessage(input: $input) { + messageEdge { + node { + impulse_id + is_from_user + body + __id + ...Message_message + } + } + } +} + +fragment Message_message on Message { + body + created_at + is_from_user + from { + name + email + } + invoice { + payment_url + ...InvoicePreview_invoice + __id + } + attachments { + id + content_type + download_url + file_name + ...ImagePreview_attachment + ...PDFPreview_attachment + } + __id +} + +fragment InvoicePreview_invoice on Invoice { + payment_url + state + total + lewitt_invoice_id + __id +} + +fragment ImagePreview_attachment on Attachment { + download_url + ...AttachmentPreview_attachment +} + +fragment PDFPreview_attachment on Attachment { + file_name + ...AttachmentPreview_attachment +} + +fragment AttachmentPreview_attachment on Attachment { + id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "input", + "type": "SendConversationMessageMutationInput!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "Variable", + "name": "input", + "variableName": "input", + "type": "SendConversationMessageMutationInput!" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "impulse_id", + "args": null, + "storageKey": null +}, +v3 = { + "kind": "ScalarField", + "alias": null, + "name": "is_from_user", + "args": null, + "storageKey": null +}, +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "body", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "operationKind": "mutation", + "name": "SendConversationMessageMutation", + "id": null, + "text": "mutation SendConversationMessageMutation(\n $input: SendConversationMessageMutationInput!\n) {\n sendConversationMessage(input: $input) {\n messageEdge {\n node {\n impulse_id\n is_from_user\n body\n __id\n ...Message_message\n }\n }\n }\n}\n\nfragment Message_message on Message {\n body\n created_at\n is_from_user\n from {\n name\n email\n }\n invoice {\n payment_url\n ...InvoicePreview_invoice\n __id\n }\n attachments {\n id\n content_type\n download_url\n file_name\n ...ImagePreview_attachment\n ...PDFPreview_attachment\n }\n __id\n}\n\nfragment InvoicePreview_invoice on Invoice {\n payment_url\n state\n total\n lewitt_invoice_id\n __id\n}\n\nfragment ImagePreview_attachment on Attachment {\n download_url\n ...AttachmentPreview_attachment\n}\n\nfragment PDFPreview_attachment on Attachment {\n file_name\n ...AttachmentPreview_attachment\n}\n\nfragment AttachmentPreview_attachment on Attachment {\n id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "SendConversationMessageMutation", + "type": "Mutation", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sendConversationMessage", + "storageKey": null, + "args": v1, + "concreteType": "SendConversationMessageMutationPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "messageEdge", + "storageKey": null, + "args": null, + "concreteType": "MessageEdge", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Message", + "plural": false, + "selections": [ + v2, + v3, + v4, + v5, + { + "kind": "FragmentSpread", + "name": "Message_message", + "args": null + } + ], + "idField": "__id" + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "SendConversationMessageMutation", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "sendConversationMessage", + "storageKey": null, + "args": v1, + "concreteType": "SendConversationMessageMutationPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "messageEdge", + "storageKey": null, + "args": null, + "concreteType": "MessageEdge", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "Message", + "plural": false, + "selections": [ + v2, + v3, + v4, + v5, + { + "kind": "ScalarField", + "alias": null, + "name": "created_at", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "from", + "storageKey": null, + "args": null, + "concreteType": "MessageInitiator", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "email", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "invoice", + "storageKey": null, + "args": null, + "concreteType": "Invoice", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "payment_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "state", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "total", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "lewitt_invoice_id", + "args": null, + "storageKey": null + }, + v5 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "attachments", + "storageKey": null, + "args": null, + "concreteType": "Attachment", + "plural": true, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "content_type", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "download_url", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "file_name", + "args": null, + "storageKey": null + } + ] + } + ], + "idField": "__id" + } + ] + } + ] + } + ] + } +}; +})(); +(node as any).hash = '6e5ff1e232848ad66c3ad72e22ee1054'; +export default node; diff --git a/src/__generated__/ShowPreview_show.graphql.ts b/src/__generated__/ShowPreview_show.graphql.ts new file mode 100644 index 0000000000..34846acfb7 --- /dev/null +++ b/src/__generated__/ShowPreview_show.graphql.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type ShowPreview_show = { + readonly id: string; + readonly _id: string; + readonly name: string | null; + readonly cover_image: ({ + readonly url: string | null; + }) | null; + readonly fair: ({ + readonly name: string | null; + }) | null; + readonly partner: ({ + readonly name?: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "ShowPreview_show", + "type": "Show", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "_id", + "args": null, + "storageKey": null + }, + v0, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "fair", + "storageKey": null, + "args": null, + "concreteType": "Fair", + "plural": false, + "selections": [ + v0, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": null, + "plural": false, + "selections": [ + v1, + { + "kind": "InlineFragment", + "type": "Partner", + "selections": [ + v0 + ] + } + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" +}; +})(); +(node as any).hash = 'e42f90e100b31f3feebfdb128960badd'; +export default node; diff --git a/src/__generated__/Show_show.graphql.ts b/src/__generated__/Show_show.graphql.ts new file mode 100644 index 0000000000..9b858ddcf3 --- /dev/null +++ b/src/__generated__/Show_show.graphql.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Show_show = { + readonly href: string | null; + readonly cover_image: ({ + readonly url: string | null; + }) | null; +}; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "Show_show", + "type": "PartnerShow", + "metadata": null, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "cover_image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] + }, + { + "kind": "FragmentSpread", + "name": "Metadata_show", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'd981d802fad8863bc7fb561582c3e241'; +export default node; diff --git a/src/__generated__/Shows_artist.graphql.ts b/src/__generated__/Shows_artist.graphql.ts new file mode 100644 index 0000000000..e2b4f3ccb7 --- /dev/null +++ b/src/__generated__/Shows_artist.graphql.ts @@ -0,0 +1,145 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type Shows_artist = { + readonly current_shows: ReadonlyArray<({ + }) | null> | null; + readonly upcoming_shows: ReadonlyArray<({ + }) | null> | null; + readonly past_small_shows?: ReadonlyArray<({ + }) | null> | null; + readonly past_large_shows?: ReadonlyArray<({ + }) | null> | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v1 = [ + { + "kind": "FragmentSpread", + "name": "VariableSizeShowsList_shows", + "args": null + }, + v0 +], +v2 = [ + { + "kind": "Literal", + "name": "size", + "value": 20, + "type": "Int" + }, + { + "kind": "Literal", + "name": "status", + "value": "closed", + "type": "String" + } +]; +return { + "kind": "Fragment", + "name": "Shows_artist", + "type": "Artist", + "metadata": null, + "argumentDefinitions": [ + { + "kind": "RootArgument", + "name": "isPad", + "type": "Boolean" + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": "current_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"running\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "running", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v1, + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "upcoming_shows", + "name": "partner_shows", + "storageKey": "partner_shows(status:\"upcoming\")", + "args": [ + { + "kind": "Literal", + "name": "status", + "value": "upcoming", + "type": "String" + } + ], + "concreteType": "PartnerShow", + "plural": true, + "selections": v1, + "idField": "__id" + }, + v0, + { + "kind": "Condition", + "passingValue": true, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_large_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v2, + "concreteType": "PartnerShow", + "plural": true, + "selections": v1, + "idField": "__id" + } + ] + }, + { + "kind": "Condition", + "passingValue": false, + "condition": "isPad", + "selections": [ + { + "kind": "LinkedField", + "alias": "past_small_shows", + "name": "partner_shows", + "storageKey": "partner_shows(size:20,status:\"closed\")", + "args": v2, + "concreteType": "PartnerShow", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "SmallList_shows", + "args": null + }, + v0 + ], + "idField": "__id" + } + ] + } + ], + "idField": "__id" +}; +})(); +(node as any).hash = '588c371cc29143140554481da8e4570a'; +export default node; diff --git a/src/__generated__/SmallList_shows.graphql.ts b/src/__generated__/SmallList_shows.graphql.ts new file mode 100644 index 0000000000..c916a8855f --- /dev/null +++ b/src/__generated__/SmallList_shows.graphql.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type SmallList_shows = ReadonlyArray<{ + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "SmallList_shows", + "type": "PartnerShow", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "FragmentSpread", + "name": "Show_show", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" +}; +(node as any).hash = '7fc693edca8ffe74cb41102a5bc9cb22'; +export default node; diff --git a/src/__generated__/UpdateConversationMutation.graphql.ts b/src/__generated__/UpdateConversationMutation.graphql.ts new file mode 100644 index 0000000000..54af2f8f63 --- /dev/null +++ b/src/__generated__/UpdateConversationMutation.graphql.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type UpdateConversationMutationVariables = { + readonly input: { + readonly conversationId?: string; + readonly fromLastViewedMessageId?: string; + readonly clientMutationId: string | null; + }; +}; +export type UpdateConversationMutationResponse = { + readonly updateConversation: ({ + readonly conversation: ({ + readonly id: string | null; + readonly from_last_viewed_message_id: string | null; + }) | null; + }) | null; +}; + + + +/* +mutation UpdateConversationMutation( + $input: UpdateConversationMutationInput! +) { + updateConversation(input: $input) { + conversation { + id + from_last_viewed_message_id + __id + } + } +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "input", + "type": "UpdateConversationMutationInput!", + "defaultValue": null + } +], +v1 = [ + { + "kind": "LinkedField", + "alias": null, + "name": "updateConversation", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input", + "type": "UpdateConversationMutationInput!" + } + ], + "concreteType": "UpdateConversationMutationPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "conversation", + "storageKey": null, + "args": null, + "concreteType": "Conversation", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "from_last_viewed_message_id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + } + ] + } +]; +return { + "kind": "Request", + "operationKind": "mutation", + "name": "UpdateConversationMutation", + "id": null, + "text": "mutation UpdateConversationMutation(\n $input: UpdateConversationMutationInput!\n) {\n updateConversation(input: $input) {\n conversation {\n id\n from_last_viewed_message_id\n __id\n }\n }\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "UpdateConversationMutation", + "type": "Mutation", + "metadata": null, + "argumentDefinitions": v0, + "selections": v1 + }, + "operation": { + "kind": "Operation", + "name": "UpdateConversationMutation", + "argumentDefinitions": v0, + "selections": v1 + } +}; +})(); +(node as any).hash = '630d49bc88d58a296ed3b55fc479d569'; +export default node; diff --git a/src/__generated__/VariableSizeShowsList_shows.graphql.ts b/src/__generated__/VariableSizeShowsList_shows.graphql.ts new file mode 100644 index 0000000000..54621a59a2 --- /dev/null +++ b/src/__generated__/VariableSizeShowsList_shows.graphql.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type VariableSizeShowsList_shows = ReadonlyArray<{ + readonly __id: string; + }>; + + + +const node: ConcreteFragment = { + "kind": "Fragment", + "name": "VariableSizeShowsList_shows", + "type": "PartnerShow", + "metadata": { + "plural": true + }, + "argumentDefinitions": [], + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null + }, + { + "kind": "FragmentSpread", + "name": "Show_show", + "args": null + } + ], + "idField": "__id" +}; +(node as any).hash = 'c98a9cbf3a7a99969a7d290dc1691c05'; +export default node; diff --git a/src/__generated__/WorksForYouQuery.graphql.ts b/src/__generated__/WorksForYouQuery.graphql.ts new file mode 100644 index 0000000000..8d04d7f5d2 --- /dev/null +++ b/src/__generated__/WorksForYouQuery.graphql.ts @@ -0,0 +1,708 @@ +/* tslint:disable */ + +import { ConcreteRequest } from "relay-runtime"; +export type WorksForYouQueryVariables = { + readonly count: number; + readonly cursor?: string | null; +}; +export type WorksForYouQueryResponse = { + readonly viewer: ({ + }) | null; +}; + + + +/* +query WorksForYouQuery( + $count: Int! + $cursor: String +) { + viewer { + ...WorksForYou_viewer_1G22uz + } +} + +fragment WorksForYou_viewer_1G22uz on Viewer { + me { + followsAndSaves { + notifications: bundledArtworksByArtist(sort: PUBLISHED_AT_DESC, first: $count, after: $cursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + node { + __id + ...Notification_notification + __typename + } + cursor + } + } + } + __id + } + selectedArtist: artist(id: "") { + id + href + name + image { + resized(height: 80, width: 80) { + url + } + } + artworks(sort: published_at_desc, size: 6) { + ...GenericGrid_artworks + __id + } + __id + } +} + +fragment Notification_notification on FollowedArtistsArtworksGroup { + summary + artists + artworks { + artists(shallow: true) { + href + __id + } + ...GenericGrid_artworks + __id + } + image { + resized(height: 80, width: 80) { + url + } + } + __id +} + +fragment GenericGrid_artworks on Artwork { + __id + id + image { + aspect_ratio + } + ...Artwork_artwork +} + +fragment Artwork_artwork on Artwork { + title + date + sale_message + is_in_auction + id + sale_artwork { + opening_bid { + display + } + current_bid { + display + } + bidder_positions_count + sale { + is_open + __id + } + __id + } + image { + url(version: "large") + aspect_ratio + } + artists(shallow: true) { + name + __id + } + partner { + name + __id + } + href + __id +} +*/ + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int!", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + } +], +v1 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}, +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "date", + "args": null, + "storageKey": null +}, +v3 = [ + { + "kind": "Literal", + "name": "shallow", + "value": true, + "type": "Boolean" + } +], +v4 = { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null +}, +v5 = { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null +}, +v6 = { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null +}, +v7 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "aspect_ratio", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": [ + { + "kind": "Literal", + "name": "version", + "value": "large", + "type": "[String]" + } + ], + "storageKey": "url(version:\"large\")" + } + ] +}, +v8 = { + "kind": "ScalarField", + "alias": null, + "name": "title", + "args": null, + "storageKey": null +}, +v9 = { + "kind": "ScalarField", + "alias": null, + "name": "sale_message", + "args": null, + "storageKey": null +}, +v10 = { + "kind": "ScalarField", + "alias": null, + "name": "is_in_auction", + "args": null, + "storageKey": null +}, +v11 = [ + { + "kind": "ScalarField", + "alias": null, + "name": "display", + "args": null, + "storageKey": null + } +], +v12 = { + "kind": "LinkedField", + "alias": null, + "name": "sale_artwork", + "storageKey": null, + "args": null, + "concreteType": "SaleArtwork", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "opening_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkOpeningBid", + "plural": false, + "selections": v11 + }, + { + "kind": "LinkedField", + "alias": null, + "name": "current_bid", + "storageKey": null, + "args": null, + "concreteType": "SaleArtworkCurrentBid", + "plural": false, + "selections": v11 + }, + { + "kind": "ScalarField", + "alias": null, + "name": "bidder_positions_count", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "sale", + "storageKey": null, + "args": null, + "concreteType": "Sale", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "is_open", + "args": null, + "storageKey": null + }, + v1 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" +}, +v13 = [ + v5, + v1 +], +v14 = { + "kind": "LinkedField", + "alias": null, + "name": "partner", + "storageKey": null, + "args": null, + "concreteType": "Partner", + "plural": false, + "selections": v13, + "idField": "__id" +}, +v15 = { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "resized", + "storageKey": "resized(height:80,width:80)", + "args": [ + { + "kind": "Literal", + "name": "height", + "value": 80, + "type": "Int" + }, + { + "kind": "Literal", + "name": "width", + "value": 80, + "type": "Int" + } + ], + "concreteType": "ResizedImageUrl", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ] +}; +return { + "kind": "Request", + "operationKind": "query", + "name": "WorksForYouQuery", + "id": null, + "text": "query WorksForYouQuery(\n $count: Int!\n $cursor: String\n) {\n viewer {\n ...WorksForYou_viewer_1G22uz\n }\n}\n\nfragment WorksForYou_viewer_1G22uz on Viewer {\n me {\n followsAndSaves {\n notifications: bundledArtworksByArtist(sort: PUBLISHED_AT_DESC, first: $count, after: $cursor) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n __id\n ...Notification_notification\n __typename\n }\n cursor\n }\n }\n }\n __id\n }\n selectedArtist: artist(id: \"\") {\n id\n href\n name\n image {\n resized(height: 80, width: 80) {\n url\n }\n }\n artworks(sort: published_at_desc, size: 6) {\n ...GenericGrid_artworks\n __id\n }\n __id\n }\n}\n\nfragment Notification_notification on FollowedArtistsArtworksGroup {\n summary\n artists\n artworks {\n artists(shallow: true) {\n href\n __id\n }\n ...GenericGrid_artworks\n __id\n }\n image {\n resized(height: 80, width: 80) {\n url\n }\n }\n __id\n}\n\nfragment GenericGrid_artworks on Artwork {\n __id\n id\n image {\n aspect_ratio\n }\n ...Artwork_artwork\n}\n\nfragment Artwork_artwork on Artwork {\n title\n date\n sale_message\n is_in_auction\n id\n sale_artwork {\n opening_bid {\n display\n }\n current_bid {\n display\n }\n bidder_positions_count\n sale {\n is_open\n __id\n }\n __id\n }\n image {\n url(version: \"large\")\n aspect_ratio\n }\n artists(shallow: true) {\n name\n __id\n }\n partner {\n name\n __id\n }\n href\n __id\n}\n", + "metadata": {}, + "fragment": { + "kind": "Fragment", + "name": "WorksForYouQuery", + "type": "Query", + "metadata": null, + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": "viewer", + "name": "__viewer_viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "FragmentSpread", + "name": "WorksForYou_viewer", + "args": [ + { + "kind": "Variable", + "name": "count", + "variableName": "count", + "type": null + }, + { + "kind": "Variable", + "name": "cursor", + "variableName": "cursor", + "type": null + } + ] + } + ] + } + ] + }, + "operation": { + "kind": "Operation", + "name": "WorksForYouQuery", + "argumentDefinitions": v0, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "viewer", + "storageKey": null, + "args": null, + "concreteType": "Viewer", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followsAndSaves", + "storageKey": null, + "args": null, + "concreteType": "FollowsAndSaves", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": "notifications", + "name": "bundledArtworksByArtist", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "PUBLISHED_AT_DESC", + "type": "ArtworkSorts" + } + ], + "concreteType": "FollowedArtistsArtworksGroupConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroupEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroup", + "plural": false, + "selections": [ + v1, + { + "kind": "ScalarField", + "alias": null, + "name": "summary", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "artists", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": null, + "args": null, + "concreteType": "Artwork", + "plural": true, + "selections": [ + v2, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": v3, + "concreteType": "Artist", + "plural": true, + "selections": [ + v4, + v1, + v5 + ], + "idField": "__id" + }, + v6, + v7, + v8, + v1, + v9, + v10, + v12, + v14, + v4 + ], + "idField": "__id" + }, + v15, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedHandle", + "alias": "notifications", + "name": "bundledArtworksByArtist", + "args": [ + { + "kind": "Variable", + "name": "after", + "variableName": "cursor", + "type": "String" + }, + { + "kind": "Variable", + "name": "first", + "variableName": "count", + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "PUBLISHED_AT_DESC", + "type": "ArtworkSorts" + } + ], + "handle": "connection", + "key": "WorksForYou_notifications", + "filters": [ + "sort" + ] + } + ] + }, + v1 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "selectedArtist", + "name": "artist", + "storageKey": "artist(id:\"\")", + "args": [ + { + "kind": "Literal", + "name": "id", + "value": "", + "type": "String!" + } + ], + "concreteType": "Artist", + "plural": false, + "selections": [ + v6, + v4, + v5, + v15, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": "artworks(size:6,sort:\"published_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 6, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "published_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "Artwork", + "plural": true, + "selections": [ + v9, + v1, + v7, + v8, + v2, + v6, + v10, + v12, + { + "kind": "LinkedField", + "alias": null, + "name": "artists", + "storageKey": "artists(shallow:true)", + "args": v3, + "concreteType": "Artist", + "plural": true, + "selections": v13, + "idField": "__id" + }, + v14, + v4 + ], + "idField": "__id" + }, + v1 + ], + "idField": "__id" + } + ] + }, + { + "kind": "LinkedHandle", + "alias": null, + "name": "viewer", + "args": null, + "handle": "viewer", + "key": "", + "filters": null + } + ] + } +}; +})(); +(node as any).hash = 'cdaed0d06ebf1989bb6ad7ef67258acd'; +export default node; diff --git a/src/__generated__/WorksForYou_viewer.graphql.ts b/src/__generated__/WorksForYou_viewer.graphql.ts new file mode 100644 index 0000000000..b523432833 --- /dev/null +++ b/src/__generated__/WorksForYou_viewer.graphql.ts @@ -0,0 +1,317 @@ +/* tslint:disable */ + +import { ConcreteFragment } from "relay-runtime"; +export type WorksForYou_viewer = { + readonly me: ({ + readonly followsAndSaves: ({ + readonly notifications: ({ + readonly pageInfo: { + readonly hasNextPage: boolean; + readonly endCursor: string | null; + }; + readonly edges: ReadonlyArray<({ + readonly node: ({ + readonly __id: string; + }) | null; + }) | null> | null; + }) | null; + }) | null; + }) | null; + readonly selectedArtist: ({ + readonly id: string; + readonly href: string | null; + readonly name: string | null; + readonly image: ({ + readonly resized: ({ + readonly url: string | null; + }) | null; + }) | null; + readonly artworks: ReadonlyArray<({ + }) | null> | null; + }) | null; +}; + + + +const node: ConcreteFragment = (function(){ +var v0 = { + "kind": "ScalarField", + "alias": null, + "name": "__id", + "args": null, + "storageKey": null +}; +return { + "kind": "Fragment", + "name": "WorksForYou_viewer", + "type": "Viewer", + "metadata": { + "connection": [ + { + "count": "count", + "cursor": "cursor", + "direction": "forward", + "path": [ + "me", + "followsAndSaves", + "notifications" + ] + } + ] + }, + "argumentDefinitions": [ + { + "kind": "LocalArgument", + "name": "count", + "type": "Int", + "defaultValue": 10 + }, + { + "kind": "LocalArgument", + "name": "cursor", + "type": "String", + "defaultValue": null + }, + { + "kind": "LocalArgument", + "name": "selectedArtist", + "type": "String!", + "defaultValue": "" + }, + { + "kind": "LocalArgument", + "name": "sort", + "type": "ArtworkSorts", + "defaultValue": null + } + ], + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "me", + "storageKey": null, + "args": null, + "concreteType": "Me", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "followsAndSaves", + "storageKey": null, + "args": null, + "concreteType": "FollowsAndSaves", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": "notifications", + "name": "__WorksForYou_notifications_connection", + "storageKey": "__WorksForYou_notifications_connection(sort:\"PUBLISHED_AT_DESC\")", + "args": [ + { + "kind": "Literal", + "name": "sort", + "value": "PUBLISHED_AT_DESC", + "type": "ArtworkSorts" + } + ], + "concreteType": "FollowedArtistsArtworksGroupConnection", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "pageInfo", + "storageKey": null, + "args": null, + "concreteType": "PageInfo", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "hasNextPage", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "endCursor", + "args": null, + "storageKey": null + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "edges", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroupEdge", + "plural": true, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "node", + "storageKey": null, + "args": null, + "concreteType": "FollowedArtistsArtworksGroup", + "plural": false, + "selections": [ + v0, + { + "kind": "FragmentSpread", + "name": "Notification_notification", + "args": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "__typename", + "args": null, + "storageKey": null + } + ], + "idField": "__id" + }, + { + "kind": "ScalarField", + "alias": null, + "name": "cursor", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] + }, + v0 + ], + "idField": "__id" + }, + { + "kind": "LinkedField", + "alias": "selectedArtist", + "name": "artist", + "storageKey": null, + "args": [ + { + "kind": "Variable", + "name": "id", + "variableName": "selectedArtist", + "type": "String!" + } + ], + "concreteType": "Artist", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "href", + "args": null, + "storageKey": null + }, + { + "kind": "ScalarField", + "alias": null, + "name": "name", + "args": null, + "storageKey": null + }, + { + "kind": "LinkedField", + "alias": null, + "name": "image", + "storageKey": null, + "args": null, + "concreteType": "Image", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "resized", + "storageKey": "resized(height:80,width:80)", + "args": [ + { + "kind": "Literal", + "name": "height", + "value": 80, + "type": "Int" + }, + { + "kind": "Literal", + "name": "width", + "value": 80, + "type": "Int" + } + ], + "concreteType": "ResizedImageUrl", + "plural": false, + "selections": [ + { + "kind": "ScalarField", + "alias": null, + "name": "url", + "args": null, + "storageKey": null + } + ] + } + ] + }, + { + "kind": "LinkedField", + "alias": null, + "name": "artworks", + "storageKey": "artworks(size:6,sort:\"published_at_desc\")", + "args": [ + { + "kind": "Literal", + "name": "size", + "value": 6, + "type": "Int" + }, + { + "kind": "Literal", + "name": "sort", + "value": "published_at_desc", + "type": "ArtworkSorts" + } + ], + "concreteType": "Artwork", + "plural": true, + "selections": [ + { + "kind": "FragmentSpread", + "name": "GenericGrid_artworks", + "args": null + }, + v0 + ], + "idField": "__id" + }, + v0 + ], + "idField": "__id" + } + ] +}; +})(); +(node as any).hash = '80174d15b8c622c116f477a87ac96f89'; +export default node; diff --git a/src/lib/Components/Artist/About.tsx b/src/lib/Components/Artist/About.tsx index 0d07cba2b8..853c757bdd 100644 --- a/src/lib/Components/Artist/About.tsx +++ b/src/lib/Components/Artist/About.tsx @@ -1,7 +1,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" -import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" +import { Dimensions, StyleSheet, View } from "react-native" import NavButton from "../Buttons/NavigationButton" import RelatedArtists from "../RelatedArtists" @@ -9,11 +9,13 @@ import Separator from "../Separator" import Articles from "./Articles" import Biography from "./Biography" -interface Props extends ViewProperties { - artist: any +import { About_artist } from "__generated__/About_artist.graphql" + +interface Props { + artist: About_artist } -class About extends React.Component { +class About extends React.Component { render() { return ( @@ -28,7 +30,7 @@ class About extends React.Component { if (this.props.artist.has_metadata) { return ( - + {this.auctionResults()} @@ -51,7 +53,7 @@ class About extends React.Component { if (this.props.artist.articles.length) { return ( - + ) @@ -60,7 +62,7 @@ class About extends React.Component { relatedArtists() { return this.props.artist.related_artists.length ? ( - + ) : null } } diff --git a/src/lib/Components/Artist/Articles/Article.tsx b/src/lib/Components/Artist/Articles/Article.tsx index a54d2f7fd4..533e0ca882 100644 --- a/src/lib/Components/Artist/Articles/Article.tsx +++ b/src/lib/Components/Artist/Articles/Article.tsx @@ -7,7 +7,13 @@ import fonts from "lib/data/fonts" import SwitchBoard from "lib/NativeModules/SwitchBoard" import ImageView from "../../OpaqueImageView" -class Article extends React.Component { +import { Article_article } from "__generated__/Article_article.graphql" + +interface Props extends ViewProperties { + article: Article_article +} + +class Article extends React.Component { handleTap() { SwitchBoard.presentNavigationViewController(this, this.props.article.href) } @@ -83,16 +89,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - article: { - thumbnail_title: string | null - href: string | null - author: { - name: string | null - } | null - thumbnail_image: { - url: string | null - } | null - } -} diff --git a/src/lib/Components/Artist/Articles/index.tsx b/src/lib/Components/Artist/Articles/index.tsx index 120feb8e26..a2b071734e 100644 --- a/src/lib/Components/Artist/Articles/index.tsx +++ b/src/lib/Components/Artist/Articles/index.tsx @@ -1,11 +1,17 @@ import React, { Component } from "react" -import { ScrollView, StyleSheet, View, ViewProperties } from "react-native" +import { ScrollView, StyleSheet, View } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import SerifText from "../../Text/Serif" import Article from "./Article" -class Articles extends Component { +import { Articles_articles } from "__generated__/Articles_articles.graphql" + +interface Props { + articles: Articles_articles +} + +class Articles extends Component { render() { const articles = this.props.articles return ( @@ -44,9 +50,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - articles: Array<{ - __id: string - } | null> | null -} diff --git a/src/lib/Components/Artist/Artworks/index.tsx b/src/lib/Components/Artist/Artworks/index.tsx index d5744c5d4a..6efa172e3c 100644 --- a/src/lib/Components/Artist/Artworks/index.tsx +++ b/src/lib/Components/Artist/Artworks/index.tsx @@ -1,6 +1,6 @@ import React, { Component } from "react" -import { StyleSheet, View, ViewProperties } from "react-native" -import { createFragmentContainer, graphql } from "react-relay" +import { StyleSheet, View } from "react-native" +import { createFragmentContainer, graphql, RelayProp } from "react-relay" import ArtistForSaleArtworksGrid from "../../ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid" import ArtistNotForSaleArtworksGrid from "../../ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid" @@ -10,6 +10,8 @@ import SerifText from "lib/Components/Text/Serif" import colors from "lib/data/colors" +import { Artworks_artist } from "__generated__/Artworks_artist.graphql" + interface RenderSectionParams { title: string count: number @@ -19,8 +21,9 @@ interface RenderSectionParams { mapPropsToArtworksConnection: (Props) => any } -interface Props extends RelayProps, ViewProperties { - relay?: RelayProps +interface Props { + relay: RelayProp + artist: Artworks_artist } interface State { @@ -115,7 +118,7 @@ const styles = StyleSheet.create({ export default createFragmentContainer( Artworks, - graphql.experimental` + graphql` fragment Artworks_artist on Artist { counts { artworks @@ -126,12 +129,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - counts: { - artworks: boolean | number | string | null - for_sale_artworks: boolean | number | string | null - } | null - } -} diff --git a/src/lib/Components/Artist/Biography.tsx b/src/lib/Components/Artist/Biography.tsx index 27da9879f2..3c68378e3a 100644 --- a/src/lib/Components/Artist/Biography.tsx +++ b/src/lib/Components/Artist/Biography.tsx @@ -1,5 +1,5 @@ import React from "react" -import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" +import { Dimensions, StyleSheet, View } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import removeMarkdown from "remove-markdown" @@ -7,9 +7,15 @@ import removeMarkdown from "remove-markdown" import Headline from "../Text/Headline" import SerifText from "../Text/Serif" +import { Biography_artist } from "__generated__/Biography_artist.graphql" + const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 -class Biography extends React.Component { +interface Props { + artist: Biography_artist +} + +class Biography extends React.Component { render() { const artist = this.props.artist if (!artist.blurb && !artist.bio) { @@ -65,10 +71,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - bio: string | null - blurb: string | null - } -} diff --git a/src/lib/Components/Artist/Header.tsx b/src/lib/Components/Artist/Header.tsx index 6ac5504c19..1d8f6be165 100644 --- a/src/lib/Components/Artist/Header.tsx +++ b/src/lib/Components/Artist/Header.tsx @@ -12,10 +12,13 @@ import InvertedButton from "../Buttons/InvertedButton" import Headline from "../Text/Headline" import SerifText from "../Text/Serif" +import { Header_artist } from "__generated__/Header_artist.graphql" + const isPad = Dimensions.get("window").width > 700 -// tslint:disable-next-line:no-empty-interface -interface Props extends RelayProps {} +interface Props { + artist: Header_artist +} interface State { following: boolean @@ -210,16 +213,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - _id: string - id: string - name: string | null - nationality: string | null - birthday: string | null - counts: { - follows: boolean | number | string | null - } | null - } -} diff --git a/src/lib/Components/Artist/Shows/Metadata.tsx b/src/lib/Components/Artist/Shows/Metadata.tsx index 4ccb5f56b8..5ee09ced02 100644 --- a/src/lib/Components/Artist/Shows/Metadata.tsx +++ b/src/lib/Components/Artist/Shows/Metadata.tsx @@ -7,7 +7,13 @@ import SerifText from "lib/Components/Text/Serif" import colors from "lib/data/colors" import fonts from "lib/data/fonts" -class Metadata extends React.Component { +import { Metadata_show } from "__generated__/Metadata_show.graphql" + +interface Props extends ViewProperties { + show: Metadata_show +} + +class Metadata extends React.Component { render() { const partnerName = this.props.show.partner && this.props.show.partner.name return ( @@ -88,19 +94,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - show: { - kind: string | null - name: string | null - exhibition_period: string | null - status_update: string | null - status: string | null - partner: { - name: string | null - } | null - location: { - city: string | null - } | null - } -} diff --git a/src/lib/Components/Artist/Shows/Show.tsx b/src/lib/Components/Artist/Shows/Show.tsx index fb4f9565fe..02113d1fd9 100644 --- a/src/lib/Components/Artist/Shows/Show.tsx +++ b/src/lib/Components/Artist/Shows/Show.tsx @@ -1,16 +1,19 @@ import React from "react" -import { TouchableWithoutFeedback, View, ViewProperties } from "react-native" +import { TouchableWithoutFeedback, View, ViewStyle } from "react-native" import { createFragmentContainer, graphql } from "react-relay" import SwitchBoard from "../../../NativeModules/SwitchBoard" import OpaqueImageView from "../../OpaqueImageView" import Metadata from "./Metadata" -interface Props extends RelayProps, ViewProperties { +import { Show_show } from "__generated__/Show_show.graphql" + +interface Props { + show: Show_show styles?: { - container?: any - image?: any - metadata?: any + container?: ViewStyle + image?: ViewStyle + metadata?: ViewStyle } } @@ -49,12 +52,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - show: { - href: string | null - cover_image: { - url: string | null - } | null - } -} diff --git a/src/lib/Components/Artist/Shows/SmallList.tsx b/src/lib/Components/Artist/Shows/SmallList.tsx index 930fc2fa44..9f9e4b5708 100644 --- a/src/lib/Components/Artist/Shows/SmallList.tsx +++ b/src/lib/Components/Artist/Shows/SmallList.tsx @@ -6,12 +6,18 @@ import Show from "./Show" import colors from "lib/data/colors" +import { SmallList_shows } from "__generated__/SmallList_shows.graphql" + +interface Props extends ViewProperties { + shows: SmallList_shows +} + interface State { dataSource: ListViewDataSource } -class SmallList extends React.Component { - constructor(props) { +class SmallList extends React.Component { + constructor(props: Props) { super(props) this.state = { dataSource: new ListView.DataSource({ @@ -67,7 +73,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - shows: Array<{} | null> | null -} diff --git a/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx b/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx index 0d5482cc22..9ce1273ed3 100644 --- a/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx +++ b/src/lib/Components/Artist/Shows/VariableSizeShowsList.tsx @@ -1,11 +1,14 @@ import React, { Component } from "react" import { createFragmentContainer, graphql } from "react-relay" -import { LayoutChangeEvent, StyleSheet, View, ViewProperties, ViewStyle } from "react-native" +import { LayoutChangeEvent, StyleSheet, View, ViewStyle } from "react-native" import Show from "./Show" -interface Props extends RelayProps, ViewProperties { +import { VariableSizeShowsList_shows } from "__generated__/VariableSizeShowsList_shows.graphql" + +interface Props { + shows: VariableSizeShowsList_shows showSize: "medium" | "large" } @@ -96,9 +99,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - shows: Array<{ - __id: string - } | null> | null -} diff --git a/src/lib/Components/Artist/Shows/index.tsx b/src/lib/Components/Artist/Shows/index.tsx index 0a44f39043..cb91b407ba 100644 --- a/src/lib/Components/Artist/Shows/index.tsx +++ b/src/lib/Components/Artist/Shows/index.tsx @@ -7,7 +7,13 @@ import SerifText from "../../Text/Serif" import SmallList from "./SmallList" import VariableSizeShowsList from "./VariableSizeShowsList" -class Shows extends React.Component { +import { Shows_artist } from "__generated__/Shows_artist.graphql" + +interface Props { + artist: Shows_artist +} + +class Shows extends React.Component { render() { return ( @@ -35,7 +41,7 @@ class Shows extends React.Component { pastShowsList() { // TODO: Use `this.props.relay.getVariables().isPad` when this gets merged: https://github.com/facebook/relay/pull/1868 if (this.props.artist.past_large_shows) { - return + return } else { return } @@ -89,14 +95,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - current_shows: Array | null - upcoming_shows: Array | null - past_small_shows: Array | null - past_large_shows: Array<{ - __id: string | null - }> | null - } -} diff --git a/src/lib/Components/Artist/__tests__/About-tests.tsx b/src/lib/Components/Artist/__tests__/About-tests.tsx index 41c4640b24..630fc2d4b7 100644 --- a/src/lib/Components/Artist/__tests__/About-tests.tsx +++ b/src/lib/Components/Artist/__tests__/About-tests.tsx @@ -7,6 +7,7 @@ import About from "../About" it("renders properly", () => { const artist = { + id: "banksy", has_metadata: true, is_display_auction_link: true, articles: [], diff --git a/src/lib/Components/Artist/__tests__/Artworks-tests.tsx b/src/lib/Components/Artist/__tests__/Artworks-tests.tsx index d601cb06a4..d381d6ff58 100644 --- a/src/lib/Components/Artist/__tests__/Artworks-tests.tsx +++ b/src/lib/Components/Artist/__tests__/Artworks-tests.tsx @@ -12,6 +12,6 @@ it("renders properly", () => { for_sale_artworks: 2, }, } - const artworks = renderer.create().toJSON() + const artworks = renderer.create().toJSON() expect(artworks).toMatchSnapshot() }) diff --git a/src/lib/Components/Artist/__tests__/__snapshots__/About-tests.tsx.snap b/src/lib/Components/Artist/__tests__/__snapshots__/About-tests.tsx.snap index 309e4e5f36..1f61d28425 100644 --- a/src/lib/Components/Artist/__tests__/__snapshots__/About-tests.tsx.snap +++ b/src/lib/Components/Artist/__tests__/__snapshots__/About-tests.tsx.snap @@ -6,6 +6,7 @@ exports[`renders properly 1`] = ` Object { "articles": Array [], "has_metadata": true, + "id": "banksy", "is_display_auction_link": true, "related_artists": Array [], } diff --git a/src/lib/Components/ArtworkGrids/Artwork.tsx b/src/lib/Components/ArtworkGrids/Artwork.tsx index f636f681c2..16035e88f7 100644 --- a/src/lib/Components/ArtworkGrids/Artwork.tsx +++ b/src/lib/Components/ArtworkGrids/Artwork.tsx @@ -8,7 +8,10 @@ import SwitchBoard from "lib/NativeModules/SwitchBoard" import ImageView from "../OpaqueImageView" import SerifText from "../Text/Serif" -interface Props extends RelayProps { +import { Artwork_artwork } from "__generated__/Artwork_artwork.graphql" + +interface Props { + artwork: Artwork_artwork // Passes the Artwork ID back up to another component // ideally, this would be used to send an array of Artworks // through to Eigen where this item is the default selected one. @@ -145,36 +148,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artwork: { - id: string - title: string | null - date: string | null - sale_message: string | null - is_in_auction: boolean | null - sale_artwork: { - opening_bid: { - display: string | null - } | null - current_bid: { - display: string | null - } | null - bidder_positions_count: number | null - sale: { - is_open: boolean | null - } | null - } | null - image: { - url: string | null - aspect_ratio: number | null - } | null - artists: Array<{ - name: string | null - } | null> | null - partner: { - name: string | null - } | null - href: string | null - } -} diff --git a/src/lib/Components/ArtworkGrids/GenericGrid.tsx b/src/lib/Components/ArtworkGrids/GenericGrid.tsx index db8289b886..9556cc866f 100644 --- a/src/lib/Components/ArtworkGrids/GenericGrid.tsx +++ b/src/lib/Components/ArtworkGrids/GenericGrid.tsx @@ -7,10 +7,13 @@ import SwitchBoard from "lib/NativeModules/SwitchBoard" import Spinner from "lib/Components/Spinner" import Artwork from "./Artwork" -interface Props extends RelayProps { - sectionDirection: "column" // FIXME: We don’t actually support more options atm - sectionMargin: number - itemMargin: number +import { GenericGrid_artworks } from "__generated__/GenericGrid_artworks.graphql" + +interface Props { + artworks: GenericGrid_artworks + sectionDirection?: "column" // FIXME: We don’t actually support more options atm + sectionMargin?: number + itemMargin?: number isLoading?: boolean } @@ -21,19 +24,14 @@ interface State { class GenericArtworksGrid extends React.Component { static defaultProps = { - sectionDirection: "column", + sectionDirection: "column" as "column", sectionMargin: 20, itemMargin: 20, } - constructor(props) { - super(props) - this.state = { - sectionDimension: 0, - sectionCount: 0, - } - - this.onLayout = this.onLayout.bind(this) + state = { + sectionDimension: 0, + sectionCount: 0, } tappedOnArtwork = (artworkID: string) => { @@ -178,13 +176,3 @@ const GenericGrid = createFragmentContainer( ) export default GenericGrid - -interface RelayProps { - artworks: Array<{ - __id: string - id: string - image: { - aspect_ratio: number | null - } | null - } | null> | null -} diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx index f081e92a80..5a14d5c0d2 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistForSaleArtworksGrid.tsx @@ -4,7 +4,7 @@ import InfiniteScrollArtworksGrid from "../InfiniteScrollGrid" const ArtistForSaleArtworksGrid = createPaginationContainer( InfiniteScrollArtworksGrid, { - artist: graphql.experimental` + artist: graphql` fragment ArtistForSaleArtworksGrid_artist on Artist @argumentDefinitions( count: { type: "Int", defaultValue: 10 } @@ -56,7 +56,7 @@ const ArtistForSaleArtworksGrid = createPaginationContainer( filter, } }, - query: graphql.experimental` + query: graphql` query ArtistForSaleArtworksGridQuery( $__id: ID! $count: Int! diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx index 798a85b8bb..88ebd6b5d1 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/ArtistNotForSaleArtworksGrid.tsx @@ -4,7 +4,7 @@ import InfiniteScrollArtworksGrid from "../InfiniteScrollGrid" const ArtistNotForSaleArtworksGrid = createPaginationContainer( InfiniteScrollArtworksGrid, { - artist: graphql.experimental` + artist: graphql` fragment ArtistNotForSaleArtworksGrid_artist on Artist @argumentDefinitions( count: { type: "Int", defaultValue: 10 } @@ -56,7 +56,7 @@ const ArtistNotForSaleArtworksGrid = createPaginationContainer( filter, } }, - query: graphql.experimental` + query: graphql` query ArtistNotForSaleArtworksGridQuery( $__id: ID! $count: Int! diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx index 6d1a78b095..5beb3e338c 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/GeneArtworksGrid.tsx @@ -4,7 +4,7 @@ import InfiniteScrollArtworksGrid from "../InfiniteScrollGrid" const GeneArtworksGrid = createPaginationContainer( InfiniteScrollArtworksGrid, { - filtered_artworks: graphql.experimental` + filtered_artworks: graphql` fragment GeneArtworksGrid_filtered_artworks on FilterArtworks @argumentDefinitions( count: { type: "Int", defaultValue: 10 } @@ -53,7 +53,7 @@ const GeneArtworksGrid = createPaginationContainer( sort: props.sort, } }, - query: graphql.experimental` + query: graphql` query GeneArtworksGridQuery($__id: ID!, $count: Int!, $cursor: String, $sort: String) { node(__id: $__id) { ... on FilterArtworks { diff --git a/src/lib/Components/ArtworkGrids/RelayConnections/SaleArtworksGrid.tsx b/src/lib/Components/ArtworkGrids/RelayConnections/SaleArtworksGrid.tsx index 7441109a03..cce4e8c26a 100644 --- a/src/lib/Components/ArtworkGrids/RelayConnections/SaleArtworksGrid.tsx +++ b/src/lib/Components/ArtworkGrids/RelayConnections/SaleArtworksGrid.tsx @@ -12,7 +12,7 @@ interface Props extends GridProps { const SaleArtworksGrid = createPaginationContainer( InfiniteScrollArtworksGrid as any, { - sale: graphql.experimental` + sale: graphql` fragment SaleArtworksGrid_sale on Sale @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String" }) { __id @@ -58,7 +58,7 @@ const SaleArtworksGrid = createPaginationContainer( cursor, } }, - query: graphql.experimental` + query: graphql` query SaleArtworksGridQuery($__id: ID!, $count: Int!, $cursor: String) { node(__id: $__id) { ... on Sale { diff --git a/src/lib/Components/ArtworkGrids/__tests__/Generic-grid-tests.tsx b/src/lib/Components/ArtworkGrids/__tests__/Generic-grid-tests.tsx index db6f07c3cc..7c69d65d19 100644 --- a/src/lib/Components/ArtworkGrids/__tests__/Generic-grid-tests.tsx +++ b/src/lib/Components/ArtworkGrids/__tests__/Generic-grid-tests.tsx @@ -16,6 +16,7 @@ it("renders properly", () => { const artwork = () => { return { __id: "artwork-long-title", + id: "long-title", title: "DO WOMEN STILL HAVE TO BE NAKED TO GET INTO THE MET. MUSEUM", date: "2012", sale_message: null, diff --git a/src/lib/Components/Gene/About.tsx b/src/lib/Components/Gene/About.tsx index 8e7007c0a7..b089150757 100644 --- a/src/lib/Components/Gene/About.tsx +++ b/src/lib/Components/Gene/About.tsx @@ -8,7 +8,13 @@ import Biography from "./Biography" import RelatedArtists from "../RelatedArtists" import Separator from "../Separator" -class About extends React.Component { +import { About_gene } from "__generated__/About_gene.graphql" + +interface Props { + gene: About_gene +} + +class About extends React.Component { render() { return ( @@ -29,7 +35,7 @@ class About extends React.Component { relatedArtists() { return (this.props.gene.trending_artists || []).length ? ( - + ) : null } } @@ -55,9 +61,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - gene: { - trending_artists: Array | null - } -} diff --git a/src/lib/Components/Gene/Biography.tsx b/src/lib/Components/Gene/Biography.tsx index 38ad29fa96..b8990801b5 100644 --- a/src/lib/Components/Gene/Biography.tsx +++ b/src/lib/Components/Gene/Biography.tsx @@ -6,11 +6,15 @@ import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" import SerifText from "../Text/Serif" +import { Biography_gene } from "__generated__/Biography_gene.graphql" + const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 -interface Props extends ViewProperties, RelayProps {} +interface Props extends ViewProperties { + gene: Biography_gene +} -class Biography extends React.Component { +class Biography extends React.Component { render() { const gene = this.props.gene if (!gene.description) { @@ -52,9 +56,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - gene: { - description: string | null - } -} diff --git a/src/lib/Components/Gene/Header.tsx b/src/lib/Components/Gene/Header.tsx index 628eed40af..f53d9261b9 100644 --- a/src/lib/Components/Gene/Header.tsx +++ b/src/lib/Components/Gene/Header.tsx @@ -1,7 +1,7 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" -import { Dimensions, NativeModules, StyleSheet, TextStyle, View, ViewProperties, ViewStyle } from "react-native" +import { Dimensions, NativeModules, StyleSheet, TextStyle, View, ViewStyle } from "react-native" const { ARTemporaryAPIModule } = NativeModules import { Schema, Track, track as _track } from "../../utils/track" @@ -9,22 +9,22 @@ import { Schema, Track, track as _track } from "../../utils/track" import InvertedButton from "../Buttons/InvertedButton" import Headline from "../Text/Headline" -interface HeaderProps extends ViewProperties, RelayProps { +import { Header_gene } from "__generated__/Header_gene.graphql" + +interface Props { + gene: Header_gene shortForm: boolean } -interface HeaderState { +interface State { following: boolean | null } -const track: Track = _track +const track: Track = _track @track() -class Header extends React.Component { - constructor(props) { - super(props) - this.state = { following: null } - } +class Header extends React.Component { + state = { following: null } componentDidMount() { NativeModules.ARTemporaryAPIModule.followStatusForGene(this.props.gene._id, (error, following) => { @@ -153,11 +153,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - gene: { - _id: string - id: string - name: string | null - } -} diff --git a/src/lib/Components/Gene/__tests__/Header-tests.tsx b/src/lib/Components/Gene/__tests__/Header-tests.tsx index 4ec4ec1921..dc42d754d7 100644 --- a/src/lib/Components/Gene/__tests__/Header-tests.tsx +++ b/src/lib/Components/Gene/__tests__/Header-tests.tsx @@ -12,10 +12,11 @@ beforeAll(() => { it("renders properly", () => { const gene = { __id: "gene-deep-time", + _id: "gravity-id", id: "deep-time", name: "Deep Time", } - const header = renderer.create(
).toJSON() + const header = renderer.create(
).toJSON() expect(header).toMatchSnapshot() }) diff --git a/src/lib/Components/Gene/__tests__/__snapshots__/Header-tests.tsx.snap b/src/lib/Components/Gene/__tests__/__snapshots__/Header-tests.tsx.snap index 9661d686fc..a00408f517 100644 --- a/src/lib/Components/Gene/__tests__/__snapshots__/Header-tests.tsx.snap +++ b/src/lib/Components/Gene/__tests__/__snapshots__/Header-tests.tsx.snap @@ -5,9 +5,11 @@ exports[`renders properly 1`] = ` gene={ Object { "__id": "gene-deep-time", + "_id": "gravity-id", "id": "deep-time", "name": "Deep Time", } } + shortForm={false} /> `; diff --git a/src/lib/Components/Home/ArtistRails/ArtistCard.tsx b/src/lib/Components/Home/ArtistRails/ArtistCard.tsx index 619407bed4..8d469ce8af 100644 --- a/src/lib/Components/Home/ArtistRails/ArtistCard.tsx +++ b/src/lib/Components/Home/ArtistRails/ArtistCard.tsx @@ -9,7 +9,6 @@ import { TextStyle, TouchableWithoutFeedback, View, - ViewProperties, ViewStyle, } from "react-native" const { ARTemporaryAPIModule } = NativeModules @@ -22,11 +21,14 @@ import SwitchBoard from "lib/NativeModules/SwitchBoard" import InvertedButton from "lib/Components/Buttons/InvertedButton" import ImageView from "lib/Components/OpaqueImageView" +import { ArtistCard_artist } from "__generated__/ArtistCard_artist.graphql" + type ArtistFollowHandlerResult = Promise export type ArtistFollowButtonStatusSetter = (status: boolean) => ArtistFollowHandlerResult export type ArtistFollowHandler = (setFollowButtonStatus: ArtistFollowButtonStatusSetter) => void -interface Props extends ViewProperties, RelayProps { +interface Props { + artist: ArtistCard_artist onFollow?: ArtistFollowHandler } @@ -37,13 +39,10 @@ interface State { } export class ArtistCard extends React.Component { - constructor(props) { - super(props) - this.state = { - processingChange: false, - followStatusChanged: null, - following: null, - } + state = { + processingChange: false, + followStatusChanged: null, + following: null, } handleTap() { @@ -254,17 +253,3 @@ export const ArtistCardQuery = ` ` export default ArtistCardContainer - -interface RelayProps { - artist: { - id: string - _id: string - href: string | null - name: string | null - formatted_artworks_count: string | null - formatted_nationality_and_birthday: string | null - image: { - url: string | null - } | null - } -} diff --git a/src/lib/Components/Home/ArtistRails/ArtistRail.tsx b/src/lib/Components/Home/ArtistRails/ArtistRail.tsx index 26ebd1e3b0..4b653567d3 100644 --- a/src/lib/Components/Home/ArtistRails/ArtistRail.tsx +++ b/src/lib/Components/Home/ArtistRails/ArtistRail.tsx @@ -13,6 +13,8 @@ import Spinner from "../../Spinner" import SectionTitle from "../SectionTitle" import ArtistCard, { ArtistCardQuery, ArtistCardResponse, ArtistFollowButtonStatusSetter } from "./ArtistCard" +import { ArtistRail_rail } from "__generated__/ArtistRail_rail.graphql" + const Animation = { yDelta: 20, duration: { @@ -22,9 +24,10 @@ const Animation = { easing: Easing.out(Easing.cubic), } -interface Props extends ViewProperties, RelayProps { +interface Props extends ViewProperties { registerRailModule?: (rail: ArtistRail | null) => void - relay?: RelayRefetchProp + relay: RelayRefetchProp + rail: ArtistRail_rail } interface State { @@ -295,7 +298,7 @@ function suggestedArtistQuery(artistID: string): string { export default createRefetchContainer( ArtistRail, - graphql.experimental` + graphql` fragment ArtistRail_rail on HomePageArtistModule @argumentDefinitions(fetchContent: { type: "Boolean!", defaultValue: false }) { __id @@ -307,7 +310,7 @@ export default createRefetchContainer( } } `, - graphql.experimental` + graphql` query ArtistRailRefetchQuery($__id: ID!, $fetchContent: Boolean!) { node(__id: $__id) { ...ArtistRail_rail @arguments(fetchContent: $fetchContent) @@ -315,14 +318,3 @@ export default createRefetchContainer( } ` ) - -interface RelayProps { - rail: { - __id: string - key: string | null - results: Array<{ - _id: string - __id: string - } | null> | null - } -} diff --git a/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx b/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx index 92e9c2eb9e..4a44ebabd5 100644 --- a/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx +++ b/src/lib/Components/Home/ArtworkRails/ArtworkRail.tsx @@ -24,6 +24,8 @@ import fonts from "lib/data/fonts" import SwitchBoard from "lib/NativeModules/SwitchBoard" import ArtworkRailHeader from "./ArtworkRailHeader" +import { ArtworkRail_rail } from "__generated__/ArtworkRail_rail.graphql" + // tslint:disable-next-line:no-var-requires const chevron: ImageURISource = require("../../../../../images/chevron.png") @@ -41,8 +43,9 @@ const additionalContentRails = [ export const minRailHeight = 400 -interface Props extends ViewProperties, RelayProps { - relay?: RelayRefetchProp +interface Props extends ViewProperties { + relay: RelayRefetchProp + rail: ArtworkRail_rail } interface State { @@ -52,16 +55,12 @@ interface State { didPerformFetch: boolean } -export class ArtworkRail extends React.Component { - constructor(props) { - super(props) - - this.state = { - expanded: false, - gridHeight: 0, - loadFailed: false, - didPerformFetch: false, - } +export class ArtworkRail extends React.Component { + state = { + expanded: false, + gridHeight: 0, + loadFailed: false, + didPerformFetch: false, } componentDidMount() { @@ -176,7 +175,7 @@ export class ArtworkRail extends React.Component - + ) @@ -248,7 +247,7 @@ export class ArtworkRail extends React.Component - + {this.renderModuleResults()} ) @@ -300,7 +299,7 @@ const styles = StyleSheet.create({ export default createRefetchContainer( ArtworkRail, - graphql.experimental` + graphql` fragment ArtworkRail_rail on HomePageArtworkModule @argumentDefinitions(fetchContent: { type: "Boolean!", defaultValue: false }) { ...ArtworkRailHeader_rail @@ -336,7 +335,7 @@ export default createRefetchContainer( } } `, - graphql.experimental` + graphql` query ArtworkRailRefetchQuery($__id: ID!, $fetchContent: Boolean!) { node(__id: $__id) { ...ArtworkRail_rail @arguments(fetchContent: $fetchContent) @@ -344,21 +343,3 @@ export default createRefetchContainer( } ` ) - -interface RelayProps { - rail: { - __id: string - key: string | null - params: { - medium: string | null - price_range: string | null - } | null - context: Array | null - results: Array | null - } -} -interface RelayPropsWorkaround { - rail: { - context: any - } -} diff --git a/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx b/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx index 53c014de31..2abcd7dc00 100644 --- a/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx +++ b/src/lib/Components/Home/ArtworkRails/ArtworkRailHeader.tsx @@ -9,7 +9,6 @@ import { TextStyle, TouchableWithoutFeedback, View, - ViewProperties, ViewStyle, } from "react-native" const { ARTemporaryAPIModule } = NativeModules @@ -22,6 +21,8 @@ import colors from "lib/data/colors" import fonts from "lib/data/fonts" import SectionTitle from "../SectionTitle" +import { ArtworkRailHeader_rail } from "__generated__/ArtworkRailHeader_rail.graphql" + const isPad = Dimensions.get("window").width > 700 const additionalContentRails = [ @@ -33,7 +34,8 @@ const additionalContentRails = [ "generic_gene", ] -interface Props extends ViewProperties, RelayProps { +interface Props { + rail: ArtworkRailHeader_rail handleViewAll: () => void } @@ -41,8 +43,8 @@ interface State { following: boolean } -class ArtworkRailHeader extends React.Component { - constructor(props) { +class ArtworkRailHeader extends React.Component { + constructor(props: Props) { super(props) this.state = { following: props.rail.key === "followed_artist" } } @@ -166,16 +168,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - rail: { - title: string | null - key: string | null - context: Array | null - } -} -interface RelayPropsWorkaround { - rail: { - context: any - } -} diff --git a/src/lib/Components/Home/HeroUnits.tsx b/src/lib/Components/Home/HeroUnits.tsx index ea1b06c09c..90e890c7e6 100644 --- a/src/lib/Components/Home/HeroUnits.tsx +++ b/src/lib/Components/Home/HeroUnits.tsx @@ -7,7 +7,11 @@ import SwitchBoard from "lib/NativeModules/SwitchBoard" import OpaqueImageView from "../OpaqueImageView" import Headline from "../Text/Headline" -interface Props extends ViewProperties, RelayProps {} +import { HeroUnits_hero_units } from "__generated__/HeroUnits_hero_units.graphql" + +interface Props extends ViewProperties { + hero_units: HeroUnits_hero_units +} interface State { width?: number @@ -17,14 +21,11 @@ interface State { } class HeroUnits extends React.Component { - constructor(props) { - super(props) - this.state = { - width: null, - height: null, - margin: null, - fontSize: 0, - } + state = { + width: null, + height: null, + margin: null, + fontSize: 0, } handleLayout = (event: LayoutChangeEvent) => { @@ -97,14 +98,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - hero_units: Array<{ - __id: string - href: string | null - title: string | null - heading: string | null - narrow_image_url: string | null - wide_image_url: string | null - } | null> | null -} diff --git a/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx b/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx index 2af414d1ba..410124d561 100644 --- a/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx +++ b/src/lib/Components/Inbox/ActiveBids/ActiveBid.tsx @@ -7,6 +7,8 @@ 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" + const isPad = Dimensions.get("window").width > 700 const Container = styled.View` @@ -59,19 +61,17 @@ const StatusLabel = styled(MetadataText)` type BidStatus = "winning" | "reserve" | "losing" | "live_auction" +interface Props { + bid: ActiveBid_bid +} + interface State { status: BidStatus } -class ActiveBid extends React.Component { - constructor(props) { - super(props) - - this.state = { - status: "losing", - } - - this.handleTap = this.handleTap.bind(this) +class ActiveBid extends React.Component { + state = { + status: "losing" as BidStatus, } componentDidMount() { @@ -109,7 +109,7 @@ class ActiveBid extends React.Component { } } - handleTap() { + handleTap = () => { const bid = this.props.bid // push user into live auction if it's open; otherwise go to artwork const href = this.state.status === "live_auction" ? bid.sale.href : bid.most_recent_bid.sale_artwork.artwork.href @@ -185,35 +185,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - bid: { - is_leading_bidder: boolean | null - sale: { - href: string | null - is_live_open: boolean | null - } | null - most_recent_bid: { - max_bid: { - display: string | null - } | null - sale_artwork: { - artwork: { - href: string | null - image: { - url: string | null - } | null - artist_names: string | null - } | null - counts: { - bidder_positions: number | null - } | null - highest_bid: { - display: string | null - } | null - lot_number: string | null - reserve_status: string | null - } | null - } | null - } -} diff --git a/src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx b/src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx index 724dcf8f23..a52b8c8b7d 100644 --- a/src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx +++ b/src/lib/Components/Inbox/ActiveBids/__tests__/ActiveBid-tests.tsx @@ -20,11 +20,13 @@ it("looks right for bids in live open auctions", () => { const bid = (_isLive?: boolean, isOpen?: boolean) => { return { + is_leading_bidder: false, sale: { is_live_open: isOpen, href: "/to-the-auction", }, most_recent_bid: { + __id: "bid-most-recent", id: "594933e6275b244305851e9c", display_max_bid_amount_dollars: "$10,000", max_bid: { @@ -32,6 +34,7 @@ const bid = (_isLive?: boolean, isOpen?: boolean) => { display: "$10,000", }, sale_artwork: { + reserve_status: null, counts: { bidder_positions: 1, }, @@ -45,7 +48,10 @@ const bid = (_isLive?: boolean, isOpen?: boolean) => { artwork: { id: "robert-longo-untitled-dividing-time", title: "Untitled (Dividing Time)", + href: "/artwork/robert-longo-untitled-dividing-time", + artist_names: "Robert Longo", image: { + url: "https://d32dm0rphc51dk.cloudfront.net/4GlhFa7ci5-0W25sjDNFIQ/large.jpg", image_url: "https://d32dm0rphc51dk.cloudfront.net/4GlhFa7ci5-0W25sjDNFIQ/:version.jpg", }, artist: { diff --git a/src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap b/src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap index d9c19d4419..80889e2ac1 100644 --- a/src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap +++ b/src/lib/Components/Inbox/ActiveBids/__tests__/__snapshots__/ActiveBid-tests.tsx.snap @@ -44,7 +44,7 @@ exports[`looks right for bids in live auctions that haven't started yet 1`] = ` } > - Lot 8 · undefined + Lot 8 · Robert Longo - Lot 8 · undefined + Lot 8 · Robert Longo - Lot 8 · undefined + Lot 8 · Robert Longo { - constructor(props: Props) { - super(props) - - this.state = { - fetchingData: false, - } - - this.refreshActiveBids = this.refreshActiveBids.bind(this) +export class ActiveBids extends React.Component { + state = { + fetchingData: false, } hasContent() { @@ -39,12 +36,12 @@ class ActiveBids extends React.Component { renderRows() { const bids = this.props.me.lot_standings.map(bidData => { - return + return }) return bids } - refreshActiveBids(callback) { + refreshActiveBids = (callback?: () => void) => { if (this.state.fetchingData) { return } @@ -102,14 +99,4 @@ export default createRefetchContainer( } } ` -) as React.ComponentClass - -interface RelayProps { - me: { - lot_standings: Array<{ - most_recent_bid: { - __id: string - } | null - } | null> | null - } -} +) diff --git a/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx b/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx index c0178ab185..1e9416a1ba 100644 --- a/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx +++ b/src/lib/Components/Inbox/Conversations/ConversationSnippet.tsx @@ -13,6 +13,8 @@ import { Colors } from "lib/data/colors" import { Fonts } from "lib/data/fonts" import styled from "styled-components/native" +import { ConversationSnippet_conversation } from "__generated__/ConversationSnippet_conversation.graphql" + const isPad = Dimensions.get("window").width > 700 const VerticalLayout = styled.View` @@ -79,14 +81,15 @@ const SeparatorLine = styled.View` ${isPad ? "align-self: center; width: 708;" : ""}; ` -export interface Props extends RelayProps { +export interface Props { + conversation: ConversationSnippet_conversation onSelected?: () => void } const track: Track = _track @track() -export class ConversationSnippet extends React.Component { +export class ConversationSnippet extends React.Component { renderTitleForItem(item) { if (item.__typename === "Artwork") { const artworkTitle = `${item.title.trim()}, ` @@ -207,18 +210,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - conversation: { - id: string | null - to: { - name: string - } - last_message: string - last_message_at: string | null - unread: boolean - items: Array<{ - item: any - } | null> | null - } -} diff --git a/src/lib/Components/Inbox/Conversations/Message.tsx b/src/lib/Components/Inbox/Conversations/Message.tsx index 3432dd59d5..e2750a1179 100644 --- a/src/lib/Components/Inbox/Conversations/Message.tsx +++ b/src/lib/Components/Inbox/Conversations/Message.tsx @@ -16,6 +16,8 @@ import InvoicePreview from "./Preview/InvoicePreview" import { Schema, Track, track as _track } from "../../../utils/track" +import { Message_message } from "__generated__/Message_message.graphql" + const isPad = Dimensions.get("window").width > 700 const VerticalLayout = styled.View` @@ -76,7 +78,8 @@ const PreviewContainer = styled.View` margin-bottom: 10; ` -interface Props extends RelayProps { +interface Props { + message: Message_message senderName: string initials?: string artworkPreview?: JSX.Element @@ -90,7 +93,7 @@ interface Props extends RelayProps { const track: Track = _track @track() -export class Message extends React.Component { +export class Message extends React.Component { renderAttachmentPreviews(attachments: Props["message"]["attachments"]) { // This function does not use the arrow syntax, because it shouldn’t be force bound to this component. Instead, it // gets bound to the AttachmentPreview component instance that’s touched, so we can pass `this` to `findNodeHandle`. @@ -178,7 +181,11 @@ export class Message extends React.Component { {message.invoice && ( - + )} @@ -221,21 +228,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - message: { - body: string | null - created_at: string | null - is_from_user: boolean - invoice: any | null - from: { - name: string | null - email: string - } - attachments: Array<{ - id: string - content_type: string - download_url: string - }> - } -} diff --git a/src/lib/Components/Inbox/Conversations/Messages.tsx b/src/lib/Components/Inbox/Conversations/Messages.tsx index 8b45bb72e0..11110706b7 100644 --- a/src/lib/Components/Inbox/Conversations/Messages.tsx +++ b/src/lib/Components/Inbox/Conversations/Messages.tsx @@ -10,11 +10,13 @@ import Message from "./Message" import ArtworkPreview from "./Preview/ArtworkPreview" import ShowPreview from "./Preview/ShowPreview" +import { Messages_conversation } from "__generated__/Messages_conversation.graphql" + const isPad = Dimensions.get("window").width > 700 interface Props { - conversation?: RelayProps["me"]["conversation"] - relay?: RelayPaginationProp + conversation: Messages_conversation + relay: RelayPaginationProp onDataFetching?: (loading: boolean) => void } @@ -36,11 +38,12 @@ export class Messages extends React.Component { } renderMessage({ item, index }) { - const conversationItem = this.props.conversation.items[0].item const conversation = this.props.conversation + const { artwork, show } = conversation.items[0] const partnerName = conversation.to.name const senderName = item.is_from_user ? conversation.from.name : partnerName const initials = item.is_from_user ? conversation.from.initials : conversation.to.initials + // FIXME: This is the same bug as described in ArtworkCarouselHeader. return ( { initials={initials} artworkPreview={ item.first_message && - conversationItem.__typename === "Artwork" && ( + artwork.href && ( ARSwitchBoard.presentNavigationViewController(this, conversationItem.href)} + artwork={artwork as any} + onSelected={() => ARSwitchBoard.presentNavigationViewController(this, artwork.href)} /> ) } showPreview={ item.first_message && - conversationItem.__typename === "Show" && ( + show.href && ( ARSwitchBoard.presentNavigationViewController(this, conversationItem.href)} + show={show as any} + onSelected={() => ARSwitchBoard.presentNavigationViewController(this, show.href)} /> ) } @@ -107,16 +110,18 @@ export class Messages extends React.Component { } render() { - const edges = (this.props.conversation.messages || { edges: [] }).edges + const edges = (this.props.conversation.messages && this.props.conversation.messages.edges) || [] const messageCount = edges.length - const containsContent = edge => - (edge.node.body && edge.node.body.length) || (edge.node.attachments && edge.node.attachments.length) + const messages = edges + .filter(edge => { + return (edge.node.body && edge.node.body.length) || (edge.node.attachments && edge.node.attachments.length) + }) + .map((edge, index) => { + const isFirstMessage = this.props.relay && !this.props.relay.hasMore() && index === messageCount - 1 + return { first_message: isFirstMessage, key: edge.cursor, ...edge.node } + }) - const messages = edges.filter(edge => containsContent(edge)).map((edge, index) => { - const isFirstMessage = this.props.relay && !this.props.relay.hasMore() && index === messageCount - 1 - return { first_message: isFirstMessage, key: edge.cursor, ...edge.node } - }) const refreshControl = const messagesStyles = isPad @@ -157,7 +162,7 @@ export class Messages extends React.Component { export default createPaginationContainer( Messages, { - conversation: graphql.experimental` + conversation: graphql` fragment Messages_conversation on Conversation @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, after: { type: "String" }) { __id @@ -194,18 +199,31 @@ export default createPaginationContainer( } } items { - item { + artwork: item { ... on Artwork { - __typename href ...ArtworkPreview_artwork } + } + show: item { ... on Show { - __typename href ...ShowPreview_show } } + # FIXME: Working around a type generator bug, see ArtworkCarouselHeader.tsx for details. + # + # item { + # __typename + # ... on Artwork { + # href + # ...ArtworkPreview_artwork + # } + # ... on Show { + # href + # ...ShowPreview_show + # } + # } } } `, @@ -228,7 +246,7 @@ export default createPaginationContainer( after: paginationInfo.cursor, } }, - query: graphql.experimental` + query: graphql` query MessagesQuery($conversationID: String!, $count: Int!, $after: String) { me { conversation(id: $conversationID) { @@ -239,40 +257,3 @@ export default createPaginationContainer( `, } ) - -interface RelayProps { - me: { - conversation: { - id: string - __id: string - to: { - name: string - initials: string - } - from: { - name: string - email: string - initials: string - } - initial_message: string - messages: { - pageInfo?: { - hasNextPage: boolean - } - edges: Array<{ - cursor: string - node: { - __id: string - impulse_id: string - is_from_user: boolean - body: string - attachments: any - } | null - }> - } - items: Array<{ - item: any - }> - } - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx index 6319f92066..1cdbef74ca 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/ArtworkPreview.tsx @@ -12,6 +12,8 @@ import { Colors } from "lib/data/colors" import { Fonts } from "lib/data/fonts" import styled from "styled-components/native" +import { ArtworkPreview_artwork } from "__generated__/ArtworkPreview_artwork.graphql" + const Container = styled.View` border-width: 1; border-color: ${Colors.GrayRegular}; @@ -50,14 +52,15 @@ const TitleAndDate = styled.View` flex-direction: row; justify-content: flex-start; ` -interface Props extends RelayProps { +interface Props { + artwork: ArtworkPreview_artwork onSelected?: () => void } const track: Track = _track @track() -export class ArtworkPreview extends React.Component { +export class ArtworkPreview extends React.Component { @track(props => ({ action_type: Schema.ActionTypes.Tap, action_name: Schema.ActionNames.ConversationAttachmentArtwork, @@ -110,16 +113,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artwork: { - id: string | null - _id: string | null - title: string | null - artist_names: string | null - date: string | null - image: { - url: string | null - } | null - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx index 6a11293146..c920fea45d 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/AttachmentPreview.tsx @@ -6,6 +6,8 @@ import styled from "styled-components/native" import colors from "lib/data/colors" +import { AttachmentPreview_attachment } from "__generated__/AttachmentPreview_attachment.graphql" + const Container = styled.View` flex-direction: row; ` @@ -18,9 +20,11 @@ export interface AttachmentProps { onSelected?: (attachmentID: string) => void } -interface Props extends AttachmentProps, RelayProps {} +interface Props extends AttachmentProps { + attachment: AttachmentPreview_attachment +} -export class AttachmentPreview extends React.Component { +export class AttachmentPreview extends React.Component { render() { const { attachment, children, onSelected } = this.props return ( @@ -42,9 +46,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - attachment: { - id: string - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx index 492ce77109..d8155e6927 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/ImagePreview.tsx @@ -5,12 +5,16 @@ import styled from "styled-components/native" import OpaqueImageView from "lib/Components/OpaqueImageView" import AttachmentPreview, { AttachmentProps } from "./AttachmentPreview" +import { ImagePreview_attachment } from "__generated__/ImagePreview_attachment.graphql" + const Image = styled(OpaqueImageView)` height: 150; flex: 1; ` -interface Props extends AttachmentProps, RelayProps {} +interface Props extends AttachmentProps { + attachment: ImagePreview_attachment +} export const ImagePreview: React.SFC = ({ attachment, onSelected }) => ( @@ -27,9 +31,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - attachment: { - download_url?: string - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx index 293c058615..69f289036a 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/Attachment/PDFPreview.tsx @@ -7,6 +7,8 @@ import colors from "lib/data/colors" import AttachmentPreview, { AttachmentProps } from "./AttachmentPreview" +import { PDFPreview_attachment } from "__generated__/PDFPreview_attachment.graphql" + const Container = styled.View` border-width: 1; border-color: ${colors["gray-regular"]}; @@ -29,7 +31,9 @@ const Icon = styled(Image)` margin-bottom: 12; ` -interface Props extends AttachmentProps, RelayProps {} +interface Props extends AttachmentProps { + attachment: PDFPreview_attachment +} export const PDFPreview: React.SFC = ({ attachment, onSelected }) => ( @@ -51,9 +55,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - attachment: { - file_name?: string - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx index 6076a965ab..d214b9f48a 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/InvoicePreview.tsx @@ -11,6 +11,8 @@ import { NotificationsManager, PaymentRequestPaidNotification } from "lib/Native import { Schema, Track, track as _track } from "../../../../utils/track" +import { InvoicePreview_invoice } from "__generated__/InvoicePreview_invoice.graphql" + const Container = styled.View` border-width: 1; border-color: ${colors["gray-regular"]}; @@ -65,10 +67,11 @@ const CostLabel = styled(PaymentRequest)` font-weight: bold; ` -export interface Props extends RelayProps { +export interface Props { + invoice: InvoicePreview_invoice + relay: RelayRefetchProp onSelected: () => void conversationId: string - relay?: RelayRefetchProp notification?: PaymentRequestPaidNotification } @@ -187,12 +190,3 @@ export default createRefetchContainer( } ` ) - -interface RelayProps { - invoice: { - payment_url: string | null - state: "PAID" | "VOID" | "REFUNDED" | "UNPAID" | null - total: string | null - lewitt_invoice_id: string - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx b/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx index eb1732b8ae..f3076201c0 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/ShowPreview.tsx @@ -12,6 +12,8 @@ import colors from "lib/data/colors" import fonts from "lib/data/fonts" import styled from "styled-components/native" +import { ShowPreview_show } from "__generated__/ShowPreview_show.graphql" + const Container = styled.View` border-width: 1; border-color: ${colors["gray-regular"]}; @@ -47,14 +49,15 @@ const Title = styled.Text` font-size: 14; ` -interface Props extends RelayProps { +interface Props { + show: ShowPreview_show onSelected?: () => void } const track: Track = _track @track() -export class ShowPreview extends React.Component { +export class ShowPreview extends React.Component { @track(props => ({ action_type: Schema.ActionTypes.Tap, action_name: Schema.ActionNames.ConversationAttachmentShow, @@ -104,20 +107,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - show: { - id: string | null - _id: string | null - name: string | null - cover_image: { - url: string | null - } | null - fair: { - name: string | null - } | null - partner: { - name: string | null - } | null - } -} diff --git a/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx b/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx index c9082922ab..01a792b85d 100644 --- a/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/Preview/__tests__/InvoicePreview-tests.tsx @@ -1,22 +1,18 @@ import React from "react" import * as renderer from "react-test-renderer" -import { InvoicePreview, Props } from "../InvoicePreview" +import InvoicePreview from "../InvoicePreview" describe("InvoicePreview", () => { it("renders correctly", () => { - const props: Props = { - conversationId: "420", - onSelected: () => null, - invoice: { - state: "REFUNDED", - payment_url: "https://adopt-cats.org/pay-here", - total: "$420", - lewitt_invoice_id: "420", - }, + const invoice = { + state: "REFUNDED" as "REFUNDED", + payment_url: "https://adopt-cats.org/pay-here", + total: "$420", + lewitt_invoice_id: "420", } - const tree = renderer.create() + const tree = renderer.create( null} />) expect(tree).toMatchSnapshot() }) }) diff --git a/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx b/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx index 012bb1345d..234843e676 100644 --- a/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx +++ b/src/lib/Components/Inbox/Conversations/__stories__/ConversationSnippet.story.tsx @@ -14,9 +14,7 @@ const conversation = { items: [ { item: { - __typename: "Artwork", - id: "bradley-theodore-karl-and-anna-face-off-diptych", - href: "/artwork/bradley-theodore-karl-and-anna-face-off-diptych", + __typename: "Artwork" as "Artwork", title: "Karl and Anna Face Off (Diptych)", date: "2016", artist_names: "Bradley Theodore", diff --git a/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx b/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx index d1046ace6c..9beb88f779 100644 --- a/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx +++ b/src/lib/Components/Inbox/Conversations/__stories__/Inbox.story.tsx @@ -16,7 +16,7 @@ const RootContainer: React.SFC = ({ Component }) => { return ( { }) const artwork = { - __typename: "Artwork", - id: "bradley-theodore-karl-and-anna-face-off-diptych", - href: "/artwork/bradley-theodore-karl-and-anna-face-off-diptych", + __typename: "Artwork" as "Artwork", title: "Karl and Anna Face Off (Diptych)", date: "2016", artist_names: "Bradley Theodore", image: { url: "https://d32dm0rphc51dk.cloudfront.net/bJ9I_vJX9ksaKFJAkOAIKg/normalized.jpg", - image_url: "https://d32dm0rphc51dk.cloudfront.net/bJ9I_vJX9ksaKFJAkOAIKg/:version.jpg", }, } const show = { - __typename: "Show", + __typename: "Show" as "Show", fair: { name: "Catty Fair", }, diff --git a/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx index 08840a9b85..0d1bcedefd 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/Conversations-tests.tsx @@ -25,10 +25,10 @@ describe("messaging inbox", () => { }) const meProps = { - initials: "JC", conversations: { pageInfo: { hasNextPage: false, + endCursor: null, }, edges: [ { @@ -92,10 +92,10 @@ describe("messaging inbox", () => { } const mePropsEmpty = { - initials: "JC", conversations: { pageInfo: { hasNextPage: false, + endCursor: null, }, edges: [], }, diff --git a/src/lib/Components/Inbox/Conversations/__tests__/Messages-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/Messages-tests.tsx index 65cf8c66ad..d2f057ac87 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/Messages-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/Messages-tests.tsx @@ -5,7 +5,7 @@ import * as renderer from "react-test-renderer" import Messages from "../Messages" it("looks correct when rendered", () => { - const messages = renderer.create() as any + const messages = renderer.create() expect(messages).toMatchSnapshot() }) @@ -20,6 +20,12 @@ const props = { to: { name: "Kimberly Klark", initials: "KK" }, initial_message: "Adoro! Por favor envie-me mais informações", messages: { + pageInfo: { + startCursor: null, + endCursor: null, + hasPreviousPage: false, + hasNextPage: false, + }, edges: [ { cursor: "some-cursor", @@ -41,9 +47,7 @@ const props = { }, items: [ { - title: "The Mythic Being: Sol’s Drawing #1–5", - item: { - __typename: "Artwork", + artwork: { id: "adrian-piper-the-mythic-being-sols-drawing-number-1-5", href: "/artwork/adrian-piper-the-mythic-being-sols-drawing-number-1-5", title: "The Mythic Being: Sol’s Drawing #1–5", diff --git a/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx b/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx index 3bc938e4d8..88b202c23b 100644 --- a/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx +++ b/src/lib/Components/Inbox/Conversations/__tests__/ZeroStateInbox-tests.tsx @@ -23,6 +23,7 @@ Object.keys(devices).forEach(device => { conversations: { pageInfo: { hasNextPage: false, + endCursor: null, }, edges: [], }, diff --git a/src/lib/Components/Inbox/Conversations/index.tsx b/src/lib/Components/Inbox/Conversations/index.tsx index 875b5ddf87..67b2aa5117 100644 --- a/src/lib/Components/Inbox/Conversations/index.tsx +++ b/src/lib/Components/Inbox/Conversations/index.tsx @@ -12,13 +12,16 @@ import ConversationSnippet, { Props as ConversationSnippetProps } from "./Conver import { PAGE_SIZE } from "lib/data/constants" +import { Conversations_me } from "__generated__/Conversations_me.graphql" + const Headline = styled(LargeHeadline)` margin-top: 20px; margin-bottom: -10px; ` -interface Props extends RelayProps { - relay?: RelayPaginationProp +interface Props { + me: Conversations_me + relay: RelayPaginationProp headerView?: JSX.Element onRefresh?: () => any } @@ -73,7 +76,7 @@ export class Conversations extends Component { } } - refreshConversations = (callback: () => void) => { + refreshConversations = (callback?: () => void) => { const { relay } = this.props if (!relay.isLoading()) { @@ -126,7 +129,7 @@ export class Conversations extends Component { export default createPaginationContainer( Conversations, { - me: graphql.experimental` + me: graphql` fragment Conversations_me on Me @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String", defaultValue: "" }) { conversations(first: $count, after: $cursor) @connection(key: "Conversations_conversations") { @@ -165,7 +168,7 @@ export default createPaginationContainer( cursor, } }, - query: graphql.experimental` + query: graphql` query ConversationsQuery($count: Int!, $cursor: String) { me { ...Conversations_me @arguments(count: $count, cursor: $cursor) @@ -173,20 +176,4 @@ export default createPaginationContainer( } `, } -) as React.ComponentClass - -interface RelayProps { - me: { - conversations: { - pageInfo: { - hasNextPage: boolean - } | null - edges: Array<{ - node: { - id: string | null - last_message: string - } | null - } | null> | null - } | null - } -} +) diff --git a/src/lib/Components/RelatedArtists/RelatedArtist.tsx b/src/lib/Components/RelatedArtists/RelatedArtist.tsx index 4040c7f342..891de9e2a8 100644 --- a/src/lib/Components/RelatedArtists/RelatedArtist.tsx +++ b/src/lib/Components/RelatedArtists/RelatedArtist.tsx @@ -8,7 +8,10 @@ import fonts from "lib/data/fonts" import SwitchBoard from "lib/NativeModules/SwitchBoard" import ImageView from "../OpaqueImageView" -interface Props extends RelayProps { +import { RelatedArtist_artist } from "__generated__/RelatedArtist_artist.graphql" + +interface Props { + artist: RelatedArtist_artist imageSize: { width: number } @@ -88,17 +91,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - href: string | null - name: string | null - counts: { - for_sale_artworks: boolean | number | string | null - artworks: boolean | number | string | null - } | null - image: { - url: string | null - } | null - } -} diff --git a/src/lib/Components/RelatedArtists/__tests__/Layout-tests.tsx b/src/lib/Components/RelatedArtists/__tests__/Layout-tests.tsx index 53a7f16eee..6cc2bb701a 100644 --- a/src/lib/Components/RelatedArtists/__tests__/Layout-tests.tsx +++ b/src/lib/Components/RelatedArtists/__tests__/Layout-tests.tsx @@ -7,7 +7,7 @@ import RelatedArtists from "../" it("lays out correctly", () => { const artists = [ { - __id: 0, + __id: "artist-sarah-scott", name: "Sarah Scott", counts: { for_sale_artworks: 2, diff --git a/src/lib/Components/RelatedArtists/index.tsx b/src/lib/Components/RelatedArtists/index.tsx index 87b4ad59e7..e649a275d0 100644 --- a/src/lib/Components/RelatedArtists/index.tsx +++ b/src/lib/Components/RelatedArtists/index.tsx @@ -1,11 +1,17 @@ import React from "react" import { createFragmentContainer, graphql } from "react-relay" -import { LayoutChangeEvent, StyleSheet, TextStyle, View, ViewProperties, ViewStyle } from "react-native" +import { LayoutChangeEvent, StyleSheet, TextStyle, View, ViewStyle } from "react-native" import SerifText from "../Text/Serif" import RelatedArtist from "./RelatedArtist" +import { RelatedArtists_artists } from "__generated__/RelatedArtists_artists.graphql" + +interface Props { + artists: RelatedArtists_artists +} + interface State { columns: number imageSize: { @@ -14,16 +20,13 @@ interface State { } } -class RelatedArtists extends React.Component { - constructor(props) { - super(props) - this.state = { - columns: 0, - imageSize: { - width: 1, - height: 1, - }, - } +class RelatedArtists extends React.Component { + state = { + columns: 0, + imageSize: { + width: 1, + height: 1, + }, } layoutState(currentLayout): State { @@ -66,7 +69,7 @@ class RelatedArtists extends React.Component renderArtists() { const artists = this.props.artists const artistViews = artists.map(artist => { - return + return }) const numberOfTrailingViews = artists.length % this.state.columns @@ -114,18 +117,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artists: Array<{ - __id: string - href: string | null - name: string | null - counts: { - for_sale_artworks: boolean | number | string | null - artworks: boolean | number | string | null - } | null - image: { - url: string | null - } | null - } | null> | null -} diff --git a/src/lib/Components/Sale/Header.tsx b/src/lib/Components/Sale/Header.tsx index 71576b8e51..78a0f1cfca 100644 --- a/src/lib/Components/Sale/Header.tsx +++ b/src/lib/Components/Sale/Header.tsx @@ -4,12 +4,14 @@ import { createFragmentContainer, graphql } from "react-relay" import OpaqueImageView from "../OpaqueImageView" import Headline from "../Text/Headline" -class Header extends React.Component { - constructor(props) { - super(props) - this.state = {} - } +import { Header_sale } from "__generated__/Header_sale.graphql" + +interface Props { + sale: Header_sale + showImage: boolean +} +class Header extends React.Component { render() { const { width, height } = Dimensions.get("window") const sale = this.props.sale @@ -36,6 +38,7 @@ export default createFragmentContainer( Header, graphql` fragment Header_sale on Sale { + name cover_image { href } @@ -64,12 +67,3 @@ const styles = StyleSheet.create({ fontSize: isPad ? 20 : 14, }, }) - -interface RelayProps { - sale: { - _id: string - id: string - name: string | null - } - showImage: boolean -} diff --git a/src/lib/Components/Sale/__tests__/Header-tests.tsx b/src/lib/Components/Sale/__tests__/Header-tests.tsx index 9c30f374c3..85dc675d6e 100644 --- a/src/lib/Components/Sale/__tests__/Header-tests.tsx +++ b/src/lib/Components/Sale/__tests__/Header-tests.tsx @@ -6,7 +6,10 @@ import Header from "../Header" it("renders properly", () => { const sale = { name: "The Awesome Sale", + cover_image: { + href: "http://example.com/some/image.jpg", + }, } - const header = renderer.create(
).toJSON() + const header = renderer.create(
).toJSON() expect(header).toMatchSnapshot() }) diff --git a/src/lib/Components/WorksForYou/Notification.tsx b/src/lib/Components/WorksForYou/Notification.tsx index f738680034..e15485bc03 100644 --- a/src/lib/Components/WorksForYou/Notification.tsx +++ b/src/lib/Components/WorksForYou/Notification.tsx @@ -9,14 +9,19 @@ import SerifText from "../Text/Serif" import colors from "lib/data/colors" -export class Notification extends React.Component { +import { Notification_notification } from "__generated__/Notification_notification.graphql" + +interface Props { + // Special notifications will pass down an artistHref. Otherwise, grab it from the artworks. + notification: Notification_notification & { artistHref?: string } +} + +export class Notification extends React.Component { handleArtistTap() { - // Special notifications will pass down an artistHref. Otherwise, grab it from the artworks const artistHref = this.props.notification.artistHref || this.props.notification.artworks[0].artists[0].href - if (!artistHref) { - return + if (artistHref) { + SwitchBoard.presentNavigationViewController(this, artistHref) } - SwitchBoard.presentNavigationViewController(this, artistHref) } render() { @@ -41,7 +46,7 @@ export class Notification extends React.Component { - + ) @@ -113,17 +118,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - notification: { - summary: string - artists: string - artworks: any[] - image: { - resized: { - url: string - } - } | null - artistHref?: string | null - } -} diff --git a/src/lib/Components/WorksForYou/__tests__/Notification-tests.tsx b/src/lib/Components/WorksForYou/__tests__/Notification-tests.tsx index df25c1ef01..59599880a7 100644 --- a/src/lib/Components/WorksForYou/__tests__/Notification-tests.tsx +++ b/src/lib/Components/WorksForYou/__tests__/Notification-tests.tsx @@ -6,7 +6,7 @@ import { Notification } from "../Notification" it("lays out correctly for unread notification", () => { const props = notification() - const component = renderWithLayout(, { width: 768 }) + const component = renderWithLayout(, { width: 768 }) expect(component).toMatchSnapshot() }) @@ -14,7 +14,7 @@ it("lays out correctly for unread notification", () => { it("lays out correctly for read notification", () => { const props = notification() props.status = "READ" - const component = renderWithLayout(, { width: 768 }) + const component = renderWithLayout(, { width: 768 }) expect(component).toMatchSnapshot() }) @@ -22,7 +22,7 @@ it("lays out correctly for read notification", () => { it("does not show artist avatar if no avatar image exists", () => { const props = notification() props.image.resized.url = null - const component = renderWithLayout(, { width: 300 }) + const component = renderWithLayout(, { width: 300 }) expect(component).toMatchSnapshot() }) diff --git a/src/lib/Containers/Artist.tsx b/src/lib/Containers/Artist.tsx index 126eb664d2..9dc73010d7 100644 --- a/src/lib/Containers/Artist.tsx +++ b/src/lib/Containers/Artist.tsx @@ -12,6 +12,8 @@ import { SwitchEvent } from "lib/Components/SwitchView" import TabView from "lib/Components/TabView" import { Schema, Track, track as _track } from "lib/utils/track" +import { Artist_artist } from "__generated__/Artist_artist.graphql" + const isPad = Dimensions.get("window").width > 700 const TABS = { @@ -20,8 +22,9 @@ const TABS = { SHOWS: "SHOWS", } -// tslint:disable-next-line:no-empty-interface -interface Props extends RelayProps {} +interface Props extends ViewProperties { + artist: Artist_artist +} interface State { selectedTabIndex: number @@ -31,7 +34,7 @@ interface State { const track: Track = _track @track() -export class Artist extends Component { +export class Artist extends Component { componentWillMount() { const tabs = this.availableTabs() const worksTab = tabs.indexOf(TABS.WORKS) @@ -93,11 +96,11 @@ export class Artist extends Component { renderSelectedTab = () => { switch (this.selectedTabTitle()) { case TABS.ABOUT: - return + return case TABS.WORKS: - return + return case TABS.SHOWS: - return + return } } @@ -126,7 +129,7 @@ export class Artist extends Component { return ( -
+
{displayTabView ? this.renderTabView() : this.renderSingleTab()} @@ -167,28 +170,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artist: { - _id: string | null - id: string | null - birthday: string | null - counts: { - articles: boolean | number | string | null - artworks: boolean | number | string | null - follows: boolean | number | string | null - partner_shows: boolean | number | string | null - related_artists: boolean | number | string | null - for_sale_artworks: boolean | number | string | null - } | null - has_metadata: boolean | null - name: string | null - nationality: string | null - current_shows: Array | null - upcoming_shows: Array | null - past_small_shows: Array | null - past_large_shows: Array<{ - __id: string | null - }> | null - } -} diff --git a/src/lib/Containers/Conversation.tsx b/src/lib/Containers/Conversation.tsx index e9250ba2f4..5f3bb5ee95 100644 --- a/src/lib/Containers/Conversation.tsx +++ b/src/lib/Containers/Conversation.tsx @@ -17,6 +17,8 @@ import { sendConversationMessage } from "../Components/Inbox/Conversations/SendC import { updateConversation } from "../Components/Inbox/Conversations/UpdateConversation" +import { Conversation_me } from "__generated__/Conversation_me.graphql" + const Container = styled.View` flex: 1; flex-direction: column; @@ -36,8 +38,9 @@ const HeaderTextContainer = styled.View` justify-content: center; ` -interface Props extends RelayProps { - relay?: RelayPaginationProp +interface Props { + me: Conversation_me + relay: RelayPaginationProp onMessageSent?: (text: string) => void } @@ -46,7 +49,7 @@ interface State { isConnected: boolean markedMessageAsRead: boolean fetchingData: boolean - failedMessageText?: string + failedMessageText: string | null } const track: Track = _track @@ -55,17 +58,13 @@ const track: Track = _track export class Conversation extends React.Component { composer: Composer - constructor(props) { - super(props) - - // Assume if the component loads, connection exists (this way the banner won't flash unnecessarily) - this.state = { - sendingMessage: false, - isConnected: true, - markedMessageAsRead: false, - fetchingData: false, - } - this.handleConnectivityChange = this.handleConnectivityChange.bind(this) + // Assume if the component loads, connection exists (this way the banner won't flash unnecessarily) + state = { + sendingMessage: false, + isConnected: true, + markedMessageAsRead: false, + fetchingData: false, + failedMessageText: null, } componentDidMount() { @@ -77,7 +76,7 @@ export class Conversation extends React.Component { NetInfo.isConnected.removeEventListener("connectionChange", this.handleConnectivityChange) } - handleConnectivityChange(isConnected) { + handleConnectivityChange = isConnected => { this.setState({ isConnected }) } @@ -189,22 +188,3 @@ export default createFragmentContainer(Conversation, { } `, }) - -interface RelayProps { - me: { - conversation: { - id: string - __id: string - to: { - name: string - initials: string - } - from: { - email: string - } - last_message_id: string - initial_message: string - unread: boolean - } - } -} diff --git a/src/lib/Containers/Gene.tsx b/src/lib/Containers/Gene.tsx index 3f1d4ad7e8..8c36c7d2ec 100644 --- a/src/lib/Containers/Gene.tsx +++ b/src/lib/Containers/Gene.tsx @@ -349,7 +349,7 @@ const styles = StyleSheet.create({ export default createRefetchContainer( Gene, - graphql.experimental` + graphql` fragment Gene_gene on Gene @argumentDefinitions( sort: { type: "String", defaultValue: "-partner_updated_at" } @@ -380,7 +380,7 @@ export default createRefetchContainer( } } `, - graphql.experimental` + graphql` query GeneRefetchQuery($geneID: String!, $sort: String, $medium: String, $price_range: String) { gene(id: $geneID) { ...Gene_gene @arguments(sort: $sort, medium: $medium, price_range: $price_range) diff --git a/src/lib/Containers/Inbox.tsx b/src/lib/Containers/Inbox.tsx index bc4726e65d..3b472f8c5c 100644 --- a/src/lib/Containers/Inbox.tsx +++ b/src/lib/Containers/Inbox.tsx @@ -2,13 +2,16 @@ import React from "react" import { createRefetchContainer, graphql, RelayRefetchProp } from "react-relay" import styled from "styled-components/native" -import ActiveBids from "lib/Components/Inbox/ActiveBids" -import Conversations from "lib/Components/Inbox/Conversations" +import ActiveBids, { ActiveBids as ActiveBidsRef } from "lib/Components/Inbox/ActiveBids" +import Conversations, { Conversations as ConversationsRef } from "lib/Components/Inbox/Conversations" import ZeroStateInbox from "lib/Components/Inbox/Conversations/ZeroStateInbox" import { RefreshControl } from "react-native" -interface Props extends RelayProps { - relay?: RelayRefetchProp +import { Inbox_me } from "__generated__/Inbox_me.graphql" + +interface Props { + me: Inbox_me + relay: RelayRefetchProp isVisible: boolean } @@ -21,17 +24,11 @@ const Container = styled.ScrollView` ` export class Inbox extends React.Component { - conversations: any - activeBids: any - - constructor(props) { - super(props) - - this.state = { - fetchingData: false, - } + conversations: ConversationsRef + activeBids: ActiveBidsRef - this.fetchData = this.fetchData.bind(this) + state = { + fetchingData: false, } componentWillReceiveProps(newProps) { @@ -40,7 +37,7 @@ export class Inbox extends React.Component { } } - fetchData() { + fetchData = () => { if (this.state.fetchingData) { return } @@ -49,9 +46,8 @@ export class Inbox extends React.Component { if (this.activeBids && this.conversations) { // Allow Conversations & Active Bids to properly force-fetch themselves. - // The stored refs are the Relay containers; the components themselves are nested under as refs. - this.activeBids.refs.component.refreshActiveBids() - this.conversations.refs.component.refreshConversations(() => { + this.activeBids.refreshActiveBids() + this.conversations.refreshConversations(() => { this.setState({ fetchingData: false }) }) } else { @@ -65,10 +61,11 @@ export class Inbox extends React.Component { const hasBids = this.props.me.lot_standings.length > 0 const hasConversations = this.props.me.conversations_existence_check && this.props.me.conversations_existence_check.edges.length > 0 + // TODO: Pretty sure I’ve seen that Relay containers have a ‘component ref’ property, we should be using that. return hasBids || hasConversations ? ( }> - (this.activeBids = activeBids)} /> - (this.conversations = conversations)} /> + (this.activeBids = activeBids)} /> + (this.conversations = conversations)} /> ) : ( @@ -117,20 +114,3 @@ export default createRefetchContainer( } ` ) - -interface RelayProps { - me: { - lot_standings: Array<{ - active_bid: { - __id: string - } | null - } | null> | null - conversations_existence_check: { - edges: Array<{ - node: { - id: string | null - } | null - } | null> | null - } | null - } -} diff --git a/src/lib/Containers/Inquiry.tsx b/src/lib/Containers/Inquiry.tsx index b73be601ca..d5502300d2 100644 --- a/src/lib/Containers/Inquiry.tsx +++ b/src/lib/Containers/Inquiry.tsx @@ -16,6 +16,8 @@ import ARSwitchBoard from "../NativeModules/SwitchBoard" import { gravityURL } from "../relay/config" import { NetworkError } from "../utils/errors" +import { Inquiry_artwork } from "__generated__/Inquiry_artwork.graphql" + const isPad = Dimensions.get("window").width > 700 const Container = styled.View` @@ -85,16 +87,20 @@ const ResponseRateLine = styled.View` margin-top: 5; ` +interface Props { + artwork: Inquiry_artwork +} + interface State { text: string sending: boolean } -const track: Track = _track +const track: Track = _track @track() -export class Inquiry extends React.Component { - constructor(props) { +export class Inquiry extends React.Component { + constructor(props: Props) { super(props) this.state = { text: this.props.artwork.contact_message, @@ -221,7 +227,7 @@ export class Inquiry extends React.Component { multiline={true} autoFocus={typeof jest === "undefined" /* TODO: https://github.com/facebook/jest/issues/3707 */} onEndEditing={() => { - this.setState({ active: false, text: null }) + this.setState({ text: null }) }} onChangeText={text => this.setState({ text })} /> @@ -236,6 +242,7 @@ export default createFragmentContainer( Inquiry, graphql` fragment Inquiry_artwork on Artwork { + _id id contact_message partner { @@ -245,14 +252,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - artwork: { - _id: string - id: string - contact_message: string - partner: { - name: string - } - } -} diff --git a/src/lib/Containers/Sale.tsx b/src/lib/Containers/Sale.tsx index d87ab1b585..1fabdee983 100644 --- a/src/lib/Containers/Sale.tsx +++ b/src/lib/Containers/Sale.tsx @@ -68,7 +68,7 @@ export class Sale extends React.Component { const commonPadding = this.commonPadding return ( -
+
) } @@ -158,7 +158,7 @@ const styles = StyleSheet.create({ export default createRefetchContainer( Sale, - graphql.experimental` + graphql` fragment Sale_sale on Sale { id name @@ -166,7 +166,7 @@ export default createRefetchContainer( ...SaleArtworksGrid_sale } `, - graphql.experimental` + graphql` query SaleRefetchQuery($saleID: String!) { sale(id: $saleID) { ...Sale_sale diff --git a/src/lib/Containers/WorksForYou.tsx b/src/lib/Containers/WorksForYou.tsx index 153cdb24e9..3fdfc08537 100644 --- a/src/lib/Containers/WorksForYou.tsx +++ b/src/lib/Containers/WorksForYou.tsx @@ -22,8 +22,11 @@ import Notification from "lib/Components/WorksForYou/Notification" import colors from "lib/data/colors" import { isCloseToBottom } from "lib/utils/isCloseToBottom" -interface Props extends RelayProps { - relay?: RelayPaginationProp +import { WorksForYou_viewer } from "__generated__/WorksForYou_viewer.graphql" + +interface Props { + relay: RelayPaginationProp + viewer: WorksForYou_viewer } interface State { @@ -72,6 +75,8 @@ export class WorksForYou extends React.Component { const artist = this.props.viewer.selectedArtist return { + // This is just some unique ID, don’t rely on MP being able to retrieve a notification by this ID. + __id: `notification-${artist.id}`, message: artist.artworks.length + (artist.artworks.length > 1 ? " Works Added" : " Work Added"), artists: artist.name, artworks: artist.artworks, @@ -183,7 +188,7 @@ const styles = StyleSheet.create({ const WorksForYouContainer = createPaginationContainer( WorksForYou, { - viewer: graphql.experimental` + viewer: graphql` fragment WorksForYou_viewer on Viewer @argumentDefinitions( count: { type: "Int", defaultValue: 10 } @@ -209,6 +214,7 @@ const WorksForYouContainer = createPaginationContainer( } } selectedArtist: artist(id: $selectedArtist) { + id href name image { @@ -243,7 +249,7 @@ const WorksForYouContainer = createPaginationContainer( cursor, } }, - query: graphql.experimental` + query: graphql` query WorksForYouQuery($count: Int!, $cursor: String) { viewer { ...WorksForYou_viewer @arguments(count: $count, cursor: $cursor) @@ -254,30 +260,3 @@ const WorksForYouContainer = createPaginationContainer( ) export default WorksForYouContainer - -interface RelayProps { - viewer: { - me: { - followsAndSaves: { - notifications: { - pageInfo: { - hasNextPage: boolean - } - edges: Array<{ - node: any | null - }> - } - } - } - selectedArtist?: { - name: string - image: { - resized: { - url: string - } - } | null - artworks: any[] - href: string - } | null - } -} diff --git a/src/lib/Containers/__tests__/Conversation-tests.tsx b/src/lib/Containers/__tests__/Conversation-tests.tsx index db761f5aaa..649087a529 100644 --- a/src/lib/Containers/__tests__/Conversation-tests.tsx +++ b/src/lib/Containers/__tests__/Conversation-tests.tsx @@ -78,6 +78,7 @@ it("sends message when composer is submitted", async () => { const props = { initials: "JC", conversation: { + __id: "conversation-420", id: "420", from: { name: "Anita Garibaldi", @@ -85,7 +86,9 @@ const props = { initials: "AG", }, to: { name: "Kimberly Klark", initials: "KK" }, + unread: false, initial_message: "Adoro! Por favor envie-me mais informações", + last_message_id: "222", messages: { edges: [ { diff --git a/src/lib/Containers/__tests__/Inbox-tests.tsx b/src/lib/Containers/__tests__/Inbox-tests.tsx index 8d52373e39..30113c2e29 100644 --- a/src/lib/Containers/__tests__/Inbox-tests.tsx +++ b/src/lib/Containers/__tests__/Inbox-tests.tsx @@ -1,5 +1,6 @@ import React from "react" import "react-native" +import { Environment } from "relay-runtime" import { renderWithLayout } from "lib/tests/renderWithLayout" import * as renderer from "react-test-renderer" @@ -14,7 +15,7 @@ const emptyMeProps = { } it("renders correctly", () => { - const tree = renderer.create().toJSON() + const tree = renderer.create().toJSON() expect(tree).toMatchSnapshot() }) @@ -26,15 +27,19 @@ it("shows empty state if there's no data", () => { }) it("Shows a zero state when there are no bids/conversations", () => { - const tree = JSON.stringify(renderWithLayout(, { width: 768, height: 1024 })) + const tree = JSON.stringify( + renderWithLayout(, { width: 768, height: 1024 }) + ) // Taken from the title in ZeroStateInbox expect(tree).toContain("BUYING ART ON ARTSY IS SIMPLE") }) it("It requests a relay refetch when fetchData is called in ZeroState", () => { const relayEmptyProps = { - ...emptyMeProps, + me: emptyMeProps, + isVisible: true, relay: { + environment: null as Environment, refetch: jest.fn(), }, } diff --git a/src/lib/Containers/__tests__/Inquiry-tests.tsx b/src/lib/Containers/__tests__/Inquiry-tests.tsx index a0b89eed94..20b16f8552 100644 --- a/src/lib/Containers/__tests__/Inquiry-tests.tsx +++ b/src/lib/Containers/__tests__/Inquiry-tests.tsx @@ -9,6 +9,7 @@ it("renders correctly", () => { }) const inquiryProps = { + _id: "gravity-id", id: "bradley-theodore-karl-and-anna-face-off-diptych", contact_message: "Hi, I'm interested in purchasing this work. Could you please provide me with more information about the piece?", diff --git a/src/lib/Containers/__tests__/WorksForYou-tests.tsx b/src/lib/Containers/__tests__/WorksForYou-tests.tsx index f1a0a3c4b9..ef08cfbd50 100644 --- a/src/lib/Containers/__tests__/WorksForYou-tests.tsx +++ b/src/lib/Containers/__tests__/WorksForYou-tests.tsx @@ -14,25 +14,25 @@ beforeAll(() => { describe("with notifications", () => { it("creates a ListViewDataSource upon instantiation", () => { - const worksForYou = new WorksForYou(notificationsResponse()) + const worksForYou = new WorksForYou(notificationsResponse() as any) expect(worksForYou.state.dataSource).toBeTruthy() }) it("updates the notification count", () => { const viewer = notificationsResponse().viewer - renderer.create().toJSON() + renderer.create().toJSON() expect(NativeModules.ARTemporaryAPIModule.markNotificationsRead).toBeCalled() }) it("lays out correctly on small screens", () => { const viewer = notificationsResponse().viewer - const component = renderWithLayout(, { width: 100 }) + const component = renderWithLayout(, { width: 100 }) expect(component).toMatchSnapshot() }) it("lays out correctly on larger screens", () => { const viewer = notificationsResponse().viewer - const component = renderWithLayout(, { width: 700 }) + const component = renderWithLayout(, { width: 700 }) expect(component).toMatchSnapshot() }) }) @@ -40,8 +40,9 @@ describe("with notifications", () => { describe("when it has a special notification", () => { it("properly formats it and adds it to the top of the dataSource blob", () => { const response = selectedArtistResponse() - const worksForYou = new WorksForYou(response) + const worksForYou = new WorksForYou(response as any) const expectedFormattedNotification = { + __id: "notification-juliana-huxtable", message: "1 Work Added", artists: "Juliana Huxtable", artworks: selectedArtistResponse().viewer.selectedArtist.artworks, @@ -58,19 +59,19 @@ describe("when it has a special notification", () => { describe("without notifications", () => { it("does not create a ListViewDataSource", () => { - const worksForYou = new WorksForYou(emptyStateResponse()) + const worksForYou = new WorksForYou(emptyStateResponse() as any) expect(worksForYou.state.dataSource).toBeFalsy() }) it("lays out correctly on small screens", () => { const viewer = emptyStateResponse().viewer - const component = renderWithLayout(, { width: 100 }) + const component = renderWithLayout(, { width: 100 }) expect(component).toMatchSnapshot() }) it("lays out correctly on larger screens", () => { const viewer = emptyStateResponse().viewer - const component = renderWithLayout(, { width: 700 }) + const component = renderWithLayout(, { width: 700 }) expect(component).toMatchSnapshot() }) }) @@ -82,6 +83,7 @@ interface NotificationsResponse { notifications: { pageInfo: { hasNextPage: boolean + endCursor: string } edges: Array<{ node: { @@ -111,6 +113,7 @@ const notificationsResponse = () => { notifications: { pageInfo: { hasNextPage: true, + endCursor: null, }, edges: [ { @@ -166,6 +169,7 @@ const selectedArtistResponse = () => { { const response = notificationsResponse() response.viewer.selectedArtist = { + id: "juliana-huxtable", name: "Juliana Huxtable", href: "artist/juliana-huxtable", image: { diff --git a/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap b/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap index 44b4e59841..36b9eff2ce 100644 --- a/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap +++ b/src/lib/Containers/__tests__/__snapshots__/Conversation-tests.tsx.snap @@ -8,6 +8,7 @@ ShallowWrapper { me={ Object { "conversation": Object { + "__id": "conversation-420", "from": Object { "email": "anita@garibaldi.br", "initials": "AG", @@ -32,6 +33,7 @@ ShallowWrapper { "title": "The Mythic Being: Sol’s Drawing #1–5", }, ], + "last_message_id": "222", "messages": Object { "edges": Array [ Object { @@ -53,6 +55,7 @@ ShallowWrapper { "initials": "KK", "name": "Kimberly Klark", }, + "unread": false, }, "initials": "JC", } @@ -94,6 +97,7 @@ ShallowWrapper { , "disabled": false, "onSubmit": [Function], - "value": undefined, + "value": null, }, "ref": [Function], "rendered": Object { @@ -173,6 +179,7 @@ ShallowWrapper { , "disabled": false, "onSubmit": [Function], - "value": undefined, + "value": null, }, "ref": [Function], "rendered": Object { @@ -460,6 +475,7 @@ ShallowWrapper { , "disabled": false, "onSubmit": [Function], - "value": undefined, + "value": null, }, "ref": [Function], "rendered": Object { @@ -828,6 +855,7 @@ ShallowWrapper { , "disabled": false, "onSubmit": [Function], - "value": undefined, + "value": null, }, "ref": [Function], "rendered": Object { @@ -1115,6 +1151,7 @@ ShallowWrapper { diff --git a/src/lib/Scenes/Favorites/Components/Artists/index.tsx b/src/lib/Scenes/Favorites/Components/Artists/index.tsx index 6d26dca048..67fce32ad4 100644 --- a/src/lib/Scenes/Favorites/Components/Artists/index.tsx +++ b/src/lib/Scenes/Favorites/Components/Artists/index.tsx @@ -1,6 +1,6 @@ import React from "react" import { FlatList } from "react-native" -import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" +import { ConnectionData, createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" import SavedItemRow from "lib/Components/Lists/SavedItemRow" import Spinner from "lib/Components/Spinner" @@ -8,11 +8,18 @@ import ZeroState from "lib/Components/States/ZeroState" import { PAGE_SIZE } from "lib/data/constants" +import { Artists_me } from "__generated__/Artists_me.graphql" + +interface Props { + me: Artists_me + relay: RelayPaginationProp +} + interface State { fetchingMoreData: boolean } -class Artists extends React.Component { +class Artists extends React.Component { state = { fetchingMoreData: false, } @@ -59,10 +66,10 @@ class Artists extends React.Component { } } -export default createPaginationContainer( +export default createPaginationContainer( Artists, { - me: graphql.experimental` + me: graphql` fragment Artists_me on Me @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String" }) { followed_artists_connection(first: $count, after: $cursor) @@ -91,7 +98,7 @@ export default createPaginationContainer( { direction: "forward", getConnectionFromProps(props) { - return props.me && props.me.followed_artists_connection + return props.me && (props.me.followed_artists_connection as ConnectionData) }, getFragmentVariables(prevVars, totalCount) { return { @@ -102,7 +109,7 @@ export default createPaginationContainer( getVariables(_props, pageInfo, _fragmentVariables) { return pageInfo }, - query: graphql.experimental` + query: graphql` query ArtistsMeQuery($count: Int!, $cursor: String) { me { ...Artists_me @arguments(count: $count, cursor: $cursor) @@ -111,12 +118,3 @@ export default createPaginationContainer( `, } ) - -interface RelayProps { - relay?: RelayPaginationProp - me: { - followed_artists_connection: { - edges: any[] - } | null - } | null -} diff --git a/src/lib/Scenes/Favorites/Components/Artworks/Relay/ArtworksRenderer.tsx b/src/lib/Scenes/Favorites/Components/Artworks/Relay/ArtworksRenderer.tsx index edfe63555b..94b8f0a3ce 100644 --- a/src/lib/Scenes/Favorites/Components/Artworks/Relay/ArtworksRenderer.tsx +++ b/src/lib/Scenes/Favorites/Components/Artworks/Relay/ArtworksRenderer.tsx @@ -8,7 +8,7 @@ export default ({ render }) => { return ( void } @@ -62,7 +65,7 @@ export class SavedWorks extends Component { style={{ flex: 1 }} contentContainerStyle={{ padding: 20 }} > - + ) } @@ -71,7 +74,7 @@ export class SavedWorks extends Component { export default createPaginationContainer( SavedWorks, { - me: graphql.experimental` + me: graphql` fragment Artworks_me on Me @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String", defaultValue: "" }) { saved_artworks { @@ -94,7 +97,7 @@ export default createPaginationContainer( { direction: "forward", getConnectionFromProps(props) { - return props.me && props.me.saved_artworks.artworks_connection + return props.me && (props.me.saved_artworks.artworks_connection as ConnectionData) }, getFragmentVariables(prevVars, totalCount) { return { @@ -109,7 +112,7 @@ export default createPaginationContainer( cursor, } }, - query: graphql.experimental` + query: graphql` query ArtworksQuery($count: Int!, $cursor: String) { me { ...Artworks_me @arguments(count: $count, cursor: $cursor) @@ -118,15 +121,3 @@ export default createPaginationContainer( `, } ) - -interface RelayProps { - me: { - saved_artworks: { - artworks_connection: { - edges: Array<{ - node: any | null - }> | null - } | null - } | null - } | null -} diff --git a/src/lib/Scenes/Favorites/Components/Categories/index.tsx b/src/lib/Scenes/Favorites/Components/Categories/index.tsx index c235b64c5d..0396fcba58 100644 --- a/src/lib/Scenes/Favorites/Components/Categories/index.tsx +++ b/src/lib/Scenes/Favorites/Components/Categories/index.tsx @@ -1,17 +1,24 @@ import React from "react" import { FlatList } from "react-native" -import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" +import { ConnectionData, createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" import SavedItemRow from "lib/Components/Lists/SavedItemRow" import Spinner from "lib/Components/Spinner" import ZeroState from "lib/Components/States/ZeroState" import { PAGE_SIZE } from "lib/data/constants" +import { Categories_me } from "__generated__/Categories_me.graphql" + +interface Props { + me: Categories_me + relay: RelayPaginationProp +} + interface State { fetchingMoreData: boolean } -export class Categories extends React.Component { +export class Categories extends React.Component { state = { fetchingMoreData: false, } @@ -58,10 +65,10 @@ export class Categories extends React.Component { } } -export default createPaginationContainer( +export default createPaginationContainer( Categories, { - me: graphql.experimental` + me: graphql` fragment Categories_me on Me @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String" }) { followed_genes(first: $count, after: $cursor) @connection(key: "Categories_followed_genes") { @@ -89,7 +96,7 @@ export default createPaginationContainer( { direction: "forward", getConnectionFromProps(props) { - return props.me && props.me.followed_genes + return props.me && (props.me.followed_genes as ConnectionData) }, getFragmentVariables(prevVars, totalCount) { return { @@ -100,7 +107,7 @@ export default createPaginationContainer( getVariables(_props, pageInfo, _fragmentVariables) { return pageInfo }, - query: graphql.experimental` + query: graphql` query CategoriesMeQuery($count: Int!, $cursor: String) { me { ...Categories_me @arguments(count: $count, cursor: $cursor) @@ -109,12 +116,3 @@ export default createPaginationContainer( `, } ) - -interface RelayProps { - relay?: RelayPaginationProp - me: { - followed_genes: { - edges: any[] | null - } | null - } | null -} diff --git a/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarousel.tsx b/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarousel.tsx index 92582169c9..f31449eef2 100644 --- a/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarousel.tsx +++ b/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarousel.tsx @@ -25,6 +25,8 @@ import SwitchBoard from "lib/NativeModules/SwitchBoard" import { Disposable } from "relay-runtime" import ArtworkCarouselHeader from "./ArtworkCarouselHeader" +import { ArtworkCarousel_rail } from "__generated__/ArtworkCarousel_rail.graphql" + // tslint:disable-next-line:no-var-requires const chevron: ImageURISource = require("../../../../../../../images/chevron.png") @@ -42,9 +44,10 @@ const additionalContentRails = [ export const minRailHeight = 400 -interface Props extends ViewProperties, RelayProps { +interface Props extends ViewProperties { + rail: ArtworkCarousel_rail + relay: RelayRefetchProp registerRailModule?: (rail: ArtworkCarousel | null) => void - relay?: RelayRefetchProp } interface State { @@ -54,7 +57,7 @@ interface State { loadFailed: boolean } -export class ArtworkCarousel extends Component { +export class ArtworkCarousel extends Component { inflightRequest: Disposable state = { @@ -177,7 +180,7 @@ export class ArtworkCarousel extends Component - + ) @@ -277,7 +280,7 @@ export class ArtworkCarousel extends Component - + {this.renderModuleResults()} ) @@ -329,7 +332,7 @@ const styles = StyleSheet.create({ export default createRefetchContainer( ArtworkCarousel, - graphql.experimental` + graphql` fragment ArtworkCarousel_rail on HomePageArtworkModule @argumentDefinitions(fetchContent: { type: "Boolean!", defaultValue: false }) { ...ArtworkCarouselHeader_rail @@ -365,7 +368,7 @@ export default createRefetchContainer( } } `, - graphql.experimental` + graphql` query ArtworkCarouselRefetchQuery($__id: ID!, $fetchContent: Boolean!) { node(__id: $__id) { ...ArtworkCarousel_rail @arguments(fetchContent: $fetchContent) @@ -373,21 +376,3 @@ export default createRefetchContainer( } ` ) - -interface RelayProps { - rail: { - __id: string - key: string | null - params: { - medium: string | null - price_range: string | null - } | null - context: Array | null - results: Array | null - } -} -interface RelayPropsWorkaround { - rail: { - context: any - } -} diff --git a/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarouselHeader.tsx b/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarouselHeader.tsx index 8db19e72a4..feb3e97e61 100644 --- a/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarouselHeader.tsx +++ b/src/lib/Scenes/Home/Components/ForYou/Components/ArtworkCarouselHeader.tsx @@ -9,7 +9,6 @@ import { TextStyle, TouchableWithoutFeedback, View, - ViewProperties, ViewStyle, } from "react-native" @@ -23,6 +22,8 @@ import colors from "lib/data/colors" import fonts from "lib/data/fonts" import SectionTitle from "../../SectionTitle" +import { ArtworkCarouselHeader_rail } from "__generated__/ArtworkCarouselHeader_rail.graphql" + const isPad = Dimensions.get("window").width > 700 const additionalContentRails = [ @@ -34,7 +35,8 @@ const additionalContentRails = [ "generic_gene", ] -interface Props extends ViewProperties, RelayProps { +interface Props { + rail: ArtworkCarouselHeader_rail handleViewAll: () => void } @@ -46,7 +48,7 @@ const track: Track = _track @track() class ArtworkCarouselHeader extends Component { - constructor(props) { + constructor(props: Props) { super(props) this.state = { following: props.rail.key === "followed_artist" } } @@ -56,7 +58,7 @@ class ArtworkCarouselHeader extends Component { {this.props.rail.title} - {this.props.rail.context && this.followAnnotation()} + {this.followAnnotation()} {this.actionButton()} @@ -64,9 +66,9 @@ class ArtworkCarouselHeader extends Component { } followAnnotation() { - if (this.props.rail.context.__typename === "HomePageModuleContextRelatedArtist") { - const name = this.props.rail.context.based_on.name - return {"Based on " + name} + const context = this.props.rail.relatedArtistContext + if (context && context.based_on) { + return {`Based on ${context.based_on.name}`} } } @@ -96,15 +98,18 @@ class ArtworkCarouselHeader extends Component { } } - @track(props => ({ - action_name: Schema.ActionNames.HomeArtistArtworksBlockFollow, - action_type: Schema.ActionTypes.Tap, - owner_id: props.rail.context.artist._id, - owner_slug: props.rail.context.artist.id, - owner_type: Schema.OwnerEntityTypes.Artist, - })) + @track(props => { + const artist = props.rail.followedArtistContext.artist || props.rail.relatedArtistContext.artist + return { + action_name: Schema.ActionNames.HomeArtistArtworksBlockFollow, + action_type: Schema.ActionTypes.Tap, + owner_id: artist._id, + owner_slug: artist.id, + owner_type: Schema.OwnerEntityTypes.Artist, + } + }) handleFollowChange() { - const context = this.props.rail.context + const context = this.props.rail.followedArtistContext || this.props.rail.relatedArtistContext ARTemporaryAPIModule.setFollowArtistStatus(!this.state.following, context.artist.id, (error, following) => { if (error) { console.error("ArtworkCarouselHeader.tsx", error) @@ -156,14 +161,16 @@ export default createFragmentContainer( fragment ArtworkCarouselHeader_rail on HomePageArtworkModule { title key - context { - __typename + # This aliasing selection of the context is done to work around a type generator bug, see below. + followedArtistContext: context { ... on HomePageModuleContextFollowedArtist { artist { _id id } } + } + relatedArtistContext: context { ... on HomePageModuleContextRelatedArtist { artist { _id @@ -174,31 +181,31 @@ export default createFragmentContainer( } } } + # FIXME: There is a bug in the Relay transformer used before generating Flow types, and thus also our TS type + # generator, that leads to a union selection _with_ a __typename selection being normalized incorrectly. + # What ends up happening is that _only_ the common selection is being omitted from the second fragment, + # i.e. in this case the artist selection is not present in the second fragment. + # + # This can be seen much more clear when adding __typename to the context part in ArtworkRail.tsx. + # + # context { + # __typename + # ... on HomePageModuleContextFollowedArtist { + # artist { + # _id + # id + # } + # } + # ... on HomePageModuleContextRelatedArtist { + # artist { + # _id + # id + # } + # based_on { + # name + # } + # } + # } } ` ) - -interface RelayProps { - rail: { - title: string | null - key: string | null - context: - | { - __typename: "HomePageModuleContextFollowedArtist" - artist: { - _id: string - id: string - } - } - | { - __typename: "HomePageModuleContextRelatedArtist" - artist: { - _id: string - id: string - } - based_on: { - name: string - } - } - } -} diff --git a/src/lib/Scenes/Home/Components/ForYou/Components/FairsRail.tsx b/src/lib/Scenes/Home/Components/ForYou/Components/FairsRail.tsx index e5bbb50ef4..8b378fd549 100644 --- a/src/lib/Scenes/Home/Components/ForYou/Components/FairsRail.tsx +++ b/src/lib/Scenes/Home/Components/ForYou/Components/FairsRail.tsx @@ -8,6 +8,8 @@ import ImageView from "lib/Components/OpaqueImageView" import Switchboard from "lib/NativeModules/SwitchBoard" import SectionTitle from "lib/Scenes/Home/Components/SectionTitle" +import { FairsRail_fairs_module } from "__generated__/FairsRail_fairs_module.graphql" + const Container = styled.View` margin-bottom: 15; ` @@ -29,9 +31,10 @@ const TouchableWrapper = styled.View` margin-right: 4; ` -interface Props extends RelayProps { +interface Props { + relay: RelayRefetchProp + fairs_module: FairsRail_fairs_module registerRailModule?: (module: FairsRail | null) => void - relay?: RelayRefetchProp } export class FairsRail extends Component { @@ -124,18 +127,3 @@ export default createFragmentContainer( } ` ) -interface RelayProps { - fairs_module: { - results: Array<{ - id: string - name: string - profile: { - href: string - } | null - mobile_image: { - id: string - url: string - } | null - } | null> | null - } -} diff --git a/src/lib/Scenes/Home/Components/ForYou/index.tsx b/src/lib/Scenes/Home/Components/ForYou/index.tsx index 42a5050aae..790de20b4e 100644 --- a/src/lib/Scenes/Home/Components/ForYou/index.tsx +++ b/src/lib/Scenes/Home/Components/ForYou/index.tsx @@ -6,6 +6,12 @@ import ArtistRail, { ArtistRail as ArtistRailType } from "lib/Components/Home/Ar import ArtworkCarousel, { ArtworkCarousel as ArtworkCarouselType } from "./Components/ArtworkCarousel" import FairsRail, { FairsRail as FairsRailType } from "./Components/FairsRail" +import { ForYou_forYou } from "__generated__/ForYou_forYou.graphql" + +interface Props extends ViewProperties { + forYou: ForYou_forYou +} + interface State { rowData: Array<{ type: "artwork" | "artist" | "fairs" @@ -17,7 +23,7 @@ interface State { type RailModule = ArtistRailType | FairsRailType | ArtworkCarouselType | null -export class ForYou extends React.Component { +export class ForYou extends React.Component { currentScrollOffset?: number = 0 railModules: RailModule[] = [] @@ -119,7 +125,7 @@ export class ForYou extends React.Component case "artist": return case "fairs": - return + return } }} keyExtractor={(item, index) => item.data.type + String(index)} @@ -163,15 +169,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - forYou: { - artwork_modules: Array<{ - __id: string - } | null> | null - artist_modules: Array<{ - __id: string - } | null> | null - fairs_module: any | null - } -} diff --git a/src/lib/Scenes/Home/Components/Sales/Components/LotsByFollowedArtists.tsx b/src/lib/Scenes/Home/Components/Sales/Components/LotsByFollowedArtists.tsx index b1d77df99c..811da8e6c5 100644 --- a/src/lib/Scenes/Home/Components/Sales/Components/LotsByFollowedArtists.tsx +++ b/src/lib/Scenes/Home/Components/Sales/Components/LotsByFollowedArtists.tsx @@ -47,7 +47,7 @@ export class LotsByFollowedArtists extends Component { - + {this.state.fetchingMoreData && } @@ -57,7 +57,7 @@ export class LotsByFollowedArtists extends Component { export default createPaginationContainer( LotsByFollowedArtists, - graphql.experimental` + graphql` fragment LotsByFollowedArtists_viewer on Viewer @argumentDefinitions(count: { type: "Int", defaultValue: 10 }, cursor: { type: "String" }) { sale_artworks: sale_artworks( @@ -86,7 +86,7 @@ export default createPaginationContainer( getConnectionFromProps: ({ viewer }) => viewer && (viewer.sale_artworks as ConnectionData), getFragmentVariables: (prevVars, totalCount) => ({ ...prevVars, count: totalCount }), getVariables: (_props, { count, cursor }) => ({ count, cursor }), - query: graphql.experimental` + query: graphql` query LotsByFollowedArtistsQuery($count: Int!, $cursor: String) { viewer { ...LotsByFollowedArtists_viewer @arguments(count: $count, cursor: $cursor) diff --git a/src/lib/Scenes/Home/Components/Sales/Components/SaleListItem.tsx b/src/lib/Scenes/Home/Components/Sales/Components/SaleListItem.tsx index eb91acebfc..602bb3a80c 100644 --- a/src/lib/Scenes/Home/Components/Sales/Components/SaleListItem.tsx +++ b/src/lib/Scenes/Home/Components/Sales/Components/SaleListItem.tsx @@ -8,6 +8,8 @@ import Serif from "lib/Components/Text/Serif" import fonts from "lib/data/fonts" import Switchboard from "lib/NativeModules/SwitchBoard" +import { SaleListItem_sale } from "__generated__/SaleListItem_sale.graphql" + const Image = styled(OpaqueImageView)` position: absolute; top: 0; @@ -69,11 +71,12 @@ const Metadata = styled.Text` font-size: 10px; ` -interface Props extends RelayProps { +interface Props { + sale: SaleListItem_sale containerWidth: number } -export class SaleListItem extends React.Component { +export class SaleListItem extends React.Component { handleTap = () => { const { sale: { live_url_if_open, href } } = this.props const url = (live_url_if_open || href) as string @@ -136,22 +139,3 @@ export default createFragmentContainer(SaleListItem, { } `, }) - -interface RelayProps { - sale: { - id: string - name: string - href: string - is_open: boolean - is_live_open: boolean - live_url_if_open: boolean | null - start_at: string | null - end_at: string | null - registration_ends_at: string | null - live_start_at: string | null - display_timely_at: string | null - cover_image: { - url: string | null - } - } | null -} diff --git a/src/lib/Scenes/Home/Components/Sales/Components/__tests__/SaleListItem-tests.tsx b/src/lib/Scenes/Home/Components/Sales/Components/__tests__/SaleListItem-tests.tsx index 366aa803a5..92eb711413 100644 --- a/src/lib/Scenes/Home/Components/Sales/Components/__tests__/SaleListItem-tests.tsx +++ b/src/lib/Scenes/Home/Components/Sales/Components/__tests__/SaleListItem-tests.tsx @@ -6,7 +6,7 @@ import * as renderer from "react-test-renderer" import SaleListItem from "../SaleListItem" it("renders correctly", () => { - const sale = renderer.create() + const sale = renderer.create() expect(sale).toMatchSnapshot() }) diff --git a/src/lib/Scenes/Home/Components/Sales/Relay/SalesRenderer.tsx b/src/lib/Scenes/Home/Components/Sales/Relay/SalesRenderer.tsx index 59ce959c77..428311e2db 100644 --- a/src/lib/Scenes/Home/Components/Sales/Relay/SalesRenderer.tsx +++ b/src/lib/Scenes/Home/Components/Sales/Relay/SalesRenderer.tsx @@ -6,7 +6,7 @@ export function SalesRenderer({ render }) { return ( ( +const Header: React.SFC<{ me: MyProfile_me }> = ({ me }) => ( {me.initials} @@ -86,9 +88,11 @@ const ProfileButton = ({ section, description, isTop, onPress }) => ( ) -interface Props extends ViewProperties, RelayProps {} +interface Props extends ViewProperties { + me: MyProfile_me +} -export class MyProfile extends React.Component { +export class MyProfile extends React.Component { render() { // TODO: go to overview / implement below // const windowDimensions = Dimensions.get("window") @@ -129,10 +133,3 @@ export default createFragmentContainer( } ` ) - -interface RelayProps { - me: { - name: string | null - initials: string | null - } -} diff --git a/src/lib/relay/QueryRenderers.tsx b/src/lib/relay/QueryRenderers.tsx index d3c5f550eb..e5d4f9c399 100644 --- a/src/lib/relay/QueryRenderers.tsx +++ b/src/lib/relay/QueryRenderers.tsx @@ -65,7 +65,7 @@ export const ConversationRenderer: React.SFC = ({ ren return ( = ({ render, geneID, med return ( = ({ rende return (