diff --git a/relay.config.js b/relay.config.js new file mode 100644 index 0000000000..21747292ea --- /dev/null +++ b/relay.config.js @@ -0,0 +1,35 @@ +// @flow strict + +module.exports = { + root: '.', + sources: { + 'src/abacus-backoffice': 'abacus', + 'src/example-relay': 'example-relay', + 'src/kochka.com.mx': 'abacus', + 'src/relay': 'relay', + }, + excludes: ['**/__flowtests__/**'], + codegenCommand: './node_modules/.bin/relay-compiler-experimental', + projects: { + 'abacus': { + schema: 'src/abacus/schema.graphql', + customScalarTypes: { + ProductImageUploadable: 'String', + }, + jsModuleFormat: 'commonjs', + haste: false, + }, + 'example-relay': { + schema: 'src/example-relay/schema.graphql', + extensions: ['src/example-relay/src/LocalForm'], + jsModuleFormat: 'commonjs', + haste: false, + }, + 'relay': { + schema: 'src/relay/schema.graphql', + jsModuleFormat: 'commonjs', + haste: false, + }, + }, + isDevVariableName: '__DEV__', +}; diff --git a/src/abacus-backoffice/package.json b/src/abacus-backoffice/package.json index 3191ead3a3..1d12b907a9 100644 --- a/src/abacus-backoffice/package.json +++ b/src/abacus-backoffice/package.json @@ -10,8 +10,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-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/employees/__generated__/EmployeesPageQuery.graphql.js b/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js index 8d4a16ac86..cd8beaf1fb 100644 --- a/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js +++ b/src/abacus-backoffice/src/employees/__generated__/EmployeesPageQuery.graphql.js @@ -1,32 +1,31 @@ /** + * @generated SignedSource<<5984a6d0a20da43fdd0c8c50385a0bed>> * @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 = {| +listUsers: $ReadOnlyArray<{| +id: string, +type: string, - |}> + |}>, |}; export type EmployeesPageQuery = {| variables: EmployeesPageQueryVariables, response: EmployeesPageQueryResponse, |}; - -/* -query EmployeesPageQuery { - listUsers { - id - type - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -81,6 +80,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '25306471eddd3c6211016abedeb10009'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "25306471eddd3c6211016abedeb10009"; +} + +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 543944a3dd..d3b32c553d 100644 --- a/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js +++ b/src/abacus-backoffice/src/index/__generated__/IndexPageQuery.graphql.js @@ -1,32 +1,31 @@ /** + * @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 = {| +whoami: {| +id: ?string, +humanReadableType: ?string, - |} + |}, |}; export type IndexPageQuery = {| variables: IndexPageQueryVariables, response: IndexPageQueryResponse, |}; - -/* -query IndexPageQuery { - whoami { - id - humanReadableType - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -81,6 +80,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'd60b2473ed02228caec449ba8598cebd'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "d60b2473ed02228caec449ba8598cebd"; +} + +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 eebac64b95..6709784a36 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 = {||}; @@ -14,40 +21,22 @@ export type ProductsGridPosQueryResponse = {| +key: string, +name: string, +imageCover: ?{| - +blurhash: string + +blurhash: string, |}, +price: {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductsGridPosQuery = {| variables: ProductsGridPosQueryVariables, response: ProductsGridPosQueryResponse, |}; - -/* -query ProductsGridPosQuery { - pos { - products: listPublishedProducts { - id - key - name - imageCover { - blurhash - } - price { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -163,6 +152,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '9dd37e933f4a5700a633433087397030'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9dd37e933f4a5700a633433087397030"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/CreateProductFormMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/CreateProductFormMutation.graphql.js index b759b8ada0..d477d2a665 100644 --- a/src/abacus-backoffice/src/products/__generated__/CreateProductFormMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/CreateProductFormMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<0fdef13bc0c55df0e12ec543af06c48e>> * @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 = {| description?: ?string, |}; export type CreateProductFormMutationVariables = {| - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -29,39 +36,17 @@ export type CreateProductFormMutationResponse = {| |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type CreateProductFormMutation = {| variables: CreateProductFormMutationVariables, response: CreateProductFormMutationResponse, |}; - -/* -mutation CreateProductFormMutation( - $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": "f581c0e5f2fce2b629307d8b6d002a2d", + "cacheID": "3f1b8c83358657a7fb67a1ce293c9b70", "id": null, "metadata": {}, "name": "CreateProductFormMutation", "operationKind": "mutation", - "text": "mutation CreateProductFormMutation(\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 CreateProductFormMutation(\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 = '85e4af9267ef9411e1e38f541ef7e68b'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4534ce1cf53b54d177c9b012cdb9ed76"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductFormFragment.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductFormFragment.graphql.js index 31fd279140..dd3143d27d 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductFormFragment.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductFormFragment.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<4a2393ad5cb7e29fe8cfc50d95748677>> * @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"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; @@ -14,7 +21,7 @@ export type EditProductFormFragment = {| +key: string, +revision: string, +price: {| - +unitAmount: number + +unitAmount: number, |}, +visibility: $ReadOnlyArray, +translations: $ReadOnlyArray<{| @@ -30,9 +37,9 @@ export type EditProductFormFragment$key = { +$fragmentRefs: EditProductFormFragment$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -113,6 +120,9 @@ const node: ReaderFragment = { "type": "Product", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '920d807cf20c6aa26711073307470a9d'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "920d807cf20c6aa26711073307470a9d"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductFormMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductFormMutation.graphql.js index 7db964bade..d1a7321a47 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductFormMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductFormMutation.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 ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value"; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; @@ -15,7 +22,7 @@ export type ProductMultilingualInputTranslations = {| export type EditProductFormMutationVariables = {| productKey: string, productRevision: string, - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -28,7 +35,7 @@ export type EditProductFormMutationResponse = {| +name: string, +revision: string, +price: {| - +unitAmount: number + +unitAmount: number, |}, +visibility: $ReadOnlyArray, +translations: $ReadOnlyArray<{| @@ -42,52 +49,17 @@ export type EditProductFormMutationResponse = {| |} | {| // This will never be '%other', but we need some // value in case none of the concrete values match. - +__typename: "%other" - |} - |} + +__typename: "%other", + |}, + |}, |}; export type EditProductFormMutation = {| variables: EditProductFormMutationVariables, response: EditProductFormMutationResponse, |}; - -/* -mutation EditProductFormMutation( - $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 - price { - unitAmount - } - visibility - translations { - locale - name - description - } - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -385,6 +357,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '9fd7bfae66e7bd5dd457abfc33d7451c'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "a7e25cb35c91b36d38a2ea5d43f31999"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductHeading.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductHeading.graphql.js index cfc488a638..05a6c64514 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductHeading.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductHeading.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<56d58b7a6ea4b02d107403e7fcf3af92>> * @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 EditProductHeading$ref: FragmentReference; @@ -19,9 +26,9 @@ export type EditProductHeading$key = { +$fragmentRefs: EditProductHeading$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 = '5083a6dabf247d6d6a211ccee56e772a'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "5083a6dabf247d6d6a211ccee56e772a"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingDeleteMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingDeleteMutation.graphql.js index 61d71cc713..4d571263fe 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingDeleteMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingDeleteMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<7f821f446cab8462004a66dd16a4b9c3>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type EditProductHeadingDeleteMutationVariables = {| - productKey: string + productKey: string, |}; export type EditProductHeadingDeleteMutationResponse = {| +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 EditProductHeadingDeleteMutation = {| variables: EditProductHeadingDeleteMutationVariables, response: EditProductHeadingDeleteMutationResponse, |}; - -/* -mutation EditProductHeadingDeleteMutation( - $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": "a352e1f94199b95d8e3983ffb7db2743", + "cacheID": "dceec47313f272a68f163891fdd3f8e1", "id": null, "metadata": {}, "name": "EditProductHeadingDeleteMutation", "operationKind": "mutation", - "text": "mutation EditProductHeadingDeleteMutation(\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 EditProductHeadingDeleteMutation(\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 = 'c1136d3597d18021eecfd51142dbb6b5'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "c1136d3597d18021eecfd51142dbb6b5"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishPublishMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishPublishMutation.graphql.js index 85a5295b49..87efb597e9 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishPublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishPublishMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<4eff55ac2141980b76c79338222d9d31>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type EditProductHeadingPublishUnpublishPublishMutationVariables = {| - productKey: string + productKey: string, |}; export type EditProductHeadingPublishUnpublishPublishMutationResponse = {| +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 EditProductHeadingPublishUnpublishPublishMutation = {| variables: EditProductHeadingPublishUnpublishPublishMutationVariables, response: EditProductHeadingPublishUnpublishPublishMutationResponse, |}; - -/* -mutation EditProductHeadingPublishUnpublishPublishMutation( - $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": "3399d54c8f81fd30afe9feb610dd5c06", + "cacheID": "d1ea64ffa5a3622314c969586030baa5", "id": null, "metadata": {}, "name": "EditProductHeadingPublishUnpublishPublishMutation", "operationKind": "mutation", - "text": "mutation EditProductHeadingPublishUnpublishPublishMutation(\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 EditProductHeadingPublishUnpublishPublishMutation(\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 = '9485b9635f69b59a1a1702cff96ce47c'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9485b9635f69b59a1a1702cff96ce47c"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishUnpublishMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishUnpublishMutation.graphql.js index c25276f1b5..ede02cd9fb 100644 --- a/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishUnpublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/EditProductHeadingPublishUnpublishUnpublishMutation.graphql.js @@ -1,52 +1,41 @@ /** + * @generated SignedSource<<69e70cbccb586a110e043db28a176bcc>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type EditProductHeadingPublishUnpublishUnpublishMutationVariables = {| - productKey: string + productKey: string, |}; export type EditProductHeadingPublishUnpublishUnpublishMutationResponse = {| +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 EditProductHeadingPublishUnpublishUnpublishMutation = {| variables: EditProductHeadingPublishUnpublishUnpublishMutationVariables, response: EditProductHeadingPublishUnpublishUnpublishMutationResponse, |}; - -/* -mutation EditProductHeadingPublishUnpublishUnpublishMutation( - $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": "b4524cd20f19adb661c0d3a8988a1128", + "cacheID": "685936b9f516f24e753967b555e43281", "id": null, "metadata": {}, "name": "EditProductHeadingPublishUnpublishUnpublishMutation", "operationKind": "mutation", - "text": "mutation EditProductHeadingPublishUnpublishUnpublishMutation(\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 EditProductHeadingPublishUnpublishUnpublishMutation(\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 = 'a35342e4abcd1ab77abbeb777165d401'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "a35342e4abcd1ab77abbeb777165d401"; +} + +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 74395d6f4a..7c6189c7e2 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCardsQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<3bb9cf118e255a0ea2c52e6d5db2a466>> * @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 ProductsCardsQueryVariables = {||}; @@ -21,35 +28,16 @@ export type ProductsCardsQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductsCardsQuery = {| variables: ProductsCardsQueryVariables, response: ProductsCardsQueryResponse, |}; - -/* -query ProductsCardsQuery { - commerce { - products: searchAllProducts(clientLocale: en_US, priceSortDirection: LOW_TO_HIGH) { - id - key - name - imageCover { - blurhash - url - } - price { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -183,6 +171,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '6f2b4e8b3cb57f1f29035a109af27f21'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "b6b573d582b57ab7458e24279ff5942d"; +} + +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 1d24ad8fe5..b0a6948a12 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<> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type EditProductFormFragment$ref = any; type EditProductHeading$ref = any; @@ -21,54 +28,16 @@ export type ProductsEditLayoutQueryResponse = {| +url: string, |}>, +$fragmentRefs: EditProductHeading$ref & EditProductFormFragment$ref, - |} - |} + |}, + |}, |}; export type ProductsEditLayoutQuery = {| variables: ProductsEditLayoutQueryVariables, response: ProductsEditLayoutQueryResponse, |}; - -/* -query ProductsEditLayoutQuery( - $clientLocale: SupportedLocale! - $productKey: ID! -) { - commerce { - product: getUnpublishedProductByKey(clientLocale: $clientLocale, productKey: $productKey) { - ...EditProductHeading - images { - name - blurhash - url - } - ...EditProductFormFragment - id - } - } -} - -fragment EditProductFormFragment on Product { - key - revision - price { - unitAmount - } - visibility - translations { - locale - name - description - } -} - -fragment EditProductHeading on Product { - key - isPublished -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -149,12 +118,12 @@ return { "name": "getUnpublishedProductByKey", "plural": false, "selections": [ - (v3/*: any*/), { "args": null, "kind": "FragmentSpread", "name": "EditProductHeading" }, + (v3/*: any*/), { "args": null, "kind": "FragmentSpread", @@ -290,6 +259,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'aefc22ba3e208ce99c9c0202169a9a72'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "cbcbb0a891fcf2c7ee41d37a99e8afcf"; +} + +module.exports = node; diff --git a/src/example-relay/package.json b/src/example-relay/package.json index 3defc76d85..60c942395f 100644 --- a/src/example-relay/package.json +++ b/src/example-relay/package.json @@ -42,7 +42,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", "test-bc": "yarn monorepo-babel-node scripts/test-bc.js" } 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/kochka.com.mx/package.json b/src/kochka.com.mx/package.json index 4e825b0cff..22a631dd59 100644 --- a/src/kochka.com.mx/package.json +++ b/src/kochka.com.mx/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 --fbt-common-path=./translations/common.js --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/kochka.com.mx/relay.config.js b/src/kochka.com.mx/relay.config.js deleted file mode 100644 index 9445fcfb8f..0000000000 --- a/src/kochka.com.mx/relay.config.js +++ /dev/null @@ -1,6 +0,0 @@ -// @flow strict - -module.exports = { - src: './src', - schema: '../abacus/schema.graphql', -}; diff --git a/src/kochka.com.mx/src/design/svg/__generated__/Cart.js b/src/kochka.com.mx/src/design/svg/__generated__/Cart.js deleted file mode 100644 index d69ba4f5e7..0000000000 --- a/src/kochka.com.mx/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/kochka.com.mx/src/design/svg/__generated__/Facebook.js b/src/kochka.com.mx/src/design/svg/__generated__/Facebook.js deleted file mode 100644 index a1e5779fb1..0000000000 --- a/src/kochka.com.mx/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/kochka.com.mx/src/design/svg/__generated__/Instagram.js b/src/kochka.com.mx/src/design/svg/__generated__/Instagram.js deleted file mode 100644 index a882e40d5d..0000000000 --- a/src/kochka.com.mx/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/kochka.com.mx/src/design/svg/__generated__/flags/mx.js b/src/kochka.com.mx/src/design/svg/__generated__/flags/mx.js deleted file mode 100644 index 06a3edb3dc..0000000000 --- a/src/kochka.com.mx/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/kochka.com.mx/src/design/svg/__generated__/flags/us.js b/src/kochka.com.mx/src/design/svg/__generated__/flags/us.js deleted file mode 100644 index 4d07afca58..0000000000 --- a/src/kochka.com.mx/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/kochka.com.mx/src/shop/__generated__/ProductPageLayoutQuery.graphql.js b/src/kochka.com.mx/src/shop/__generated__/ProductPageLayoutQuery.graphql.js index 176e94e59f..9e4c1debc1 100644 --- a/src/kochka.com.mx/src/shop/__generated__/ProductPageLayoutQuery.graphql.js +++ b/src/kochka.com.mx/src/shop/__generated__/ProductPageLayoutQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<8e0d34bfd778541b0ad0bfd30e4f9335>> * @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"; @@ -20,34 +27,16 @@ export type ProductPageLayoutQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |} - |} + |}, + |}, |}; export type ProductPageLayoutQuery = {| variables: ProductPageLayoutQueryVariables, response: ProductPageLayoutQueryResponse, |}; - -/* -query ProductPageLayoutQuery( - $clientLocale: SupportedLocale! - $productKey: ID! -) { - commerce { - product: getPublishedProductByKey(clientLocale: $clientLocale, productKey: $productKey) { - name - description - price { - unitAmount - unitAmountCurrency - } - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -197,6 +186,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'aa12dc4e2d8681bb3b07108232e04a57'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e89d42f29651dccb84298d501899c2ad"; +} + +module.exports = node; diff --git a/src/kochka.com.mx/src/shop/__generated__/ShopLayoutContentQuery.graphql.js b/src/kochka.com.mx/src/shop/__generated__/ShopLayoutContentQuery.graphql.js index 0f44c00f7b..0e5e232a26 100644 --- a/src/kochka.com.mx/src/shop/__generated__/ShopLayoutContentQuery.graphql.js +++ b/src/kochka.com.mx/src/shop/__generated__/ShopLayoutContentQuery.graphql.js @@ -1,11 +1,18 @@ /** + * @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 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 = {| @@ -22,35 +29,16 @@ export type ShopLayoutContentQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; 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 - } - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -210,6 +198,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'ca5dd8074762cd481eb86fbf69c195c1'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "5be16ecedbada9d8deefa303f5bb54f5"; +} + +module.exports = node; diff --git a/src/relay/package.json b/src/relay/package.json index 6aa35664bc..d86621c67e 100644 --- a/src/relay/package.json +++ b/src/relay/package.json @@ -13,10 +13,6 @@ "adeira-relay-compiler": "bin/relay-compiler.js", "adeira-relay-compiler-experimental": "node_modules/.bin/relay-compiler-experimental" }, - "scripts": { - "test": "yarn eslint src && yarn flow src", - "regenerate": "./bin/relay-compiler.js --src=./src --schema=./schema.graphql" - }, "dependencies": { "@adeira/fetch": "^2.0.2", "@adeira/js": "^2.1.0", @@ -29,7 +25,7 @@ "is-ci": "^3.0.0", "react-relay": "^11.0.2", "relay-compiler": "^11.0.2", - "relay-compiler-experimental": "0.0.0-master-a71052f5", + "relay-compiler-experimental": "0.0.0-master-76d5a02e", "relay-config": "^11.0.2", "relay-runtime": "^11.0.2" }, 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 2581b5f685..e31e8054fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14731,10 +14731,10 @@ 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-a71052f5: - version "0.0.0-master-a71052f5" - resolved "https://registry.yarnpkg.com/relay-compiler-experimental/-/relay-compiler-experimental-0.0.0-master-a71052f5.tgz#9986a202eb03438be117cd1bc92871f77c5b87ce" - integrity sha512-H5EaCtZWKcdDCYvTv6VM7kEI3mKNMEZw1NND2ZYr7khMzJ0OcMGJSF3ObVibxTIKwF7C1BMZ7SbIChtX4YdScA== +relay-compiler-experimental@0.0.0-master-76d5a02e: + version "0.0.0-master-76d5a02e" + resolved "https://registry.yarnpkg.com/relay-compiler-experimental/-/relay-compiler-experimental-0.0.0-master-76d5a02e.tgz#68c4eedeb1e2bef2811159c271ea60c4cee17891" + integrity sha512-eXbZ2jbdg6wNR7g+PAO+6XMhkpUC3gKNd0DVlcUZdwkAMqX7lM+7J2EF4ow3XoqpDmTPTNO/JOngIAoZp/hpvw== relay-compiler@^11.0.2: version "11.0.2"