From 1d0da050c3982937f6aa4a4fa5e229ae62b6d635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Wed, 31 Mar 2021 21:42:39 -0600 Subject: [PATCH] Universe: use a new Relay (Rust) Compiler --- package.json | 6 +- relay.config.js | 32 +++++++ src/abacus-backoffice/relay.config.js | 11 --- ...hButtonsAuthorizeWebappMutation.graphql.js | 33 ++++--- ...uttonsDeauthorizeWebappMutation.graphql.js | 33 +++---- .../NavigationHeaderQuery.graphql.js | 30 ++++--- .../EmployeesPageQuery.graphql.js | 30 +++---- .../__generated__/IndexPageQuery.graphql.js | 36 ++++---- .../POSCheckoutPageLayoutMutation.graphql.js | 43 ++++----- .../ProductsGridPosQuery.graphql.js | 41 ++++----- .../ProductCreateFormMutation.graphql.js | 61 ++++++------- .../ProductEditFormData.graphql.js | 24 +++-- .../ProductEditFormMutation.graphql.js | 73 ++++----------- .../ProductEditHeading.graphql.js | 20 +++-- ...roductEditHeadingDeleteMutation.graphql.js | 64 +++++++------ ...PublishUnpublishPublishMutation.graphql.js | 64 +++++++------ ...blishUnpublishUnpublishMutation.graphql.js | 64 +++++++------ .../ProductsCardsQuery.graphql.js | 45 ++++------ .../ProductsEditLayoutQuery.graphql.js | 68 ++++---------- src/abacus-kochka/package.json | 3 +- src/abacus-kochka/relay.config.js | 6 -- .../src/design/svg/__generated__/Cart.js | 24 ----- .../src/design/svg/__generated__/Facebook.js | 29 ------ .../src/design/svg/__generated__/Instagram.js | 32 ------- .../src/design/svg/__generated__/flags/mx.js | 54 ----------- .../src/design/svg/__generated__/flags/us.js | 30 ------- .../ProductPageLayoutQuery.graphql.js | 44 ++++----- .../ShopLayoutContentQuery.graphql.js | 47 ++++------ src/eslint-plugin-adeira/package.json | 2 +- src/example-relay/package.json | 1 - src/example-relay/relay.config.js | 7 -- .../__generated__/HomepageQuery.graphql.js | 90 ++++--------------- .../__generated__/Location.graphql.js | 22 +++-- .../LocationsPaginated.graphql.js | 41 +++++---- ...LocationsPaginatedBidirectional.graphql.js | 29 ++++-- ...inatedBidirectionalRefetchQuery.graphql.js | 59 ++++-------- .../LocationsPaginatedRefetch.graphql.js | 39 +++++--- .../LocationsPaginatedRefetchQuery.graphql.js | 57 ++++-------- ...onsPaginatedRefetchRefetchQuery.graphql.js | 57 ++++-------- ...ationsPaginatedRefetchTestQuery.graphql.js | 50 ++++------- .../__generated__/LocalFormQuery.graphql.js | 23 +++-- .../__generated__/PollingQuery.graphql.js | 38 ++++---- .../__generated__/LocationListItem.graphql.js | 20 +++-- .../__generated__/LocationsList.graphql.js | 22 +++-- .../__generated__/LocationsQuery.graphql.js | 46 ++++------ .../LocationsFormMutation.graphql.js | 45 ++++------ .../LocationsListSimple.graphql.js | 22 +++-- .../SimpleLocationsQuery.graphql.js | 43 ++++----- src/graphql-relay-fauna/package.json | 2 +- src/graphql-resolve-wrapper/package.json | 2 +- src/relay/package.json | 4 - .../QueryRendererTestQuery.graphql.js | 30 ++++--- .../useRefetchableFragment.graphql.js | 29 ++++-- ...RefetchableFragmentRefetchQuery.graphql.js | 36 ++++---- yarn.lock | 13 ++- 55 files changed, 766 insertions(+), 1110 deletions(-) create mode 100644 relay.config.js delete mode 100644 src/abacus-backoffice/relay.config.js delete mode 100644 src/abacus-kochka/relay.config.js delete mode 100644 src/abacus-kochka/src/design/svg/__generated__/Cart.js delete mode 100644 src/abacus-kochka/src/design/svg/__generated__/Facebook.js delete mode 100644 src/abacus-kochka/src/design/svg/__generated__/Instagram.js delete mode 100644 src/abacus-kochka/src/design/svg/__generated__/flags/mx.js delete mode 100644 src/abacus-kochka/src/design/svg/__generated__/flags/us.js delete mode 100644 src/example-relay/relay.config.js diff --git a/package.json b/package.json index 1cdd89579e..1cdae8ebfd 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "flow-bin": "^0.153.0", "glob": "^7.1.7", "jest": "^27.0.5", - "jest-runner-eslint": "^0.10.1" + "jest-runner-eslint": "^0.10.1", + "relay-compiler-experimental": "0.0.0-master-211d6fec" }, "jest": { "testRegex": "/scripts/jest/dontRunJestDirectly\\.js$" @@ -35,6 +36,9 @@ "test": "yarn run flow --max-warnings=0 && yarn run lint && yarn run test-only --ci --colors && yarn run scanner", "test-only": "src/monorepo-utils/bin/monorepo-run-tests.js" }, + "resolutions": { + "graphql": "15.3.0" + }, "jest-runner-eslint": { "cliOptions": { "format": "codeframe", diff --git a/relay.config.js b/relay.config.js new file mode 100644 index 0000000000..d9c06c8dda --- /dev/null +++ b/relay.config.js @@ -0,0 +1,32 @@ +// @flow strict + +module.exports = { + root: '.', + sources: { + 'src/abacus-backoffice': 'abacus', + 'src/abacus-kochka': 'abacus', + 'src/example-relay': 'example-relay', + 'src/relay': 'relay', + }, + excludes: ['**/__flowtests__/**'], + codegenCommand: './node_modules/.bin/relay-compiler-experimental', + projects: { + 'abacus': { + schema: 'src/abacus/schema.graphql', + customScalarTypes: { + ProductImageUploadable: 'String', + }, + jsModuleFormat: 'commonjs', + }, + 'example-relay': { + schema: 'src/example-relay/schema.graphql', + extensions: ['src/example-relay/src/LocalForm'], + jsModuleFormat: 'commonjs', + }, + 'relay': { + schema: 'src/relay/schema.graphql', + jsModuleFormat: 'commonjs', + }, + }, + isDevVariableName: '__DEV__', +}; diff --git a/src/abacus-backoffice/relay.config.js b/src/abacus-backoffice/relay.config.js deleted file mode 100644 index ef8eb38a23..0000000000 --- a/src/abacus-backoffice/relay.config.js +++ /dev/null @@ -1,11 +0,0 @@ -// @flow strict - -module.exports = { - // Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`. - src: './', - include: ['**/pages/**', '**/src/**'], - schema: '../abacus/schema.graphql', - customScalars: { - ProductImageUploadable: 'String', - }, -}; diff --git a/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js b/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js index 11e8148252..cc2f2f6cd2 100644 --- a/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js +++ b/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js @@ -1,38 +1,34 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type AuthButtonsAuthorizeWebappMutationVariables = {| - googleIdToken: string + googleIdToken: string, |}; export type AuthButtonsAuthorizeWebappMutationResponse = {| +authorizeWebapp: {| +success: boolean, +sessionToken: ?string, +failureMessage: ?string, - |} + |}, |}; export type AuthButtonsAuthorizeWebappMutation = {| variables: AuthButtonsAuthorizeWebappMutationVariables, response: AuthButtonsAuthorizeWebappMutationResponse, |}; - -/* -mutation AuthButtonsAuthorizeWebappMutation( - $googleIdToken: String! -) { - authorizeWebapp(googleIdToken: $googleIdToken) { - success - sessionToken - failureMessage - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -107,6 +103,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'f8538cae99f40d0a100e9774d707e3a0'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "f8538cae99f40d0a100e9774d707e3a0"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js b/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js index 4a5650b00c..ed8b2004fc 100644 --- a/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js +++ b/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js @@ -1,34 +1,32 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type AuthButtonsDeauthorizeWebappMutationVariables = {| - sessionToken: string + sessionToken: string, |}; export type AuthButtonsDeauthorizeWebappMutationResponse = {| +deauthorize: {| - +__typename: string - |} + +__typename: string, + |}, |}; export type AuthButtonsDeauthorizeWebappMutation = {| variables: AuthButtonsDeauthorizeWebappMutationVariables, response: AuthButtonsDeauthorizeWebappMutationResponse, |}; - -/* -mutation AuthButtonsDeauthorizeWebappMutation( - $sessionToken: String! -) { - deauthorize(sessionToken: $sessionToken) { - __typename - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -89,6 +87,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '185c9f22024e996b6ad226523651ca0e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "185c9f22024e996b6ad226523651ca0e"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js b/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js index e21874a077..593c82794f 100644 --- a/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js +++ b/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js @@ -1,31 +1,30 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type NavigationHeaderQueryVariables = {||}; export type NavigationHeaderQueryResponse = {| +whoami: {| - +isDebugAssertionsEnabled: boolean - |} + +isDebugAssertionsEnabled: boolean, + |}, |}; export type NavigationHeaderQuery = {| variables: NavigationHeaderQueryVariables, response: NavigationHeaderQueryResponse, |}; - -/* -query NavigationHeaderQuery { - whoami { - isDebugAssertionsEnabled - id - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "alias": null, "args": null, @@ -93,6 +92,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '22a3d238878cf82d90908db5cb68f947'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "22a3d238878cf82d90908db5cb68f947"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js b/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js index c3651c708c..bf4b69353f 100644 --- a/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js +++ b/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<76c0e180ae7f0b32fb4108198402a7b9>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type EmployeesPageQueryVariables = {||}; export type EmployeesPageQueryResponse = {| @@ -12,25 +19,15 @@ export type EmployeesPageQueryResponse = {| +name: ?string, +hasEmailVerified: ?boolean, +isActive: boolean, - |}> + |}>, |}; export type EmployeesPageQuery = {| variables: EmployeesPageQueryVariables, response: EmployeesPageQueryResponse, |}; - -/* -query EmployeesPageQuery { - listUsers { - id - name - hasEmailVerified - isActive - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -99,6 +96,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'e79e236d19dd026b5ef10959ba76088e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e79e236d19dd026b5ef10959ba76088e"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js b/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js index 47e9d6d386..92e944863e 100644 --- a/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js +++ b/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type IndexPageQueryVariables = {||}; export type IndexPageQueryResponse = {| @@ -17,32 +24,16 @@ export type IndexPageQueryResponse = {| +totalCheckouts: number, +totalSoldUnits: number, +totalSoldUnitAmount: number, - |} + |}, |}, |}; export type IndexPageQuery = {| variables: IndexPageQueryVariables, response: IndexPageQueryResponse, |}; - -/* -query IndexPageQuery { - whoami { - id - humanReadableType - isDebugAssertionsEnabled - } - pos { - getTotalCheckoutStats { - totalCheckouts - totalSoldUnits - totalSoldUnitAmount - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -147,6 +138,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'aeba1fc58c0f30fa53eeafb0041861bf'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "aeba1fc58c0f30fa53eeafb0041861bf"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js b/src/abacus-backoffice/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js index c1a6a1a1d6..14a6cab31d 100644 --- a/src/abacus-backoffice/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js +++ b/src/abacus-backoffice/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<2832bce7e6916f8163edf4d0114d6c42>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedCurrency = "MXN" | "%future added value"; export type PosCheckoutProductInput = {| @@ -13,7 +20,7 @@ export type PosCheckoutProductInput = {| productPriceUnitAmountCurrency: SupportedCurrency, |}; export type POSCheckoutPageLayoutMutationVariables = {| - checkoutInput: $ReadOnlyArray + checkoutInput: $ReadOnlyArray, |}; export type POSCheckoutPageLayoutMutationResponse = {| +pos: {| @@ -26,34 +33,17 @@ export type POSCheckoutPageLayoutMutationResponse = {| |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type POSCheckoutPageLayoutMutation = {| variables: POSCheckoutPageLayoutMutationVariables, response: POSCheckoutPageLayoutMutationResponse, |}; - -/* -mutation POSCheckoutPageLayoutMutation( - $checkoutInput: [PosCheckoutProductInput!]! -) { - pos { - checkout(input: {selectedProducts: $checkoutInput}) { - __typename - ... on PosCheckoutPayload { - id - } - ... on PosCheckoutError { - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -159,6 +149,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '62625f93bb702c890c5f3d38d652d255'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "62625f93bb702c890c5f3d38d652d255"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js b/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js index a1183c9a2a..72ef1082ba 100644 --- a/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js +++ b/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedCurrency = "MXN" | "%future added value"; export type ProductsGridPosQueryVariables = {||}; @@ -21,35 +28,16 @@ export type ProductsGridPosQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductsGridPosQuery = {| variables: ProductsGridPosQueryVariables, response: ProductsGridPosQueryResponse, |}; - -/* -query ProductsGridPosQuery { - pos { - products: listPublishedProducts { - id - key - name - imageCover { - blurhash - url - } - price { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -172,6 +160,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '9a0d3d97d0fa3296d8d42e06aacc9ed8'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9a0d3d97d0fa3296d8d42e06aacc9ed8"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductCreateFormMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductCreateFormMutation.graphql.js index e69164d66f..778ec20e39 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductCreateFormMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductCreateFormMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<31caa362126baa1d04f190d8ba1c4fce>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; @@ -13,7 +20,7 @@ export type ProductMultilingualInputTranslations = {| descriptionSlate?: ?string, |}; export type ProductCreateFormMutationVariables = {| - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -29,39 +36,17 @@ export type ProductCreateFormMutationResponse = {| |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type ProductCreateFormMutation = {| variables: ProductCreateFormMutationVariables, response: ProductCreateFormMutationResponse, |}; - -/* -mutation ProductCreateFormMutation( - $productImagesNames: [ProductImageUploadable!]! - $productPriceUnitAmount: Int! - $translations: [ProductMultilingualInputTranslations!]! - $visibility: [ProductMultilingualInputVisibility!]! -) { - commerce { - result: productCreate(productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility}) { - __typename - ... on Product { - __typename - name - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -221,7 +206,14 @@ return { { "kind": "InlineFragment", "selections": [ - (v3/*: any*/) + (v3/*: any*/), + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } ], "type": "Product", "abstractKey": null @@ -243,15 +235,18 @@ return { ] }, "params": { - "cacheID": "5863fdee372e283b030ce0772fb2d909", + "cacheID": "e081a27f05e63d9cd5aa0c66f5580205", "id": null, "metadata": {}, "name": "ProductCreateFormMutation", "operationKind": "mutation", - "text": "mutation ProductCreateFormMutation(\n $productImagesNames: [ProductImageUploadable!]!\n $productPriceUnitAmount: Int!\n $translations: [ProductMultilingualInputTranslations!]!\n $visibility: [ProductMultilingualInputVisibility!]!\n) {\n commerce {\n result: productCreate(productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility}) {\n __typename\n ... on Product {\n __typename\n name\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" + "text": "mutation ProductCreateFormMutation(\n $productImagesNames: [ProductImageUploadable!]!\n $productPriceUnitAmount: Int!\n $translations: [ProductMultilingualInputTranslations!]!\n $visibility: [ProductMultilingualInputVisibility!]!\n) {\n commerce {\n result: productCreate(productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility}) {\n __typename\n ... on Product {\n __typename\n name\n id\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" } }; })(); -// prettier-ignore -(node: any).hash = '1948c5ba582a81ed4dd0a908221732db'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "71de55150bdfd5ad141559d9535d7bd4"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditFormData.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditFormData.graphql.js index 5581853bb9..81665fdb66 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditFormData.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditFormData.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value"; import type { FragmentReference } from "relay-runtime"; @@ -13,7 +20,7 @@ export type ProductEditFormData = {| +key: string, +revision: string, +price: {| - +unitAmount: number + +unitAmount: number, |}, +visibility: $ReadOnlyArray, +enTranslation: ?{| @@ -25,7 +32,7 @@ export type ProductEditFormData = {| +descriptionSlate: ?string, |}, +images: $ReadOnlyArray<{| - +name: string + +name: string, |}>, +$refType: ProductEditFormData$ref, |}; @@ -35,9 +42,9 @@ export type ProductEditFormData$key = { +$fragmentRefs: ProductEditFormData$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = { "alias": null, "args": null, @@ -149,6 +156,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = 'dbc81fc7656d33b92344e64a20a22e39'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "dbc81fc7656d33b92344e64a20a22e39"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditFormMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditFormMutation.graphql.js index 02d158e2ef..d338bc72d0 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditFormMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditFormMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type ProductEditFormData$ref = any; export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value"; @@ -16,7 +23,7 @@ export type ProductMultilingualInputTranslations = {| export type ProductEditFormMutationVariables = {| productKey: string, productRevision: string, - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -35,64 +42,17 @@ export type ProductEditFormMutationResponse = {| |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type ProductEditFormMutation = {| variables: ProductEditFormMutationVariables, response: ProductEditFormMutationResponse, |}; - -/* -mutation ProductEditFormMutation( - $productKey: ID! - $productRevision: ID! - $productImagesNames: [ProductImageUploadable!]! - $productPriceUnitAmount: Int! - $translations: [ProductMultilingualInputTranslations!]! - $visibility: [ProductMultilingualInputVisibility!]! -) { - commerce { - result: productUpdate(productKey: $productKey, productRevision: $productRevision, productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility}) { - __typename - ... on Product { - __typename - id - name - revision - ...ProductEditFormData - } - ... on ProductError { - __typename - message - } - } - } -} - -fragment ProductEditFormData on Product { - key - revision - price { - unitAmount - } - visibility - enTranslation: translation(locale: en_US) { - name - descriptionSlate - } - esTranslation: translation(locale: es_MX) { - name - descriptionSlate - } - images { - name - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -424,6 +384,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '858e259da7228e96e62bd54654cd836f'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "239c910db4b07aed89795914385cc39f"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditHeading.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditHeading.graphql.js index fc3616c43e..062c38a806 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeading.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeading.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<02daedf99a96500c03f47d70cdf246cd>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; import type { FragmentReference } from "relay-runtime"; declare export opaque type ProductEditHeading$ref: FragmentReference; @@ -19,9 +26,9 @@ export type ProductEditHeading$key = { +$fragmentRefs: ProductEditHeading$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -45,6 +52,9 @@ const node: ReaderFragment = { "type": "Product", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'f16ba12544552aac568f7f96b1802528'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "f16ba12544552aac568f7f96b1802528"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingDeleteMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingDeleteMutation.graphql.js index 158cb0672a..648be95f42 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingDeleteMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingDeleteMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<71fa55438f67a75c49e88c61fb002a39>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type ProductEditHeadingDeleteMutationVariables = {| - productKey: string + productKey: string, |}; export type ProductEditHeadingDeleteMutationResponse = {| +commerce: {| +productOrError: {| - +__typename: "Product" + +__typename: "Product", |} | {| +__typename: "ProductError", +message: string, |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type ProductEditHeadingDeleteMutation = {| variables: ProductEditHeadingDeleteMutationVariables, response: ProductEditHeadingDeleteMutationResponse, |}; - -/* -mutation ProductEditHeadingDeleteMutation( - $productKey: ID! -) { - commerce { - productOrError: productDelete(productKey: $productKey) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -148,6 +137,20 @@ return { "plural": false, "selections": [ (v2/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -165,15 +168,18 @@ return { ] }, "params": { - "cacheID": "3539a5efebe99a2b1b95300f86f55ffe", + "cacheID": "d8940a2afa7a6874c3580c2a8af5554a", "id": null, "metadata": {}, "name": "ProductEditHeadingDeleteMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingDeleteMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productDelete(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" + "text": "mutation ProductEditHeadingDeleteMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productDelete(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n id\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" } }; })(); -// prettier-ignore -(node: any).hash = '16345a8e5ec3aff0cf6fa709630a5cf0'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "16345a8e5ec3aff0cf6fa709630a5cf0"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js index 95bf0def35..fc8c66dd6e 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<4e9d468c54b359f6da46db567fda4eb6>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type ProductEditHeadingPublishUnpublishPublishMutationVariables = {| - productKey: string + productKey: string, |}; export type ProductEditHeadingPublishUnpublishPublishMutationResponse = {| +commerce: {| +productOrError: {| - +__typename: "Product" + +__typename: "Product", |} | {| +__typename: "ProductError", +message: string, |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type ProductEditHeadingPublishUnpublishPublishMutation = {| variables: ProductEditHeadingPublishUnpublishPublishMutationVariables, response: ProductEditHeadingPublishUnpublishPublishMutationResponse, |}; - -/* -mutation ProductEditHeadingPublishUnpublishPublishMutation( - $productKey: ID! -) { - commerce { - productOrError: productPublish(productKey: $productKey) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -148,6 +137,20 @@ return { "plural": false, "selections": [ (v2/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -165,15 +168,18 @@ return { ] }, "params": { - "cacheID": "91a9e274463dd430529129ce27db6317", + "cacheID": "f101612dbcba856c2d4e18174f362fd2", "id": null, "metadata": {}, "name": "ProductEditHeadingPublishUnpublishPublishMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingPublishUnpublishPublishMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productPublish(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" + "text": "mutation ProductEditHeadingPublishUnpublishPublishMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productPublish(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n id\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" } }; })(); -// prettier-ignore -(node: any).hash = 'add5766330337f5cfcc4db1072b81ec7'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "add5766330337f5cfcc4db1072b81ec7"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js index 42de591463..4d261e51e3 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<38debc62d23d74e10ab980196447e713>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type ProductEditHeadingPublishUnpublishUnpublishMutationVariables = {| - productKey: string + productKey: string, |}; export type ProductEditHeadingPublishUnpublishUnpublishMutationResponse = {| +commerce: {| +productOrError: {| - +__typename: "Product" + +__typename: "Product", |} | {| +__typename: "ProductError", +message: string, |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type ProductEditHeadingPublishUnpublishUnpublishMutation = {| variables: ProductEditHeadingPublishUnpublishUnpublishMutationVariables, response: ProductEditHeadingPublishUnpublishUnpublishMutationResponse, |}; - -/* -mutation ProductEditHeadingPublishUnpublishUnpublishMutation( - $productKey: ID! -) { - commerce { - productOrError: productUnpublish(productKey: $productKey) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -148,6 +137,20 @@ return { "plural": false, "selections": [ (v2/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -165,15 +168,18 @@ return { ] }, "params": { - "cacheID": "9fe083f0c5c69b3dcb9ba31d7750edf9", + "cacheID": "3ac76f99c4833f534d030eedf0799ce6", "id": null, "metadata": {}, "name": "ProductEditHeadingPublishUnpublishUnpublishMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingPublishUnpublishUnpublishMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productUnpublish(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" + "text": "mutation ProductEditHeadingPublishUnpublishUnpublishMutation(\n $productKey: ID!\n) {\n commerce {\n productOrError: productUnpublish(productKey: $productKey) {\n __typename\n ... on Product {\n __typename\n id\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" } }; })(); -// prettier-ignore -(node: any).hash = 'ad308cf9dd5907e9ff958463999673f8'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "ad308cf9dd5907e9ff958463999673f8"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js index 4e7c3e2584..90a2f875e6 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js @@ -1,14 +1,21 @@ /** + * @generated SignedSource<<9e91183738500b57a0c00ab07a78569a>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedCurrency = "MXN" | "%future added value"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductsCardsQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type ProductsCardsQueryResponse = {| +commerce: {| @@ -24,37 +31,16 @@ export type ProductsCardsQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductsCardsQuery = {| variables: ProductsCardsQueryVariables, response: ProductsCardsQueryResponse, |}; - -/* -query ProductsCardsQuery( - $clientLocale: SupportedLocale! -) { - commerce { - products: searchAllProducts(clientLocale: $clientLocale, priceSortDirection: LOW_TO_HIGH) { - id - key - name - imageCover { - blurhash - url - } - price { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -195,6 +181,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'eaa37480a4d84f7d686fb309916e9c46'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "7c317c11c0e65c9f88df0f28c757a051"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsEditLayoutQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsEditLayoutQuery.graphql.js index 695baf8ddc..31c52d793b 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsEditLayoutQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsEditLayoutQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<9df9f136c90c85563fb5ee277ec3f76c>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type ProductEditFormData$ref = any; type ProductEditHeading$ref = any; @@ -21,60 +28,16 @@ export type ProductsEditLayoutQueryResponse = {| +url: string, |}>, +$fragmentRefs: ProductEditHeading$ref & ProductEditFormData$ref, - |} - |} + |}, + |}, |}; export type ProductsEditLayoutQuery = {| variables: ProductsEditLayoutQueryVariables, response: ProductsEditLayoutQueryResponse, |}; - -/* -query ProductsEditLayoutQuery( - $clientLocale: SupportedLocale! - $productKey: ID! -) { - commerce { - product: getUnpublishedProductByKey(clientLocale: $clientLocale, productKey: $productKey) { - ...ProductEditHeading - images { - name - blurhash - url - } - ...ProductEditFormData - id - } - } -} - -fragment ProductEditFormData on Product { - key - revision - price { - unitAmount - } - visibility - enTranslation: translation(locale: en_US) { - name - descriptionSlate - } - esTranslation: translation(locale: es_MX) { - name - descriptionSlate - } - images { - name - } -} - -fragment ProductEditHeading on Product { - key - isPublished -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -165,12 +128,12 @@ return { "name": "getUnpublishedProductByKey", "plural": false, "selections": [ - (v3/*: any*/), { "args": null, "kind": "FragmentSpread", "name": "ProductEditHeading" }, + (v3/*: any*/), { "args": null, "kind": "FragmentSpread", @@ -312,6 +275,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'a0bfb0ff14c17bd91dd157d472cab49e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "65d361f91d79ebe6a215a4a69979a04f"; +} + +module.exports = node; diff --git a/src/abacus-kochka/package.json b/src/abacus-kochka/package.json index ef9d947185..94cf3354f8 100644 --- a/src/abacus-kochka/package.json +++ b/src/abacus-kochka/package.json @@ -12,8 +12,7 @@ "fbt:manifest": "fbt-manifest --src=src --src=pages --enum-manifest=translations/enum_manifest.json --src-manifest=translations/src_manifest.json", "fbt:collect": "fbt-collect --options=__self --pretty --manifest < translations/src_manifest.json > translations/source_strings.json", "fbt:translate": "fbt-translate --source-strings=translations/source_strings.json --pretty --translations translations/in/*.json --output-dir=translations/out --jenkins", - "fbt": "yarn run fbt:manifest && yarn run fbt:collect && yarn run fbt:translate", - "relay": "adeira-relay-compiler" + "fbt": "yarn run fbt:manifest && yarn run fbt:collect && yarn run fbt:translate" }, "dependencies": { "@adeira/js": "^2.1.0", diff --git a/src/abacus-kochka/relay.config.js b/src/abacus-kochka/relay.config.js deleted file mode 100644 index 9445fcfb8f..0000000000 --- a/src/abacus-kochka/relay.config.js +++ /dev/null @@ -1,6 +0,0 @@ -// @flow strict - -module.exports = { - src: './src', - schema: '../abacus/schema.graphql', -}; diff --git a/src/abacus-kochka/src/design/svg/__generated__/Cart.js b/src/abacus-kochka/src/design/svg/__generated__/Cart.js deleted file mode 100644 index d69ba4f5e7..0000000000 --- a/src/abacus-kochka/src/design/svg/__generated__/Cart.js +++ /dev/null @@ -1,24 +0,0 @@ -// @flow strict - -import * as React from 'react'; - -import SVGIcon from '../SVGIcon'; - -type Props = { - +color?: string, - +size?: number, -}; - -export default function Cart(props: Props): React.Node { - const { color = '#fff', size = 40 } = props; - return ( - - - - ); -} diff --git a/src/abacus-kochka/src/design/svg/__generated__/Facebook.js b/src/abacus-kochka/src/design/svg/__generated__/Facebook.js deleted file mode 100644 index a1e5779fb1..0000000000 --- a/src/abacus-kochka/src/design/svg/__generated__/Facebook.js +++ /dev/null @@ -1,29 +0,0 @@ -// @flow strict - -import * as React from 'react'; - -import SVGIcon from '../SVGIcon'; - -type Props = { - +color?: string, - +size?: number, -}; - -export default function Facebook(props: Props): React.Node { - const { color = '#fff', size = 40 } = props; - return ( - - - - - - - - - - ); -} diff --git a/src/abacus-kochka/src/design/svg/__generated__/Instagram.js b/src/abacus-kochka/src/design/svg/__generated__/Instagram.js deleted file mode 100644 index a882e40d5d..0000000000 --- a/src/abacus-kochka/src/design/svg/__generated__/Instagram.js +++ /dev/null @@ -1,32 +0,0 @@ -// @flow strict - -import * as React from 'react'; - -import SVGIcon from '../SVGIcon'; - -type Props = { - +color?: string, - +size?: number, -}; - -export default function Facebook(props: Props): React.Node { - const { color = '#fff', size = 40 } = props; - return ( - - - - - - - - - - ); -} diff --git a/src/abacus-kochka/src/design/svg/__generated__/flags/mx.js b/src/abacus-kochka/src/design/svg/__generated__/flags/mx.js deleted file mode 100644 index 06a3edb3dc..0000000000 --- a/src/abacus-kochka/src/design/svg/__generated__/flags/mx.js +++ /dev/null @@ -1,54 +0,0 @@ -// @flow strict - -import * as React from 'react'; - -import SVGIcon from '../../SVGIcon'; - -type Props = { - +size?: number, -}; - -export default function FlagMX(props: Props): React.Node { - const { size = 50 } = props; - return ( - - - - - - - - - - - - - ); -} diff --git a/src/abacus-kochka/src/design/svg/__generated__/flags/us.js b/src/abacus-kochka/src/design/svg/__generated__/flags/us.js deleted file mode 100644 index 4d07afca58..0000000000 --- a/src/abacus-kochka/src/design/svg/__generated__/flags/us.js +++ /dev/null @@ -1,30 +0,0 @@ -// @flow strict - -import * as React from 'react'; - -import SVGIcon from '../../SVGIcon'; - -type Props = { - +size?: number, -}; - -export default function FlagUS(props: Props): React.Node { - const { size = 50 } = props; - return ( - - - - - - - ); -} diff --git a/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js b/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js index 68dd595c99..1eadb3bdbe 100644 --- a/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js +++ b/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<401be99f734e1b19ead272a438f72491>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedCurrency = "MXN" | "%future added value"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; @@ -24,38 +31,16 @@ export type ProductPageLayoutQueryResponse = {| +blurhash: string, +url: string, |}, - |} - |} + |}, + |}, |}; export type ProductPageLayoutQuery = {| variables: ProductPageLayoutQueryVariables, response: ProductPageLayoutQueryResponse, |}; - -/* -query ProductPageLayoutQuery( - $clientLocale: SupportedLocale! - $productKey: ID! -) { - commerce { - product: getPublishedProductByKey(clientLocale: $clientLocale, productKey: $productKey) { - name - descriptionSlate - price { - unitAmount - unitAmountCurrency - } - imageCover { - blurhash - url - } - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -232,6 +217,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '3cbd0aec987dfad59edcf16413cdea2b'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "cdc0a5f401812a381028ece77cd80934"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/shop/__generated__/ShopLayoutContentQuery.graphql.js b/src/abacus-kochka/src/shop/__generated__/ShopLayoutContentQuery.graphql.js index 9c71ed18a8..607c5e3156 100644 --- a/src/abacus-kochka/src/shop/__generated__/ShopLayoutContentQuery.graphql.js +++ b/src/abacus-kochka/src/shop/__generated__/ShopLayoutContentQuery.graphql.js @@ -1,11 +1,18 @@ /** + * @generated SignedSource<<8963d94230459e4450de0567097a8454>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; -export type PriceSortDirection = "HIGH_TO_LOW" | "LOW_TO_HIGH" | "%future added value"; +export type PriceSortDirection = "LOW_TO_HIGH" | "HIGH_TO_LOW" | "%future added value"; export type SupportedCurrency = "MXN" | "%future added value"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ShopLayoutContentQueryVariables = {| @@ -26,39 +33,16 @@ export type ShopLayoutContentQueryResponse = {| +blurhash: string, +url: string, |}, - |}> - |} + |}>, + |}, |}; export type ShopLayoutContentQuery = {| variables: ShopLayoutContentQueryVariables, response: ShopLayoutContentQueryResponse, |}; - -/* -query ShopLayoutContentQuery( - $clientLocale: SupportedLocale! - $priceSortDirection: PriceSortDirection! - $searchTerm: String -) { - commerce { - products: searchPublishedProducts(clientLocale: $clientLocale, priceSortDirection: $priceSortDirection, searchTerm: $searchTerm) { - key - name - price { - unitAmount - unitAmountCurrency - } - imageCover { - blurhash - url - } - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -245,6 +229,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '881043bb3a7cce53d5eae69b3b2801c2'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "5087f474778ac5608c7d242634e0207d"; +} + +module.exports = node; diff --git a/src/eslint-plugin-adeira/package.json b/src/eslint-plugin-adeira/package.json index 03c2279520..5f933b1a6f 100644 --- a/src/eslint-plugin-adeira/package.json +++ b/src/eslint-plugin-adeira/package.json @@ -19,6 +19,6 @@ "eslint": "^7.29.0" }, "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0" + "graphql": "^15.0.0" } } diff --git a/src/example-relay/package.json b/src/example-relay/package.json index c5fd561224..6607fea0f4 100644 --- a/src/example-relay/package.json +++ b/src/example-relay/package.json @@ -41,7 +41,6 @@ "start": "next dev", "start-production": "next start", "build": "next build", - "relay": "adeira-relay-compiler", "schema": "adeira-fetch-schema --resource=https://relay-example.adeira.dev/api/graphql" } } diff --git a/src/example-relay/relay.config.js b/src/example-relay/relay.config.js deleted file mode 100644 index 6b8c7a635e..0000000000 --- a/src/example-relay/relay.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow strict - -module.exports = { - // Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`. - src: './src', - schema: './schema.graphql', -}; diff --git a/src/example-relay/src/Homepage/__generated__/HomepageQuery.graphql.js b/src/example-relay/src/Homepage/__generated__/HomepageQuery.graphql.js index 387ff46f65..3de3ccde9a 100644 --- a/src/example-relay/src/Homepage/__generated__/HomepageQuery.graphql.js +++ b/src/example-relay/src/Homepage/__generated__/HomepageQuery.graphql.js @@ -1,94 +1,33 @@ /** + * @generated SignedSource<<5e06a461360cb9a47ad608381dcde810>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type LocationsPaginated$ref = any; type LocationsPaginatedBidirectional$ref = any; type LocationsPaginatedRefetch$ref = any; export type HomepageQueryVariables = {| - count: number + count: number, |}; export type HomepageQueryResponse = {| - +$fragmentRefs: LocationsPaginatedBidirectional$ref & LocationsPaginatedRefetch$ref & LocationsPaginated$ref + +$fragmentRefs: LocationsPaginatedBidirectional$ref & LocationsPaginatedRefetch$ref & LocationsPaginated$ref, |}; export type HomepageQuery = {| variables: HomepageQueryVariables, response: HomepageQueryResponse, |}; - -/* -query HomepageQuery( - $count: Int! -) { - ...LocationsPaginatedBidirectional_1TJkD9 - ...LocationsPaginatedRefetch - ...LocationsPaginated -} - -fragment Location on Location { - name - countryFlagURL - country { - name - } -} - -fragment LocationsPaginated on RootQuery { - incrementalPagination2: locations(first: 20) { - edges { - node { - id - ...Location - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} - -fragment LocationsPaginatedBidirectional_1TJkD9 on RootQuery { - locations(first: $count) { - edges { - node { - id - ...Location - } - } - pageInfo { - hasNextPage - hasPreviousPage - startCursor - endCursor - } - } -} - -fragment LocationsPaginatedRefetch on RootQuery { - incrementalPagination: locations(first: 20) { - edges { - node { - id - ...Location - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -358,6 +297,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '085ef3ea8676fdcaf828d0cb62550f00'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "085ef3ea8676fdcaf828d0cb62550f00"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/Location.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/Location.graphql.js index 1fa4fef9ff..c0b938be38 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/Location.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/Location.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<780872ba2bf2d61922f9c069cef9edfb>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; import type { FragmentReference } from "relay-runtime"; declare export opaque type Location$ref: FragmentReference; @@ -12,7 +19,7 @@ export type Location = {| +name: ?string, +countryFlagURL: ?string, +country: ?{| - +name: ?string + +name: ?string, |}, +$refType: Location$ref, |}; @@ -22,9 +29,9 @@ export type Location$key = { +$fragmentRefs: Location$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = { "alias": null, "args": null, @@ -63,6 +70,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = '58584a7e6bd090556fbbb1e258ca704e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "58584a7e6bd090556fbbb1e258ca704e"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginated.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginated.graphql.js index 5eafe27aa3..91f1625976 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginated.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginated.graphql.js @@ -1,22 +1,30 @@ /** + * @generated SignedSource<<47d6bcbbdafb9085164455b5d85b28a2>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type Location$ref = any; import type { FragmentReference } from "relay-runtime"; -declare export opaque type LocationsPaginated$ref: FragmentReference; -declare export opaque type LocationsPaginated$fragmentType: LocationsPaginated$ref; +type LocationsPaginated$ref = any; +type LocationsPaginated$fragmentType = any; +export type { LocationsPaginated$ref, LocationsPaginated$fragmentType }; export type LocationsPaginated = {| +incrementalPagination2: ?{| +edges: ?$ReadOnlyArray + |}, + |}>, |}, +$refType: LocationsPaginated$ref, |}; @@ -26,9 +34,9 @@ export type LocationsPaginated$key = { +$fragmentRefs: LocationsPaginated$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = [ "incrementalPagination2" ]; @@ -65,7 +73,7 @@ return { "path": (v0/*: any*/) }, "fragmentPathInResult": [], - "operation": require('./LocationsPaginatedRefetchQuery.graphql.js').default + "operation": require('./LocationsPaginatedRefetchQuery.graphql') } }, "name": "LocationsPaginated", @@ -101,17 +109,17 @@ return { "name": "id", "storageKey": null }, + { + "args": null, + "kind": "FragmentSpread", + "name": "Location" + }, { "alias": null, "args": null, "kind": "ScalarField", "name": "__typename", "storageKey": null - }, - { - "args": null, - "kind": "FragmentSpread", - "name": "Location" } ], "storageKey": null @@ -159,6 +167,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = '4c6e41152f6e3fb4c537ab2d68022119'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4c6e41152f6e3fb4c537ab2d68022119"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js index d89e40843c..c4b2eca59c 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js @@ -1,21 +1,29 @@ /** + * @generated SignedSource<<249007a2d28d9a669367180f7e567016>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type Location$ref = any; import type { FragmentReference } from "relay-runtime"; -declare export opaque type LocationsPaginatedBidirectional$ref: FragmentReference; -declare export opaque type LocationsPaginatedBidirectional$fragmentType: LocationsPaginatedBidirectional$ref; +type LocationsPaginatedBidirectional$ref = any; +type LocationsPaginatedBidirectional$fragmentType = any; +export type { LocationsPaginatedBidirectional$ref, LocationsPaginatedBidirectional$fragmentType }; export type LocationsPaginatedBidirectional = {| +locations: ?{| +edges: ?$ReadOnlyArray, +pageInfo: {| +hasNextPage: boolean, @@ -32,9 +40,9 @@ export type LocationsPaginatedBidirectional$key = { +$fragmentRefs: LocationsPaginatedBidirectional$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "defaultValue": null, @@ -62,7 +70,7 @@ const node: ReaderFragment = { "refetch": { "connection": null, "fragmentPathInResult": [], - "operation": require('./LocationsPaginatedBidirectionalRefetchQuery.graphql.js').default + "operation": require('./LocationsPaginatedBidirectionalRefetchQuery.graphql') } }, "name": "LocationsPaginatedBidirectional", @@ -176,6 +184,9 @@ const node: ReaderFragment = { "type": "RootQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '46f79f411cdd91adf7c66321a579be4b'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "46f79f411cdd91adf7c66321a579be4b"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js index 98fea697f0..2559e7fbe0 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js @@ -1,11 +1,20 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; -type LocationsPaginatedBidirectional$ref = any; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type LocationsPaginatedBidirectional$ref: FragmentReference; +declare export opaque type LocationsPaginatedBidirectional$fragmentType: LocationsPaginatedBidirectional$ref; export type LocationsPaginatedBidirectionalRefetchQueryVariables = {| after?: ?string, before?: ?string, @@ -13,50 +22,15 @@ export type LocationsPaginatedBidirectionalRefetchQueryVariables = {| last?: ?number, |}; export type LocationsPaginatedBidirectionalRefetchQueryResponse = {| - +$fragmentRefs: LocationsPaginatedBidirectional$ref + +$fragmentRefs: LocationsPaginatedBidirectional$ref, |}; export type LocationsPaginatedBidirectionalRefetchQuery = {| variables: LocationsPaginatedBidirectionalRefetchQueryVariables, response: LocationsPaginatedBidirectionalRefetchQueryResponse, |}; - -/* -query LocationsPaginatedBidirectionalRefetchQuery( - $after: String - $before: String - $first: Int - $last: Int -) { - ...LocationsPaginatedBidirectional_pbnwq -} - -fragment Location on Location { - name - countryFlagURL - country { - name - } -} - -fragment LocationsPaginatedBidirectional_pbnwq on RootQuery { - locations(first: $first, last: $last, after: $after, before: $before) { - edges { - node { - id - ...Location - } - } - pageInfo { - hasNextPage - hasPreviousPage - startCursor - endCursor - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -241,6 +215,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '46f79f411cdd91adf7c66321a579be4b'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "46f79f411cdd91adf7c66321a579be4b"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js index 568029d91a..363818aa4e 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js @@ -1,21 +1,29 @@ /** + * @generated SignedSource<<4e9c504ddea411f27b3d7292ee907eed>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type Location$ref = any; import type { FragmentReference } from "relay-runtime"; -declare export opaque type LocationsPaginatedRefetch$ref: FragmentReference; -declare export opaque type LocationsPaginatedRefetch$fragmentType: LocationsPaginatedRefetch$ref; +type LocationsPaginatedRefetch$ref = any; +type LocationsPaginatedRefetch$fragmentType = any; +export type { LocationsPaginatedRefetch$ref, LocationsPaginatedRefetch$fragmentType }; export type LocationsPaginatedRefetch = {| +incrementalPagination: ?{| +edges: ?$ReadOnlyArray, +pageInfo: {| +endCursor: ?string, @@ -30,9 +38,9 @@ export type LocationsPaginatedRefetch$key = { +$fragmentRefs: LocationsPaginatedRefetch$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = [ "incrementalPagination" ]; @@ -69,7 +77,7 @@ return { "path": (v0/*: any*/) }, "fragmentPathInResult": [], - "operation": require('./LocationsPaginatedRefetchRefetchQuery.graphql.js').default + "operation": require('./LocationsPaginatedRefetchRefetchQuery.graphql') } }, "name": "LocationsPaginatedRefetch", @@ -105,17 +113,17 @@ return { "name": "id", "storageKey": null }, + { + "args": null, + "kind": "FragmentSpread", + "name": "Location" + }, { "alias": null, "args": null, "kind": "ScalarField", "name": "__typename", "storageKey": null - }, - { - "args": null, - "kind": "FragmentSpread", - "name": "Location" } ], "storageKey": null @@ -163,6 +171,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = '9b7f0b241071b44b2e2f386b1e71ce2e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9b7f0b241071b44b2e2f386b1e71ce2e"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js index dbe92f6090..cf24c20e29 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js @@ -1,58 +1,34 @@ /** + * @generated SignedSource<<56acdbaeb39b19e8f1fd9cdaa75cc2d0>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; -type LocationsPaginated$ref = any; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type LocationsPaginated$ref: FragmentReference; +declare export opaque type LocationsPaginated$fragmentType: LocationsPaginated$ref; export type LocationsPaginatedRefetchQueryVariables = {| after?: ?string, count?: ?number, |}; export type LocationsPaginatedRefetchQueryResponse = {| - +$fragmentRefs: LocationsPaginated$ref + +$fragmentRefs: LocationsPaginated$ref, |}; export type LocationsPaginatedRefetchQuery = {| variables: LocationsPaginatedRefetchQueryVariables, response: LocationsPaginatedRefetchQueryResponse, |}; - -/* -query LocationsPaginatedRefetchQuery( - $after: String - $count: Int = 20 -) { - ...LocationsPaginated_2QE1um -} - -fragment Location on Location { - name - countryFlagURL - country { - name - } -} - -fragment LocationsPaginated_2QE1um on RootQuery { - incrementalPagination2: locations(first: $count, after: $after) { - edges { - node { - id - ...Location - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -234,6 +210,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '4c6e41152f6e3fb4c537ab2d68022119'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4c6e41152f6e3fb4c537ab2d68022119"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js index 828b835c46..eb6533d35b 100644 --- a/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js +++ b/src/example-relay/src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js @@ -1,58 +1,34 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; -type LocationsPaginatedRefetch$ref = any; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type LocationsPaginatedRefetch$ref: FragmentReference; +declare export opaque type LocationsPaginatedRefetch$fragmentType: LocationsPaginatedRefetch$ref; export type LocationsPaginatedRefetchRefetchQueryVariables = {| after?: ?string, count?: ?number, |}; export type LocationsPaginatedRefetchRefetchQueryResponse = {| - +$fragmentRefs: LocationsPaginatedRefetch$ref + +$fragmentRefs: LocationsPaginatedRefetch$ref, |}; export type LocationsPaginatedRefetchRefetchQuery = {| variables: LocationsPaginatedRefetchRefetchQueryVariables, response: LocationsPaginatedRefetchRefetchQueryResponse, |}; - -/* -query LocationsPaginatedRefetchRefetchQuery( - $after: String - $count: Int = 20 -) { - ...LocationsPaginatedRefetch_2QE1um -} - -fragment Location on Location { - name - countryFlagURL - country { - name - } -} - -fragment LocationsPaginatedRefetch_2QE1um on RootQuery { - incrementalPagination: locations(first: $count, after: $after) { - edges { - node { - id - ...Location - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -234,6 +210,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '9b7f0b241071b44b2e2f386b1e71ce2e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9b7f0b241071b44b2e2f386b1e71ce2e"; +} + +module.exports = node; diff --git a/src/example-relay/src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js b/src/example-relay/src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js index 4c7d77e4be..1dcc83b089 100644 --- a/src/example-relay/src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js +++ b/src/example-relay/src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js @@ -1,52 +1,29 @@ /** + * @generated SignedSource<<32ac1027bfc09ec65f3ddbf108f81ada>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type LocationsPaginatedRefetch$ref = any; export type LocationsPaginatedRefetchTestQueryVariables = {||}; export type LocationsPaginatedRefetchTestQueryResponse = {| - +$fragmentRefs: LocationsPaginatedRefetch$ref + +$fragmentRefs: LocationsPaginatedRefetch$ref, |}; export type LocationsPaginatedRefetchTestQuery = {| variables: LocationsPaginatedRefetchTestQueryVariables, response: LocationsPaginatedRefetchTestQueryResponse, |}; - -/* -query LocationsPaginatedRefetchTestQuery { - ...LocationsPaginatedRefetch -} - -fragment Location on Location { - name - countryFlagURL - country { - name - } -} - -fragment LocationsPaginatedRefetch on RootQuery { - incrementalPagination: locations(first: 20) { - edges { - node { - id - ...Location - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "kind": "Literal", @@ -266,6 +243,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'aa5c30ce170d6be45067cdc6677b4e5c'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "aa5c30ce170d6be45067cdc6677b4e5c"; +} + +module.exports = node; diff --git a/src/example-relay/src/LocalForm/__generated__/LocalFormQuery.graphql.js b/src/example-relay/src/LocalForm/__generated__/LocalFormQuery.graphql.js index a2ae78366d..118a397e05 100644 --- a/src/example-relay/src/LocalForm/__generated__/LocalFormQuery.graphql.js +++ b/src/example-relay/src/LocalForm/__generated__/LocalFormQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<4e26c8c26bb91029d686063628622fe8>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type LocalFormQueryVariables = {||}; export type LocalFormQueryResponse = {| @@ -17,14 +24,9 @@ export type LocalFormQuery = {| variables: LocalFormQueryVariables, response: LocalFormQueryResponse, |}; - -/* -query LocalFormQuery { - __typename -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -91,6 +93,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'e61f3eac0352f6268cbca8f35ceb79ed'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e61f3eac0352f6268cbca8f35ceb79ed"; +} + +module.exports = node; diff --git a/src/example-relay/src/Polling/__generated__/PollingQuery.graphql.js b/src/example-relay/src/Polling/__generated__/PollingQuery.graphql.js index f263ba49c0..c74cfa2799 100644 --- a/src/example-relay/src/Polling/__generated__/PollingQuery.graphql.js +++ b/src/example-relay/src/Polling/__generated__/PollingQuery.graphql.js @@ -1,39 +1,34 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type PollingQueryVariables = {| - abTestEnabled: boolean + abTestEnabled: boolean, |}; export type PollingQueryResponse = {| +currency: ?{| +rate: ?number, +code?: ?string, +format?: ?string, - |} + |}, |}; export type PollingQuery = {| variables: PollingQueryVariables, response: PollingQueryResponse, |}; - -/* -query PollingQuery( - $abTestEnabled: Boolean! -) { - currency(code: "usd") { - rate - code @include(if: $abTestEnabled) - format @include(if: $abTestEnabled) - id - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -115,14 +110,14 @@ return { "plural": false, "selections": [ (v2/*: any*/), + (v3/*: any*/), { "alias": null, "args": null, "kind": "ScalarField", "name": "id", "storageKey": null - }, - (v3/*: any*/) + } ], "storageKey": "currency(code:\"usd\")" } @@ -138,6 +133,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '4fe8e121396058d93ef63050a2f5b555'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4fe8e121396058d93ef63050a2f5b555"; +} + +module.exports = node; diff --git a/src/example-relay/src/SSRLocations/__generated__/LocationListItem.graphql.js b/src/example-relay/src/SSRLocations/__generated__/LocationListItem.graphql.js index d6c3ec866e..6c0ca7366c 100644 --- a/src/example-relay/src/SSRLocations/__generated__/LocationListItem.graphql.js +++ b/src/example-relay/src/SSRLocations/__generated__/LocationListItem.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; import type { FragmentReference } from "relay-runtime"; declare export opaque type LocationListItem$ref: FragmentReference; @@ -18,9 +25,9 @@ export type LocationListItem$key = { +$fragmentRefs: LocationListItem$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -37,6 +44,9 @@ const node: ReaderFragment = { "type": "Location", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'e5e6d8fc671a1564d01f8d503ddaf067'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e5e6d8fc671a1564d01f8d503ddaf067"; +} + +module.exports = node; diff --git a/src/example-relay/src/SSRLocations/__generated__/LocationsList.graphql.js b/src/example-relay/src/SSRLocations/__generated__/LocationsList.graphql.js index b335453a48..757f06bc24 100644 --- a/src/example-relay/src/SSRLocations/__generated__/LocationsList.graphql.js +++ b/src/example-relay/src/SSRLocations/__generated__/LocationsList.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type LocationListItem$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -14,7 +21,7 @@ export type LocationsList = {| +node: ?{| +id: string, +$fragmentRefs: LocationListItem$ref, - |} + |}, |}>, +$refType: LocationsList$ref, |}; @@ -24,9 +31,9 @@ export type LocationsList$key = { +$fragmentRefs: LocationsList$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -70,6 +77,9 @@ const node: ReaderFragment = { "type": "LocationConnection", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '41e58f9d458466b240d3a17bde2d7e12'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "41e58f9d458466b240d3a17bde2d7e12"; +} + +module.exports = node; diff --git a/src/example-relay/src/SSRLocations/__generated__/LocationsQuery.graphql.js b/src/example-relay/src/SSRLocations/__generated__/LocationsQuery.graphql.js index b65fd775f4..a9d2670293 100644 --- a/src/example-relay/src/SSRLocations/__generated__/LocationsQuery.graphql.js +++ b/src/example-relay/src/SSRLocations/__generated__/LocationsQuery.graphql.js @@ -1,48 +1,33 @@ /** + * @generated SignedSource<<30240d150c87655a89cc19f0f30be30a>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type LocationsList$ref = any; export type LocationsQueryVariables = {| - first: number + first: number, |}; export type LocationsQueryResponse = {| +locations: ?{| - +$fragmentRefs: LocationsList$ref - |} + +$fragmentRefs: LocationsList$ref, + |}, |}; export type LocationsQuery = {| variables: LocationsQueryVariables, response: LocationsQueryResponse, |}; - -/* -query LocationsQuery( - $first: Int! -) { - locations(first: $first) { - ...LocationsList - } -} - -fragment LocationListItem on Location { - name -} - -fragment LocationsList on LocationConnection { - edges { - node { - id - ...LocationListItem - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -149,6 +134,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '3b0df24d2dfd6f8221b06f3dff4e6bbb'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "3b0df24d2dfd6f8221b06f3dff4e6bbb"; +} + +module.exports = node; diff --git a/src/example-relay/src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js b/src/example-relay/src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js index fd16ae0e05..415f6afa98 100644 --- a/src/example-relay/src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js +++ b/src/example-relay/src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type LocationType = "AIRPORT" | "CITY" | "COUNTRY" | "%future added value"; export type AddLocationInput = {| @@ -25,40 +32,17 @@ export type LocationsFormMutationResponse = {| +name: ?string, +id: string, +type: ?string, - |} + |}, |}, - |} + |}, |}; export type LocationsFormMutation = {| variables: LocationsFormMutationVariables, response: LocationsFormMutationResponse, |}; - -/* -mutation LocationsFormMutation( - $location: AddLocationInput! -) { - addLocation(location: $location) { - __typename - ... on AddLocationResponse { - locationEdge { - node { - locationId - name - id - type - } - } - } - ... on Error { - __isError: __typename - message - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -240,6 +224,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '96c58517ee3913a83519a6cc97925513'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "96c58517ee3913a83519a6cc97925513"; +} + +module.exports = node; diff --git a/src/example-relay/src/mutations/__generated__/LocationsListSimple.graphql.js b/src/example-relay/src/mutations/__generated__/LocationsListSimple.graphql.js index addbb17678..e780e7a2b6 100644 --- a/src/example-relay/src/mutations/__generated__/LocationsListSimple.graphql.js +++ b/src/example-relay/src/mutations/__generated__/LocationsListSimple.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; import type { FragmentReference } from "relay-runtime"; declare export opaque type LocationsListSimple$ref: FragmentReference; @@ -16,7 +23,7 @@ export type LocationsListSimple = {| +id: string, +name: ?string, +type: ?string, - |} + |}, |}>, |}, +$refType: LocationsListSimple$ref, @@ -27,9 +34,9 @@ export type LocationsListSimple$key = { +$fragmentRefs: LocationsListSimple$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { @@ -155,6 +162,9 @@ const node: ReaderFragment = { "type": "RootQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '280ae193c4eb34f11066becbad3110cc'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "280ae193c4eb34f11066becbad3110cc"; +} + +module.exports = node; diff --git a/src/example-relay/src/mutations/__generated__/SimpleLocationsQuery.graphql.js b/src/example-relay/src/mutations/__generated__/SimpleLocationsQuery.graphql.js index 1d7a3aa6cb..e68502a6e8 100644 --- a/src/example-relay/src/mutations/__generated__/SimpleLocationsQuery.graphql.js +++ b/src/example-relay/src/mutations/__generated__/SimpleLocationsQuery.graphql.js @@ -1,45 +1,29 @@ /** + * @generated SignedSource<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type LocationsListSimple$ref = any; export type SimpleLocationsQueryVariables = {||}; export type SimpleLocationsQueryResponse = {| - +$fragmentRefs: LocationsListSimple$ref + +$fragmentRefs: LocationsListSimple$ref, |}; export type SimpleLocationsQuery = {| variables: SimpleLocationsQueryVariables, response: SimpleLocationsQueryResponse, |}; - -/* -query SimpleLocationsQuery { - ...LocationsListSimple -} - -fragment LocationsListSimple on RootQuery { - locations(first: 3) { - edges { - node { - id - name - type - __typename - } - cursor - } - pageInfo { - endCursor - hasNextPage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "kind": "Literal", @@ -195,6 +179,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'aa52b74b1eaa5676ce91cd116a763562'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "aa52b74b1eaa5676ce91cd116a763562"; +} + +module.exports = node; diff --git a/src/graphql-relay-fauna/package.json b/src/graphql-relay-fauna/package.json index 5f9245c06a..da44d7a6cd 100644 --- a/src/graphql-relay-fauna/package.json +++ b/src/graphql-relay-fauna/package.json @@ -15,6 +15,6 @@ "faunadb": "^4.3.0" }, "peerDependencies": { - "graphql": "^15.3.0" + "graphql": "^15.0.0" } } diff --git a/src/graphql-resolve-wrapper/package.json b/src/graphql-resolve-wrapper/package.json index 57f4ee3a06..520447f07b 100644 --- a/src/graphql-resolve-wrapper/package.json +++ b/src/graphql-resolve-wrapper/package.json @@ -12,6 +12,6 @@ "@babel/runtime": "^7.14.6" }, "peerDependencies": { - "graphql": "^15.1.0" + "graphql": "^15.0.0" } } diff --git a/src/relay/package.json b/src/relay/package.json index b5c5a3c9ce..bd915acef7 100644 --- a/src/relay/package.json +++ b/src/relay/package.json @@ -12,10 +12,6 @@ "adeira-fetch-schema": "bin/fetch-schema.js", "adeira-relay-compiler": "bin/relay-compiler.js" }, - "scripts": { - "test": "yarn eslint src && yarn flow src", - "regenerate": "./bin/relay-compiler.js --src=./src --schema=./schema.graphql" - }, "dependencies": { "@adeira/fetch": "^2.1.0", "@adeira/js": "^2.1.0", diff --git a/src/relay/src/__tests__/__generated__/QueryRendererTestQuery.graphql.js b/src/relay/src/__tests__/__generated__/QueryRendererTestQuery.graphql.js index 3cafa4978f..50c0331f6a 100644 --- a/src/relay/src/__tests__/__generated__/QueryRendererTestQuery.graphql.js +++ b/src/relay/src/__tests__/__generated__/QueryRendererTestQuery.graphql.js @@ -1,31 +1,30 @@ /** + * @generated SignedSource<<90e076e5378b07d661996157ecaf179e>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type QueryRendererTestQueryVariables = {||}; export type QueryRendererTestQueryResponse = {| +node: ?{| - +id: string - |} + +id: string, + |}, |}; export type QueryRendererTestQuery = {| variables: QueryRendererTestQueryVariables, response: QueryRendererTestQueryResponse, |}; - -/* -query QueryRendererTestQuery { - node(id: "my-id") { - __typename - id - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "kind": "Literal", @@ -121,6 +120,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '6da37014e280a934ef08b7983d1c4d94'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "6da37014e280a934ef08b7983d1c4d94"; +} + +module.exports = node; diff --git a/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragment.graphql.js b/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragment.graphql.js index 25c5f5cb88..30fe25ffaf 100644 --- a/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragment.graphql.js +++ b/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragment.graphql.js @@ -1,16 +1,24 @@ /** + * @generated SignedSource<<7cc7ff5a40a00f0812409411b5afe249>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; import type { FragmentReference } from "relay-runtime"; -declare export opaque type useRefetchableFragment$ref: FragmentReference; -declare export opaque type useRefetchableFragment$fragmentType: useRefetchableFragment$ref; +type useRefetchableFragment$ref = any; +type useRefetchableFragment$fragmentType = any; +export type { useRefetchableFragment$ref, useRefetchableFragment$fragmentType }; export type useRefetchableFragment = {| +node: ?{| - +__typename: string + +__typename: string, |}, +$refType: useRefetchableFragment$ref, |}; @@ -20,16 +28,16 @@ export type useRefetchableFragment$key = { +$fragmentRefs: useRefetchableFragment$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { "refetch": { "connection": null, "fragmentPathInResult": [], - "operation": require('./useRefetchableFragmentRefetchQuery.graphql.js').default + "operation": require('./useRefetchableFragmentRefetchQuery.graphql') } }, "name": "useRefetchableFragment", @@ -62,6 +70,9 @@ const node: ReaderFragment = { "type": "RootQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '67fd2ef08aaa2cc38386f875382ee411'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "67fd2ef08aaa2cc38386f875382ee411"; +} + +module.exports = node; diff --git a/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragmentRefetchQuery.graphql.js b/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragmentRefetchQuery.graphql.js index 97d3e10045..44f4aef0d8 100644 --- a/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragmentRefetchQuery.graphql.js +++ b/src/relay/src/compiler/__tests__/__generated__/useRefetchableFragmentRefetchQuery.graphql.js @@ -1,34 +1,31 @@ /** + * @generated SignedSource<<92b8545d480d43fa71596c6091c8cc85>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; -type useRefetchableFragment$ref = any; +import type { FragmentReference } from "relay-runtime"; +declare export opaque type useRefetchableFragment$ref: FragmentReference; +declare export opaque type useRefetchableFragment$fragmentType: useRefetchableFragment$ref; export type useRefetchableFragmentRefetchQueryVariables = {||}; export type useRefetchableFragmentRefetchQueryResponse = {| - +$fragmentRefs: useRefetchableFragment$ref + +$fragmentRefs: useRefetchableFragment$ref, |}; export type useRefetchableFragmentRefetchQuery = {| variables: useRefetchableFragmentRefetchQueryVariables, response: useRefetchableFragmentRefetchQueryResponse, |}; - -/* -query useRefetchableFragmentRefetchQuery { - ...useRefetchableFragment -} - -fragment useRefetchableFragment on RootQuery { - node(id: "my-id") { - __typename - id - } -} */ -const node: ConcreteRequest = { +var node/*: ConcreteRequest*/ = { "fragment": { "argumentDefinitions": [], "kind": "Fragment", @@ -92,6 +89,9 @@ const node: ConcreteRequest = { "text": "query useRefetchableFragmentRefetchQuery {\n ...useRefetchableFragment\n}\n\nfragment useRefetchableFragment on RootQuery {\n node(id: \"my-id\") {\n __typename\n id\n }\n}\n" } }; -// prettier-ignore -(node: any).hash = '67fd2ef08aaa2cc38386f875382ee411'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "67fd2ef08aaa2cc38386f875382ee411"; +} + +module.exports = node; diff --git a/yarn.lock b/yarn.lock index 7891e661aa..7dc70c348b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9574,10 +9574,10 @@ graphql-tools@^4.0.8: iterall "^1.1.3" uuid "^3.1.0" -"graphql@^14.0.0 || ^15.0.0", graphql@^15.5.1: - version "15.5.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.1.tgz#f2f84415d8985e7b84731e7f3536f8bb9d383aad" - integrity sha512-FeTRX67T3LoE3LWAxxOlW2K3Bz+rMYAC18rRguK4wgXaTZMiJwSUwDmPFo3UadAKbzirKIg5Qy+sNJXbpPRnQw== +graphql@15.3.0, "graphql@^14.0.0 || ^15.0.0", graphql@^15.5.1: + version "15.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" + integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== gray-matter@^4.0.3: version "4.0.3" @@ -15130,6 +15130,11 @@ relateurl@^0.2.7: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= +relay-compiler-experimental@0.0.0-master-211d6fec: + version "0.0.0-master-211d6fec" + resolved "https://registry.yarnpkg.com/relay-compiler-experimental/-/relay-compiler-experimental-0.0.0-master-211d6fec.tgz#d2624b302e108bd8aa4b40566e772db36ee8f765" + integrity sha512-YqOGR3l0icoDqUrmPSWUTFohV1oYKx2O2TGoco1gda4+AFHZ5slnSDzWmqS7O01Oua377AWh4Vf/H9Z3joRf7w== + relay-compiler@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-11.0.2.tgz#e1e09a1c881d169a7a524ead728ad6a89c7bd4af"