diff --git a/package.json b/package.json index 00f468226c..0d7d707f78 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "flow-bin": "^0.159.0", "glob": "^7.1.7", "jest": "^27.1.0", - "jest-runner-eslint": "^0.10.1" + "jest-runner-eslint": "^0.10.1", + "relay-compiler-experimental": "0.0.0-main-9a076b66" }, "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 ed110b4735..8d3eb92da9 100644 --- a/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js +++ b/src/abacus-backoffice/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js @@ -1,12 +1,19 @@ /** + * @generated SignedSource<<986336793b17fe503028ed57ece8b176>> * @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 = {| +auth: {| @@ -14,29 +21,16 @@ export type AuthButtonsAuthorizeWebappMutationResponse = {| +success: boolean, +sessionToken: ?string, +failureMessage: ?string, - |} - |} + |}, + |}, |}; export type AuthButtonsAuthorizeWebappMutation = {| variables: AuthButtonsAuthorizeWebappMutationVariables, response: AuthButtonsAuthorizeWebappMutationResponse, |}; - -/* -mutation AuthButtonsAuthorizeWebappMutation( - $googleIdToken: String! -) { - auth { - authorizeWebapp(googleIdToken: $googleIdToken) { - success - sessionToken - failureMessage - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -122,6 +116,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'e758cafe9edc929ea309db7a30ac72e6'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e758cafe9edc929ea309db7a30ac72e6"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js b/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js index 2040a84ed3..080c205a9d 100644 --- a/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js +++ b/src/abacus-backoffice/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js @@ -1,38 +1,34 @@ /** + * @generated SignedSource<<826482f820c70bf125c18a32ea01ab3e>> * @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 = {| +auth: {| +deauthorize: {| - +__typename: string - |} - |} + +__typename: string, + |}, + |}, |}; export type AuthButtonsDeauthorizeWebappMutation = {| variables: AuthButtonsDeauthorizeWebappMutationVariables, response: AuthButtonsDeauthorizeWebappMutationResponse, |}; - -/* -mutation AuthButtonsDeauthorizeWebappMutation( - $sessionToken: String! -) { - auth { - deauthorize(sessionToken: $sessionToken) { - __typename - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -104,6 +100,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '901b16d0f2f66b120f8dde76d966dfff'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "901b16d0f2f66b120f8dde76d966dfff"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js b/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js index d123d4e78f..4e5e1bfb74 100644 --- a/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js +++ b/src/abacus-backoffice/src/__generated__/NavigationHeaderQuery.graphql.js @@ -1,35 +1,32 @@ /** + * @generated SignedSource<<774b137bef4a2d8d202a4f2410962c2b>> * @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 = {| +auth: {| +whoami: {| - +isDebugAssertionsEnabled: boolean - |} - |} + +isDebugAssertionsEnabled: boolean, + |}, + |}, |}; export type NavigationHeaderQuery = {| variables: NavigationHeaderQueryVariables, response: NavigationHeaderQueryResponse, |}; - -/* -query NavigationHeaderQuery { - auth { - whoami { - isDebugAssertionsEnabled - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "alias": null, "args": null, @@ -119,6 +116,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '095528fcceaa1f54d7dc1ed1a51fccaa'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "095528fcceaa1f54d7dc1ed1a51fccaa"; +} + +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 d36ae8432a..e567939058 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<<056170ac7e8e3a8c2e364bfe975421d0>> * @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 = {| @@ -13,28 +20,16 @@ export type EmployeesPageQueryResponse = {| +name: ?string, +hasEmailVerified: ?boolean, +isActive: boolean, - |}> - |} + |}>, + |}, |}; export type EmployeesPageQuery = {| variables: EmployeesPageQueryVariables, response: EmployeesPageQueryResponse, |}; - -/* -query EmployeesPageQuery { - auth { - listUsers { - id - name - hasEmailVerified - isActive - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -114,6 +109,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '3aed45eb84d77bd8e9c44f8892f2816f'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "3aed45eb84d77bd8e9c44f8892f2816f"; +} + +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 dbc7a1308d..e2c5e0d283 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<<7e12c77298baf95310be9e7f58ec5bd9>> * @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 = {| @@ -16,29 +23,15 @@ export type IndexPageQueryResponse = {| +productName: string, +productUnits: number, |}>, - |} + |}, |}; export type IndexPageQuery = {| variables: IndexPageQueryVariables, response: IndexPageQueryResponse, |}; - -/* -query IndexPageQuery { - analytics { - mostSoldProducts { - productName - productUnits - } - leastSoldProducts { - productName - productUnits - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "alias": null, @@ -115,6 +108,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'f344107d4c3381869ebb11562fcd3ed0'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "f344107d4c3381869ebb11562fcd3ed0"; +} + +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 edf7e7c1d1..ba4b9a8325 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<> * @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"; @@ -28,35 +35,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!]! - $clientLocale: SupportedLocale! -) { - pos { - checkout(input: {selectedProducts: $checkoutInput}, clientLocale: $clientLocale) { - __typename - ... on PosCheckoutPayload { - id - } - ... on PosCheckoutError { - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -172,6 +161,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '3b8a9c4decbee14c8acb49768c9d3091'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "3b8a9c4decbee14c8acb49768c9d3091"; +} + +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 072041c551..a2b09f5fb2 100644 --- a/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js +++ b/src/abacus-backoffice/src/pos/__generated__/ProductsGridPosQuery.graphql.js @@ -1,11 +1,18 @@ /** + * @generated SignedSource<<20b00d468d1af430a6a804a5a121f4c8>> * @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 ProductsGridPosQueryVariables = {| @@ -27,39 +34,16 @@ export type ProductsGridPosQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductsGridPosQuery = {| variables: ProductsGridPosQueryVariables, response: ProductsGridPosQueryResponse, |}; - -/* -query ProductsGridPosQuery( - $clientLocale: SupportedLocale! - $priceSortDirection: PriceSortDirection! - $categories: [ID!] -) { - commerce { - products: searchAllPublishedProducts(clientLocale: $clientLocale, priceSortDirection: $priceSortDirection, categories: $categories, visibility: POS) { - id - key - name - imageCover { - blurhash - url - } - price { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -226,6 +210,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '8706603b11361b030f560636b898ace0'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "a7abd9398fc1e5234249b72d1424d000"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductAddonsQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductAddonsQuery.graphql.js index 19789161b5..04c973346f 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductAddonsQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductAddonsQuery.graphql.js @@ -1,14 +1,21 @@ /** + * @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 SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductAddonsQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type ProductAddonsQueryResponse = {| +commerce: {| @@ -19,32 +26,16 @@ export type ProductAddonsQueryResponse = {| +unitAmount: number, +unitAmountCurrency: SupportedCurrency, |}, - |}> - |} + |}>, + |}, |}; export type ProductAddonsQuery = {| variables: ProductAddonsQueryVariables, response: ProductAddonsQueryResponse, |}; - -/* -query ProductAddonsQuery( - $clientLocale: SupportedLocale! -) { - commerce { - productAddons: searchAllProductAddons(clientLocale: $clientLocale) { - id - name - priceExtra { - unitAmount - unitAmountCurrency - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -148,6 +139,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'b7b1f1b709c3e56f2a3a999bf3f03cdb'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "b7b1f1b709c3e56f2a3a999bf3f03cdb"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductCategoriesListQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductCategoriesListQuery.graphql.js index 0d16af0e07..213aa173fb 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductCategoriesListQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductCategoriesListQuery.graphql.js @@ -1,41 +1,36 @@ /** + * @generated SignedSource<<30808901f10894fb6855f63c07ec4bc9>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductCategoriesListQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type ProductCategoriesListQueryResponse = {| +commerce: {| +categories: $ReadOnlyArray - |} + |}>, + |}, |}; export type ProductCategoriesListQuery = {| variables: ProductCategoriesListQueryVariables, response: ProductCategoriesListQueryResponse, |}; - -/* -query ProductCategoriesListQuery( - $clientLocale: SupportedLocale! -) { - commerce { - categories: searchAllProductCategories(clientLocale: $clientLocale) { - id - name - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -114,6 +109,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '7316f6f463886f0de452366ff2fc918e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "7316f6f463886f0de452366ff2fc918e"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductCreateFormData.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductCreateFormData.graphql.js index 7befa4903e..b886816888 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductCreateFormData.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductCreateFormData.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 ProductFormAddonsData$ref = any; type ProductFormCategoriesData$ref = any; @@ -12,10 +19,10 @@ declare export opaque type ProductCreateFormData$ref: FragmentReference; declare export opaque type ProductCreateFormData$fragmentType: ProductCreateFormData$ref; export type ProductCreateFormData = {| +productCategories: $ReadOnlyArray, +productAddons: $ReadOnlyArray, +$refType: ProductCreateFormData$ref, |}; @@ -25,9 +32,9 @@ export type ProductCreateFormData$key = { +$fragmentRefs: ProductCreateFormData$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = [ { "kind": "Variable", @@ -83,6 +90,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = 'ff8090d2ca7b56d4e1f13870c0837098'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "ff8090d2ca7b56d4e1f13870c0837098"; +} + +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 56b4ba7dbc..4d7035ef69 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<<5b91b0864a03a118850ad3716956a748>> * @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"; @@ -14,7 +21,7 @@ export type ProductMultilingualInputTranslations = {| |}; export type ProductCreateFormMutationVariables = {| clientLocale: SupportedLocale, - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -32,42 +39,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( - $clientLocale: SupportedLocale! - $productImagesNames: [ProductImageUploadable!]! - $productPriceUnitAmount: Int! - $translations: [ProductMultilingualInputTranslations!]! - $visibility: [ProductMultilingualInputVisibility!]! - $categories: [ID!]! - $addons: [ID!]! -) { - commerce { - result: productCreate(clientLocale: $clientLocale, productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility, categories: $categories, addons: $addons}) { - __typename - ... on Product { - __typename - name - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -271,7 +253,14 @@ return { { "kind": "InlineFragment", "selections": [ - (v9/*: any*/) + (v9/*: any*/), + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } ], "type": "Product", "abstractKey": null @@ -293,15 +282,18 @@ return { ] }, "params": { - "cacheID": "09dc539e4e391d2e1f9d8cfb71600895", + "cacheID": "00c8232f0b57981df0af028b799429d7", "id": null, "metadata": {}, "name": "ProductCreateFormMutation", "operationKind": "mutation", - "text": "mutation ProductCreateFormMutation(\n $clientLocale: SupportedLocale!\n $productImagesNames: [ProductImageUploadable!]!\n $productPriceUnitAmount: Int!\n $translations: [ProductMultilingualInputTranslations!]!\n $visibility: [ProductMultilingualInputVisibility!]!\n $categories: [ID!]!\n $addons: [ID!]!\n) {\n commerce {\n result: productCreate(clientLocale: $clientLocale, productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility, categories: $categories, addons: $addons}) {\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 $clientLocale: SupportedLocale!\n $productImagesNames: [ProductImageUploadable!]!\n $productPriceUnitAmount: Int!\n $translations: [ProductMultilingualInputTranslations!]!\n $visibility: [ProductMultilingualInputVisibility!]!\n $categories: [ID!]!\n $addons: [ID!]!\n) {\n commerce {\n result: productCreate(clientLocale: $clientLocale, productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility, categories: $categories, addons: $addons}) {\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 = '1b98bc8dfc03ea468dd955a9bcf32624'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "5281cea08ca8f73289b8cf2d5ac5af08"; +} + +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 3782be789c..83e49f6e47 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<<69f453949120e6738a5a373a31e5c3a8>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type ProductFormAddonsData$ref = any; type ProductFormCategoriesData$ref = any; @@ -15,19 +22,19 @@ export type ProductEditFormData = {| +key: string, +revision: string, +availableCategories: $ReadOnlyArray, +availableAddons: $ReadOnlyArray, +price: {| - +unitAmount: number + +unitAmount: number, |}, +selectedCategories: $ReadOnlyArray, +selectedAddons: $ReadOnlyArray, +visibility: $ReadOnlyArray, +enTranslation: ?{| @@ -39,7 +46,7 @@ export type ProductEditFormData = {| +description: ?string, |}, +images: $ReadOnlyArray<{| - +name: string + +name: string, |}>, +$refType: ProductEditFormData$ref, |}; @@ -49,9 +56,9 @@ export type ProductEditFormData$key = { +$fragmentRefs: ProductEditFormData$ref, ... }; +*/ - -const node: ReaderFragment = (function(){ +var node/*: ReaderFragment*/ = (function(){ var v0 = [ { "kind": "Variable", @@ -236,6 +243,9 @@ return { "abstractKey": null }; })(); -// prettier-ignore -(node: any).hash = '681633a20f6272cb9d2dbeae0f7b4919'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "681633a20f6272cb9d2dbeae0f7b4919"; +} + +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 94a8ae5f2f..ede7463ddc 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<<3027d4fea16f6a91c137fcf87c29d9c9>> * @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"; @@ -17,7 +24,7 @@ export type ProductEditFormMutationVariables = {| clientLocale: SupportedLocale, productKey: string, productRevision: string, - productImagesNames: $ReadOnlyArray, + productImagesNames: $ReadOnlyArray, productPriceUnitAmount: number, translations: $ReadOnlyArray, visibility: $ReadOnlyArray, @@ -38,95 +45,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( - $clientLocale: SupportedLocale! - $productKey: ID! - $productRevision: ID! - $productImagesNames: [ProductImageUploadable!]! - $productPriceUnitAmount: Int! - $translations: [ProductMultilingualInputTranslations!]! - $visibility: [ProductMultilingualInputVisibility!]! - $categories: [ID!]! - $addons: [ID!]! -) { - commerce { - result: productUpdate(clientLocale: $clientLocale, productKey: $productKey, productRevision: $productRevision, productMultilingualInput: {images: $productImagesNames, price: {unitAmount: $productPriceUnitAmount, unitAmountCurrency: MXN}, translations: $translations, visibility: $visibility, categories: $categories, addons: $addons}) { - __typename - ... on Product { - __typename - id - name - revision - ...ProductEditFormData - } - ... on ProductError { - __typename - message - } - } - } -} - -fragment ProductEditFormData on Product { - key - revision - availableCategories(clientLocale: $clientLocale) { - ...ProductFormCategoriesData - id - } - availableAddons(clientLocale: $clientLocale) { - ...ProductFormAddonsData - id - } - price { - unitAmount - } - selectedCategories(clientLocale: $clientLocale) { - id - } - selectedAddons(clientLocale: $clientLocale) { - id - } - visibility - enTranslation: translation(locale: en_US) { - name - description - } - esTranslation: translation(locale: es_MX) { - name - description - } - images { - name - } -} - -fragment ProductFormAddonsData on ProductAddon { - id - name - priceExtra { - unitAmount - unitAmountCurrency - } -} - -fragment ProductFormCategoriesData on ProductCategory { - id - name -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -567,6 +496,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '2400c8982c9b36261593cb7920f33251'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "5ea7f8b50995909c30fb798b4847a574"; +} + +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 38a587399b..653b09f335 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<<0318404b5b4cf574a0696373cb2fed52>> * @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; @@ -20,9 +27,9 @@ export type ProductEditHeading$key = { +$fragmentRefs: ProductEditHeading$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -53,6 +60,9 @@ const node: ReaderFragment = { "type": "Product", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '23ea1991f3bc6f0a3e444564c89e8683'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "23ea1991f3bc6f0a3e444564c89e8683"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js index de6fb75e14..7fefb0c2d0 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<456b1817126d0069ce4a5be883cd7c4e>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductEditHeadingArchiveMutationVariables = {| @@ -13,43 +20,24 @@ export type ProductEditHeadingArchiveMutationVariables = {| export type ProductEditHeadingArchiveMutationResponse = {| +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 ProductEditHeadingArchiveMutation = {| variables: ProductEditHeadingArchiveMutationVariables, response: ProductEditHeadingArchiveMutationResponse, |}; - -/* -mutation ProductEditHeadingArchiveMutation( - $productKey: ID! - $clientLocale: SupportedLocale! -) { - commerce { - productOrError: productArchive(productKey: $productKey, clientLocale: $clientLocale) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -165,6 +153,20 @@ return { "plural": false, "selections": [ (v3/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -182,15 +184,18 @@ return { ] }, "params": { - "cacheID": "fa92a9bb8cc457782ad37b1b68234958", + "cacheID": "73594116adb0c0b9e787d633b42a43ba", "id": null, "metadata": {}, "name": "ProductEditHeadingArchiveMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingArchiveMutation(\n $productKey: ID!\n $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productArchive(productKey: $productKey, clientLocale: $clientLocale) {\n __typename\n ... on Product {\n __typename\n }\n ... on ProductError {\n __typename\n message\n }\n }\n }\n}\n" + "text": "mutation ProductEditHeadingArchiveMutation(\n $productKey: ID!\n $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productArchive(productKey: $productKey, clientLocale: $clientLocale) {\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 = 'f3fe8c4c93882b50f010bd5bf8fb4f0e'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "22797745c2fcdec81744a3a8632619e1"; +} + +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 5ad82244cd..33d2db6cec 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<33413261c7077cf85155add020ab61c2>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductEditHeadingPublishUnpublishPublishMutationVariables = {| @@ -13,43 +20,24 @@ export type ProductEditHeadingPublishUnpublishPublishMutationVariables = {| 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! - $clientLocale: SupportedLocale! -) { - commerce { - productOrError: productPublish(productKey: $productKey, clientLocale: $clientLocale) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -165,6 +153,20 @@ return { "plural": false, "selections": [ (v3/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -182,15 +184,18 @@ return { ] }, "params": { - "cacheID": "65270bdea8e8bd09709756b5f4d755ae", + "cacheID": "565a613b6c2c0ea3b7db874add5c8a3a", "id": null, "metadata": {}, "name": "ProductEditHeadingPublishUnpublishPublishMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingPublishUnpublishPublishMutation(\n $productKey: ID!\n $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productPublish(productKey: $productKey, clientLocale: $clientLocale) {\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 $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productPublish(productKey: $productKey, clientLocale: $clientLocale) {\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 = 'ce05aadb31863ec708f5036d49a5cf5f'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "fc652ae1a9c373aa274a64cdd1398435"; +} + +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 242bfdfca9..199f18f433 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.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 SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductEditHeadingPublishUnpublishUnpublishMutationVariables = {| @@ -13,43 +20,24 @@ export type ProductEditHeadingPublishUnpublishUnpublishMutationVariables = {| 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! - $clientLocale: SupportedLocale! -) { - commerce { - productOrError: productUnpublish(productKey: $productKey, clientLocale: $clientLocale) { - __typename - ... on Product { - __typename - } - ... on ProductError { - __typename - message - } - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -165,6 +153,20 @@ return { "plural": false, "selections": [ (v3/*: any*/), + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + } + ], + "type": "Product", + "abstractKey": null + }, { "kind": "InlineFragment", "selections": [ @@ -182,15 +184,18 @@ return { ] }, "params": { - "cacheID": "59206588ead3c453ffd248768ec0dfb1", + "cacheID": "a1e962e97f0d267b60d2cb176289029f", "id": null, "metadata": {}, "name": "ProductEditHeadingPublishUnpublishUnpublishMutation", "operationKind": "mutation", - "text": "mutation ProductEditHeadingPublishUnpublishUnpublishMutation(\n $productKey: ID!\n $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productUnpublish(productKey: $productKey, clientLocale: $clientLocale) {\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 $clientLocale: SupportedLocale!\n) {\n commerce {\n productOrError: productUnpublish(productKey: $productKey, clientLocale: $clientLocale) {\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 = '336e82aea443fa579b50ee8a5e0808ba'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "ca5121722320fbc3b054d053c3a3562e"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductFormAddonsData.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductFormAddonsData.graphql.js index bf07ff037d..b6f6397c25 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductFormAddonsData.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductFormAddonsData.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 SupportedCurrency = "MXN" | "%future added value"; import type { FragmentReference } from "relay-runtime"; @@ -24,9 +31,9 @@ export type ProductFormAddonsData$key = $ReadOnlyArray<{ +$fragmentRefs: ProductFormAddonsData$ref, ... }>; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { @@ -77,6 +84,9 @@ const node: ReaderFragment = { "type": "ProductAddon", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'e9018dac3479ec0c4cb9980f78d8a753'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "e9018dac3479ec0c4cb9980f78d8a753"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductFormCategoriesData.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductFormCategoriesData.graphql.js index babfe08299..f60c416c41 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductFormCategoriesData.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductFormCategoriesData.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 ProductFormCategoriesData$ref: FragmentReference; @@ -19,9 +26,9 @@ export type ProductFormCategoriesData$key = $ReadOnlyArray<{ +$fragmentRefs: ProductFormCategoriesData$ref, ... }>; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { @@ -47,6 +54,9 @@ const node: ReaderFragment = { "type": "ProductCategory", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'c60bf51d24be138f3f671ef64bb967d1'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "c60bf51d24be138f3f671ef64bb967d1"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsCardsData.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsCardsData.graphql.js index 8a5e0240e0..78936b9a90 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCardsData.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCardsData.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<895a9ef7ad24e84fcfaed5c61e0eb151>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; export type SupportedCurrency = "MXN" | "%future added value"; import type { FragmentReference } from "relay-runtime"; @@ -29,9 +36,9 @@ export type ProductsCardsData$key = $ReadOnlyArray<{ +$fragmentRefs: ProductsCardsData$ref, ... }>; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": { @@ -114,6 +121,9 @@ const node: ReaderFragment = { "type": "Product", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '9bc1cea9219bccd287fa9f0095e64d89'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9bc1cea9219bccd287fa9f0095e64d89"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js index 8d8a08fb92..8b7f77864f 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js @@ -1,12 +1,19 @@ /** + * @generated SignedSource<<0ed607c9be34ffc22efe29e74cdbf16d>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type ProductsCardsData$ref = any; -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 SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductsCardsInCategoryQueryVariables = {| clientLocale: SupportedLocale, @@ -16,45 +23,17 @@ export type ProductsCardsInCategoryQueryVariables = {| export type ProductsCardsInCategoryQueryResponse = {| +commerce: {| +products: $ReadOnlyArray - |} + +$fragmentRefs: ProductsCardsData$ref, + |}>, + |}, |}; export type ProductsCardsInCategoryQuery = {| variables: ProductsCardsInCategoryQueryVariables, response: ProductsCardsInCategoryQueryResponse, |}; - -/* -query ProductsCardsInCategoryQuery( - $clientLocale: SupportedLocale! - $priceSortDirection: PriceSortDirection! - $categories: [ID!] -) { - commerce { - products: searchAllProducts(clientLocale: $clientLocale, priceSortDirection: $priceSortDirection, categories: $categories) { - ...ProductsCardsData - id - } - } -} - -fragment ProductsCardsData on Product { - id - key - name - imageCover { - blurhash - url - } - price { - unitAmount - unitAmountCurrency - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = { "defaultValue": null, "kind": "LocalArgument", @@ -244,6 +223,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '1fb8a914e7bbc4c6535f25b4f592cb12'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "978767bfb60ad8c2fbe1d8fad793c608"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsCategoriesQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsCategoriesQuery.graphql.js index 1dfeae1b44..8d09ae8f64 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCategoriesQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCategoriesQuery.graphql.js @@ -1,41 +1,36 @@ /** + * @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 SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductsCategoriesQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type ProductsCategoriesQueryResponse = {| +commerce: {| +productCategories: $ReadOnlyArray - |} + |}>, + |}, |}; export type ProductsCategoriesQuery = {| variables: ProductsCategoriesQueryVariables, response: ProductsCategoriesQueryResponse, |}; - -/* -query ProductsCategoriesQuery( - $clientLocale: SupportedLocale! -) { - commerce { - productCategories: searchAllProductCategories(clientLocale: $clientLocale) { - id - name - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -114,6 +109,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'cf82629107f79add52f01d591e0da585'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "cf82629107f79add52f01d591e0da585"; +} + +module.exports = node; diff --git a/src/abacus-backoffice/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js b/src/abacus-backoffice/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js index fbd30a486b..6e7a68a767 100644 --- a/src/abacus-backoffice/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js +++ b/src/abacus-backoffice/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js @@ -1,61 +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 ProductCreateFormData$ref = any; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type ProductsCreateLayoutQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type ProductsCreateLayoutQueryResponse = {| +commerce: {| - +$fragmentRefs: ProductCreateFormData$ref - |} + +$fragmentRefs: ProductCreateFormData$ref, + |}, |}; export type ProductsCreateLayoutQuery = {| variables: ProductsCreateLayoutQueryVariables, response: ProductsCreateLayoutQueryResponse, |}; - -/* -query ProductsCreateLayoutQuery( - $clientLocale: SupportedLocale! -) { - commerce { - ...ProductCreateFormData - } -} - -fragment ProductCreateFormData on CommerceQuery { - productCategories: searchAllProductCategories(clientLocale: $clientLocale) { - ...ProductFormCategoriesData - id - } - productAddons: searchAllProductAddons(clientLocale: $clientLocale) { - ...ProductFormAddonsData - id - } -} - -fragment ProductFormAddonsData on ProductAddon { - id - name - priceExtra { - unitAmount - unitAmountCurrency - } -} - -fragment ProductFormCategoriesData on ProductCategory { - id - name -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -191,6 +164,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '92d67871b187e5ae9ad965b1fea6eac2'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "92d67871b187e5ae9ad965b1fea6eac2"; +} + +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 109b0d8710..a48acdb040 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<<02d4d1e9edb3223a47a008d9b09306e6>> * @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,89 +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 - availableCategories(clientLocale: $clientLocale) { - ...ProductFormCategoriesData - id - } - availableAddons(clientLocale: $clientLocale) { - ...ProductFormAddonsData - id - } - price { - unitAmount - } - selectedCategories(clientLocale: $clientLocale) { - id - } - selectedAddons(clientLocale: $clientLocale) { - id - } - visibility - enTranslation: translation(locale: en_US) { - name - description - } - esTranslation: translation(locale: es_MX) { - name - description - } - images { - name - } -} - -fragment ProductEditHeading on Product { - key - name - isPublished -} - -fragment ProductFormAddonsData on ProductAddon { - id - name - priceExtra { - unitAmount - unitAmountCurrency - } -} - -fragment ProductFormCategoriesData on ProductCategory { - id - name -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -215,12 +149,12 @@ return { "name": "getUnpublishedProductByKey", "plural": false, "selections": [ - (v4/*: any*/), { "args": null, "kind": "FragmentSpread", "name": "ProductEditHeading" }, + (v4/*: any*/), { "args": null, "kind": "FragmentSpread", @@ -416,6 +350,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 e5b48de544..8b7c80c42d 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/icons": "^1.0.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/__generated__/MenuQuery.graphql.js b/src/abacus-kochka/src/__generated__/MenuQuery.graphql.js index a6d7039989..a6e3b4d262 100644 --- a/src/abacus-kochka/src/__generated__/MenuQuery.graphql.js +++ b/src/abacus-kochka/src/__generated__/MenuQuery.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<51e7e69c6b3172a13a9ce43838beb303>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ConcreteRequest } from 'relay-runtime'; type MenuSectionCoffee$ref = any; type MenuSectionDumplingSavory$ref = any; @@ -13,85 +20,20 @@ type MenuSectionSpecialities$ref = any; type MenuSectionTea$ref = any; export type SupportedLocale = "en_US" | "es_MX" | "%future added value"; export type MenuQueryVariables = {| - clientLocale: SupportedLocale + clientLocale: SupportedLocale, |}; export type MenuQueryResponse = {| +menu: {| - +$fragmentRefs: MenuSectionCoffee$ref & MenuSectionTea$ref & MenuSectionMilkshake$ref & MenuSectionSpecialities$ref & MenuSectionDumplingSweet$ref & MenuSectionDumplingSavory$ref - |} + +$fragmentRefs: MenuSectionCoffee$ref & MenuSectionTea$ref & MenuSectionMilkshake$ref & MenuSectionSpecialities$ref & MenuSectionDumplingSweet$ref & MenuSectionDumplingSavory$ref, + |}, |}; export type MenuQuery = {| variables: MenuQueryVariables, response: MenuQueryResponse, |}; - -/* -query MenuQuery( - $clientLocale: SupportedLocale! -) { - menu { - ...MenuSectionCoffee - ...MenuSectionTea - ...MenuSectionMilkshake - ...MenuSectionSpecialities - ...MenuSectionDumplingSweet - ...MenuSectionDumplingSavory - } -} - -fragment MenuRow on Product { - name - description - price { - unitAmount - unitAmountCurrency - } -} - -fragment MenuSectionCoffee on MenuQuery { - coffeeMenu: menu(clientLocale: $clientLocale, section: COFFEE) { - id - ...MenuRow - } -} - -fragment MenuSectionDumplingSavory on MenuQuery { - dumplingSavoryMenu: menu(clientLocale: $clientLocale, section: DUMPLING_SAVORY) { - id - ...MenuRow - } -} - -fragment MenuSectionDumplingSweet on MenuQuery { - sumplingSweetMenu: menu(clientLocale: $clientLocale, section: DUMPLING_SWEET) { - id - ...MenuRow - } -} - -fragment MenuSectionMilkshake on MenuQuery { - milkshakesMenu: menu(clientLocale: $clientLocale, section: MILKSHAKES) { - id - ...MenuRow - } -} - -fragment MenuSectionSpecialities on MenuQuery { - specialitiesMenu: menu(clientLocale: $clientLocale, section: SPECIALITIES) { - id - ...MenuRow - } -} - -fragment MenuSectionTea on MenuQuery { - teaMenu: menu(clientLocale: $clientLocale, section: TEA) { - id - ...MenuRow - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -335,6 +277,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = '41eac31bba01248a16eee54ae635805f'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "41eac31bba01248a16eee54ae635805f"; +} + +module.exports = node; 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/menu/__generated__/MenuSectionCoffee.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionCoffee.graphql.js index 56d693f67b..859fad7f82 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionCoffee.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionCoffee.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<2e97b3a5857a12c94e6f5f0dc0407aa5>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionCoffee$key = { +$fragmentRefs: MenuSectionCoffee$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '4f389377a25c5b78515dc2effd798653'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4f389377a25c5b78515dc2effd798653"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSavory.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSavory.graphql.js index 42fb8b69bd..d8b1c878ec 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSavory.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSavory.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<7e80afe912c852542274eb80af54989d>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionDumplingSavory$key = { +$fragmentRefs: MenuSectionDumplingSavory$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '4e92abc51a1b328118b02e2076d5fdc0'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "4e92abc51a1b328118b02e2076d5fdc0"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSweet.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSweet.graphql.js index 14671bfac6..9d8a959e8b 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSweet.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionDumplingSweet.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 MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionDumplingSweet$key = { +$fragmentRefs: MenuSectionDumplingSweet$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '9ef5d1d3cdf5521bfca54fc66e2d1611'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9ef5d1d3cdf5521bfca54fc66e2d1611"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/__generated__/MenuSectionMilkshake.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionMilkshake.graphql.js index 94d11768a4..b86b67c355 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionMilkshake.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionMilkshake.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<721283aa53504ec4694a1f289e46d66d>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionMilkshake$key = { +$fragmentRefs: MenuSectionMilkshake$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'd1cc28eedfba9f309564bf01b958dc15'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "d1cc28eedfba9f309564bf01b958dc15"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/__generated__/MenuSectionSpecialities.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionSpecialities.graphql.js index 6987e9766d..7c61f95eb2 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionSpecialities.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionSpecialities.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<6b4d943c07d9331aa74bc191ae0e8854>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionSpecialities$key = { +$fragmentRefs: MenuSectionSpecialities$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '588f863b6281b508dc66297669402400'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "588f863b6281b508dc66297669402400"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/__generated__/MenuSectionTea.graphql.js b/src/abacus-kochka/src/menu/__generated__/MenuSectionTea.graphql.js index 7bbf9ae60c..54d0f0ca7d 100644 --- a/src/abacus-kochka/src/menu/__generated__/MenuSectionTea.graphql.js +++ b/src/abacus-kochka/src/menu/__generated__/MenuSectionTea.graphql.js @@ -1,9 +1,16 @@ /** + * @generated SignedSource<<5d6f21c5762c48faae5cae9a32298ba2>> * @flow + * @lightSyntaxTransform + * @nogrep + * @codegen-command: ./node_modules/.bin/relay-compiler-experimental */ /* eslint-disable */ +'use strict'; + +/*:: import type { ReaderFragment } from 'relay-runtime'; type MenuRow$ref = any; import type { FragmentReference } from "relay-runtime"; @@ -22,9 +29,9 @@ export type MenuSectionTea$key = { +$fragmentRefs: MenuSectionTea$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [ { "kind": "RootArgument", @@ -73,6 +80,9 @@ const node: ReaderFragment = { "type": "MenuQuery", "abstractKey": null }; -// prettier-ignore -(node: any).hash = 'ba30927cc521f851bada3d3e03b5f41a'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "ba30927cc521f851bada3d3e03b5f41a"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/menu/components/__generated__/MenuRow.graphql.js b/src/abacus-kochka/src/menu/components/__generated__/MenuRow.graphql.js index ace7e6b2fa..8162054f27 100644 --- a/src/abacus-kochka/src/menu/components/__generated__/MenuRow.graphql.js +++ b/src/abacus-kochka/src/menu/components/__generated__/MenuRow.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 SupportedCurrency = "MXN" | "%future added value"; import type { FragmentReference } from "relay-runtime"; @@ -24,9 +31,9 @@ export type MenuRow$key = { +$fragmentRefs: MenuRow$ref, ... }; +*/ - -const node: ReaderFragment = { +var node/*: ReaderFragment*/ = { "argumentDefinitions": [], "kind": "Fragment", "metadata": null, @@ -75,6 +82,9 @@ const node: ReaderFragment = { "type": "Product", "abstractKey": null }; -// prettier-ignore -(node: any).hash = '0dfe65ad52cd8b7bd967d49f64ed44f9'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "0dfe65ad52cd8b7bd967d49f64ed44f9"; +} + +module.exports = node; diff --git a/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js b/src/abacus-kochka/src/shop/__generated__/ProductPageLayoutQuery.graphql.js index 1d891dbca8..72e896e221 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<> * @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 - description - 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 = 'e7a5e6db935364d6cf82ff869c1e88f1'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "9eda629cd056efe8ee41d7430174383d"; +} + +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 8d9bcc5713..42be7db020 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<> * @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 = {| @@ -25,38 +32,16 @@ export type ShopLayoutContentQueryResponse = {| +blurhash: string, +url: string, |}, - |}> - |} + |}>, + |}, |}; export type ShopLayoutContentQuery = {| variables: ShopLayoutContentQueryVariables, response: ShopLayoutContentQueryResponse, |}; - -/* -query ShopLayoutContentQuery( - $clientLocale: SupportedLocale! - $priceSortDirection: PriceSortDirection! -) { - commerce { - products: searchAllPublishedProducts(clientLocale: $clientLocale, priceSortDirection: $priceSortDirection, visibility: ESHOP) { - key - name - price { - unitAmount - unitAmountCurrency - } - imageCover { - blurhash - url - } - id - } - } -} */ -const node: ConcreteRequest = (function(){ +var node/*: ConcreteRequest*/ = (function(){ var v0 = [ { "defaultValue": null, @@ -238,6 +223,9 @@ return { } }; })(); -// prettier-ignore -(node: any).hash = 'f80231d0ee8d704c6ff74da317ee886a'; -export default node; + +if (__DEV__) { + (node/*: any*/).hash = "58597fd12ee384ee575ed69c889885a3"; +} + +module.exports = node; diff --git a/src/eslint-plugin-adeira/package.json b/src/eslint-plugin-adeira/package.json index 91ab1d6ba7..0f8eba42f6 100644 --- a/src/eslint-plugin-adeira/package.json +++ b/src/eslint-plugin-adeira/package.json @@ -25,6 +25,6 @@ "eslint": "^7.32.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 f78c7897df..0fa8ce1c32 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" } } 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 8b7cff6502..d2ab8b9638 100644 --- a/src/graphql-relay-fauna/package.json +++ b/src/graphql-relay-fauna/package.json @@ -21,6 +21,6 @@ "faunadb": "^4.4.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 617ae34bfd..3338b92bed 100644 --- a/src/graphql-resolve-wrapper/package.json +++ b/src/graphql-resolve-wrapper/package.json @@ -18,6 +18,6 @@ "@babel/runtime": "^7.15.3" }, "peerDependencies": { - "graphql": "^15.1.0" + "graphql": "^15.0.0" } } diff --git a/src/relay/package.json b/src/relay/package.json index 3c44497238..b8b733df68 100644 --- a/src/relay/package.json +++ b/src/relay/package.json @@ -18,10 +18,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 2c28b6f099..07da808dbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9811,10 +9811,10 @@ graphql-tag@^2.11.0: resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd" integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== -"graphql@^14.0.0 || ^15.0.0", graphql@^15.5.2: - version "15.5.2" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.2.tgz#efa19f8f2bf1a48eb7d5c85bf17e144ba8bb0480" - integrity sha512-dZjLPWNQqYv0dqV2RNbiFed0LtSp6yd4jchsDGnuhDKa9OQHJYCfovaOEvY91w9gqbYO7Se9LKDTl3xxYva/3w== +graphql@15.3.0, "graphql@^14.0.0 || ^15.0.0", graphql@^15.5.2: + 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" @@ -15425,6 +15425,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-main-9a076b66: + version "0.0.0-main-9a076b66" + resolved "https://registry.yarnpkg.com/relay-compiler-experimental/-/relay-compiler-experimental-0.0.0-main-9a076b66.tgz#9298315b0225c01301435f15a24416a91809854e" + integrity sha512-+Rh1Ic5vs0bhEMA3FIzkNqKHjzqPISd8SNAeOrnpMcUF5RYCB4ppUifjK3v3tcbeHKwcWR6EEY2RAsG+hLSfeg== + relay-compiler@^11.0.2: version "11.0.2" resolved "https://registry.yarnpkg.com/relay-compiler/-/relay-compiler-11.0.2.tgz#e1e09a1c881d169a7a524ead728ad6a89c7bd4af"