diff --git a/relay.config.js b/relay.config.js
deleted file mode 100644
index ef8eb38..0000000
--- a/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/NavigationHeaderBadge.js b/src/NavigationHeaderBadge.js
index 92e4999..849e09e 100644
--- a/src/NavigationHeaderBadge.js
+++ b/src/NavigationHeaderBadge.js
@@ -4,8 +4,6 @@ import React, { type Node } from 'react';
import sx from '@adeira/sx';
import { graphql, useLazyLoadQuery } from '@adeira/relay';
-import type { NavigationHeaderBadgeQuery } from './__generated__/NavigationHeaderBadgeQuery.graphql';
-
function ProdBadge(): Node {
return PROD;
}
@@ -15,7 +13,8 @@ function DevBadge(): Node {
}
export default function NavigationHeaderBadge(): Node {
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query NavigationHeaderBadgeQuery {
auth {
@@ -25,7 +24,7 @@ export default function NavigationHeaderBadge(): Node {
}
}
`,
- {},
+ Object.freeze({}),
{
fetchPolicy: 'store-or-network',
},
diff --git a/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js b/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js
index ed110b4..00cb263 100644
--- a/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js
+++ b/src/__generated__/AuthButtonsAuthorizeWebappMutation.graphql.js
@@ -1,42 +1,38 @@
/**
+ * @generated SignedSource<<6ba6c1396b4df09b0cc66418427a76c5>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type AuthButtonsAuthorizeWebappMutationVariables = {|
- googleIdToken: string
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
+export type AuthButtonsAuthorizeWebappMutation$variables = {|
+ googleIdToken: string,
|};
-export type AuthButtonsAuthorizeWebappMutationResponse = {|
+export type AuthButtonsAuthorizeWebappMutationVariables = AuthButtonsAuthorizeWebappMutation$variables;
+export type AuthButtonsAuthorizeWebappMutation$data = {|
+auth: {|
+authorizeWebapp: {|
+success: boolean,
+sessionToken: ?string,
+failureMessage: ?string,
- |}
- |}
+ |},
+ |},
|};
+export type AuthButtonsAuthorizeWebappMutationResponse = AuthButtonsAuthorizeWebappMutation$data;
export type AuthButtonsAuthorizeWebappMutation = {|
variables: AuthButtonsAuthorizeWebappMutationVariables,
- response: AuthButtonsAuthorizeWebappMutationResponse,
+ response: AuthButtonsAuthorizeWebappMutation$data,
|};
-
-/*
-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 +118,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = 'e758cafe9edc929ea309db7a30ac72e6';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "e758cafe9edc929ea309db7a30ac72e6";
+}
+
+module.exports = ((node/*: any*/)/*: Mutation<
+ AuthButtonsAuthorizeWebappMutation$variables,
+ AuthButtonsAuthorizeWebappMutation$data,
+>*/);
diff --git a/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js b/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js
index 2040a84..9c8dd59 100644
--- a/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js
+++ b/src/__generated__/AuthButtonsDeauthorizeWebappMutation.graphql.js
@@ -1,38 +1,36 @@
/**
+ * @generated SignedSource<<0f95bd7c4db86a2b6de41941a7cbda9b>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type AuthButtonsDeauthorizeWebappMutationVariables = {|
- sessionToken: string
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
+export type AuthButtonsDeauthorizeWebappMutation$variables = {|
+ sessionToken: string,
|};
-export type AuthButtonsDeauthorizeWebappMutationResponse = {|
+export type AuthButtonsDeauthorizeWebappMutationVariables = AuthButtonsDeauthorizeWebappMutation$variables;
+export type AuthButtonsDeauthorizeWebappMutation$data = {|
+auth: {|
+deauthorize: {|
- +__typename: string
- |}
- |}
+ +__typename: string,
+ |},
+ |},
|};
+export type AuthButtonsDeauthorizeWebappMutationResponse = AuthButtonsDeauthorizeWebappMutation$data;
export type AuthButtonsDeauthorizeWebappMutation = {|
variables: AuthButtonsDeauthorizeWebappMutationVariables,
- response: AuthButtonsDeauthorizeWebappMutationResponse,
+ response: AuthButtonsDeauthorizeWebappMutation$data,
|};
-
-/*
-mutation AuthButtonsDeauthorizeWebappMutation(
- $sessionToken: String!
-) {
- auth {
- deauthorize(sessionToken: $sessionToken) {
- __typename
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = [
{
"defaultValue": null,
@@ -104,6 +102,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '901b16d0f2f66b120f8dde76d966dfff';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "901b16d0f2f66b120f8dde76d966dfff";
+}
+
+module.exports = ((node/*: any*/)/*: Mutation<
+ AuthButtonsDeauthorizeWebappMutation$variables,
+ AuthButtonsDeauthorizeWebappMutation$data,
+>*/);
diff --git a/src/__generated__/NavigationHeaderBadgeQuery.graphql.js b/src/__generated__/NavigationHeaderBadgeQuery.graphql.js
index 13da6a7..850b262 100644
--- a/src/__generated__/NavigationHeaderBadgeQuery.graphql.js
+++ b/src/__generated__/NavigationHeaderBadgeQuery.graphql.js
@@ -1,35 +1,34 @@
/**
+ * @generated SignedSource<<8a4a3493836efddd442e6deb5faae15e>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type NavigationHeaderBadgeQueryVariables = {||};
-export type NavigationHeaderBadgeQueryResponse = {|
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+export type NavigationHeaderBadgeQuery$variables = {||};
+export type NavigationHeaderBadgeQueryVariables = NavigationHeaderBadgeQuery$variables;
+export type NavigationHeaderBadgeQuery$data = {|
+auth: {|
+whoami: {|
- +isDebugAssertionsEnabled: boolean
- |}
- |}
+ +isDebugAssertionsEnabled: boolean,
+ |},
+ |},
|};
+export type NavigationHeaderBadgeQueryResponse = NavigationHeaderBadgeQuery$data;
export type NavigationHeaderBadgeQuery = {|
variables: NavigationHeaderBadgeQueryVariables,
- response: NavigationHeaderBadgeQueryResponse,
+ response: NavigationHeaderBadgeQuery$data,
|};
-
-/*
-query NavigationHeaderBadgeQuery {
- auth {
- whoami {
- isDebugAssertionsEnabled
- id
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"alias": null,
"args": null,
@@ -119,6 +118,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '3ac156cd43017b5b34dcd0300a4e4a67';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "3ac156cd43017b5b34dcd0300a4e4a67";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ NavigationHeaderBadgeQuery$variables,
+ NavigationHeaderBadgeQuery$data,
+>*/);
diff --git a/src/analytics/AnalyticsRedirectsPage.js b/src/analytics/AnalyticsRedirectsPage.js
index 3ecf686..66f7d99 100644
--- a/src/analytics/AnalyticsRedirectsPage.js
+++ b/src/analytics/AnalyticsRedirectsPage.js
@@ -5,10 +5,9 @@ import { Badge, Link, Table } from '@adeira/sx-design';
import React, { type Node } from 'react';
import { useLazyLoadQuery, graphql } from '@adeira/relay';
-import type { AnalyticsRedirectsPageQuery } from './__generated__/AnalyticsRedirectsPageQuery.graphql';
-
export default function AnalyticsRedirectsPage(): Node {
- const { analytics } = useLazyLoadQuery(graphql`
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const { analytics } = useLazyLoadQuery(graphql`
query AnalyticsRedirectsPageQuery {
analytics {
redirectHits {
diff --git a/src/analytics/__generated__/AnalyticsRedirectsPageQuery.graphql.js b/src/analytics/__generated__/AnalyticsRedirectsPageQuery.graphql.js
index 79199af..9955b03 100644
--- a/src/analytics/__generated__/AnalyticsRedirectsPageQuery.graphql.js
+++ b/src/analytics/__generated__/AnalyticsRedirectsPageQuery.graphql.js
@@ -1,41 +1,37 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type AnalyticsRedirectsPageQueryVariables = {||};
-export type AnalyticsRedirectsPageQueryResponse = {|
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+export type AnalyticsRedirectsPageQuery$variables = {||};
+export type AnalyticsRedirectsPageQueryVariables = AnalyticsRedirectsPageQuery$variables;
+export type AnalyticsRedirectsPageQuery$data = {|
+analytics: {|
+redirectHits: $ReadOnlyArray<{|
+uuid: string,
+redirectsTo: string,
+description: string,
+hits: number,
- |}>
- |}
+ |}>,
+ |},
|};
+export type AnalyticsRedirectsPageQueryResponse = AnalyticsRedirectsPageQuery$data;
export type AnalyticsRedirectsPageQuery = {|
variables: AnalyticsRedirectsPageQueryVariables,
- response: AnalyticsRedirectsPageQueryResponse,
+ response: AnalyticsRedirectsPageQuery$data,
|};
-
-/*
-query AnalyticsRedirectsPageQuery {
- analytics {
- redirectHits {
- uuid
- redirectsTo
- description
- hits
- id
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"alias": null,
"args": null,
@@ -152,6 +148,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '02c3442388de1c33274df8bb7f529620';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "02c3442388de1c33274df8bb7f529620";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ AnalyticsRedirectsPageQuery$variables,
+ AnalyticsRedirectsPageQuery$data,
+>*/);
diff --git a/src/cats/CatsPage.js b/src/cats/CatsPage.js
index 4674799..f950e99 100644
--- a/src/cats/CatsPage.js
+++ b/src/cats/CatsPage.js
@@ -5,12 +5,12 @@ import * as React from 'react';
import { graphql, useLazyLoadQuery } from '@adeira/relay';
import fbt from 'fbt';
-import type { CatsPageQuery } from './__generated__/CatsPageQuery.graphql';
import CatsTableAdopted from './CatsTableAdopted';
import CatsTableCurrent from './CatsTableCurrent';
export default function CatsPage(): React.Node {
- const data = useLazyLoadQuery(graphql`
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(graphql`
query CatsPageQuery {
cats {
...CatsTableCurrentFragment
diff --git a/src/cats/__generated__/CatsPageQuery.graphql.js b/src/cats/__generated__/CatsPageQuery.graphql.js
index 5629e6e..def3615 100644
--- a/src/cats/__generated__/CatsPageQuery.graphql.js
+++ b/src/cats/__generated__/CatsPageQuery.graphql.js
@@ -1,54 +1,34 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-type CatsTableAdoptedFragment$ref = any;
-type CatsTableCurrentFragment$ref = any;
-export type CatsPageQueryVariables = {||};
-export type CatsPageQueryResponse = {|
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+type CatsTableAdoptedFragment$fragmentType = any;
+type CatsTableCurrentFragment$fragmentType = any;
+export type CatsPageQuery$variables = {||};
+export type CatsPageQueryVariables = CatsPageQuery$variables;
+export type CatsPageQuery$data = {|
+cats: {|
- +$fragmentRefs: CatsTableCurrentFragment$ref & CatsTableAdoptedFragment$ref
- |}
+ +$fragmentSpreads: CatsTableCurrentFragment$fragmentType & CatsTableAdoptedFragment$fragmentType,
+ |},
|};
+export type CatsPageQueryResponse = CatsPageQuery$data;
export type CatsPageQuery = {|
variables: CatsPageQueryVariables,
- response: CatsPageQueryResponse,
+ response: CatsPageQuery$data,
|};
-
-/*
-query CatsPageQuery {
- cats {
- ...CatsTableCurrentFragment
- ...CatsTableAdoptedFragment
- }
-}
-
-fragment CatsTableAdoptedFragment on CatsQuery {
- adoptedCats: listAllCats(allCatsFilter: {adopted: true}) {
- order
- name
- dateOfCastration
- dateOfDeworming
- dateOfAdoption
- id
- }
-}
-
-fragment CatsTableCurrentFragment on CatsQuery {
- currentCats: listAllCats(allCatsFilter: {adopted: false}) {
- order
- name
- dateOfCastration
- dateOfDeworming
- id
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"alias": null,
"args": null,
@@ -200,6 +180,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = 'd80b8aeae3eee43d423c79777e38c450';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "d80b8aeae3eee43d423c79777e38c450";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ CatsPageQuery$variables,
+ CatsPageQuery$data,
+>*/);
diff --git a/src/cats/__generated__/CatsTableAdoptedFragment.graphql.js b/src/cats/__generated__/CatsTableAdoptedFragment.graphql.js
index 7337241..7214b6a 100644
--- a/src/cats/__generated__/CatsTableAdoptedFragment.graphql.js
+++ b/src/cats/__generated__/CatsTableAdoptedFragment.graphql.js
@@ -1,14 +1,21 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type CatsTableAdoptedFragment$ref: FragmentReference;
-declare export opaque type CatsTableAdoptedFragment$fragmentType: CatsTableAdoptedFragment$ref;
-export type CatsTableAdoptedFragment = {|
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+import type { FragmentType } from "relay-runtime";
+declare export opaque type CatsTableAdoptedFragment$fragmentType: FragmentType;
+export type CatsTableAdoptedFragment$ref = CatsTableAdoptedFragment$fragmentType;
+export type CatsTableAdoptedFragment$data = {|
+adoptedCats: $ReadOnlyArray<{|
+order: number,
+name: string,
@@ -16,17 +23,17 @@ export type CatsTableAdoptedFragment = {|
+dateOfDeworming: ?string,
+dateOfAdoption: ?string,
|}>,
- +$refType: CatsTableAdoptedFragment$ref,
+ +$fragmentType: CatsTableAdoptedFragment$fragmentType,
|};
-export type CatsTableAdoptedFragment$data = CatsTableAdoptedFragment;
+export type CatsTableAdoptedFragment = CatsTableAdoptedFragment$data;
export type CatsTableAdoptedFragment$key = {
+$data?: CatsTableAdoptedFragment$data,
- +$fragmentRefs: CatsTableAdoptedFragment$ref,
+ +$fragmentSpreads: CatsTableAdoptedFragment$fragmentType,
...
};
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
@@ -90,6 +97,12 @@ const node: ReaderFragment = {
"type": "CatsQuery",
"abstractKey": null
};
-// prettier-ignore
-(node: any).hash = '9c25db35b12efbb28dcd0e1aec208a4f';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "9c25db35b12efbb28dcd0e1aec208a4f";
+}
+
+module.exports = ((node/*: any*/)/*: Fragment<
+ CatsTableAdoptedFragment$fragmentType,
+ CatsTableAdoptedFragment$data,
+>*/);
diff --git a/src/cats/__generated__/CatsTableCurrentFragment.graphql.js b/src/cats/__generated__/CatsTableCurrentFragment.graphql.js
index 00bc7ef..8c52eeb 100644
--- a/src/cats/__generated__/CatsTableCurrentFragment.graphql.js
+++ b/src/cats/__generated__/CatsTableCurrentFragment.graphql.js
@@ -1,31 +1,38 @@
/**
+ * @generated SignedSource<<36289ca98ac06f8a041c26a93b2ac9c0>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type CatsTableCurrentFragment$ref: FragmentReference;
-declare export opaque type CatsTableCurrentFragment$fragmentType: CatsTableCurrentFragment$ref;
-export type CatsTableCurrentFragment = {|
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+import type { FragmentType } from "relay-runtime";
+declare export opaque type CatsTableCurrentFragment$fragmentType: FragmentType;
+export type CatsTableCurrentFragment$ref = CatsTableCurrentFragment$fragmentType;
+export type CatsTableCurrentFragment$data = {|
+currentCats: $ReadOnlyArray<{|
+order: number,
+name: string,
+dateOfCastration: ?string,
+dateOfDeworming: ?string,
|}>,
- +$refType: CatsTableCurrentFragment$ref,
+ +$fragmentType: CatsTableCurrentFragment$fragmentType,
|};
-export type CatsTableCurrentFragment$data = CatsTableCurrentFragment;
+export type CatsTableCurrentFragment = CatsTableCurrentFragment$data;
export type CatsTableCurrentFragment$key = {
+$data?: CatsTableCurrentFragment$data,
- +$fragmentRefs: CatsTableCurrentFragment$ref,
+ +$fragmentSpreads: CatsTableCurrentFragment$fragmentType,
...
};
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
@@ -82,6 +89,12 @@ const node: ReaderFragment = {
"type": "CatsQuery",
"abstractKey": null
};
-// prettier-ignore
-(node: any).hash = '516ea0e99686f2972199dd02137dd22d';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "516ea0e99686f2972199dd02137dd22d";
+}
+
+module.exports = ((node/*: any*/)/*: Fragment<
+ CatsTableCurrentFragment$fragmentType,
+ CatsTableCurrentFragment$data,
+>*/);
diff --git a/src/employees/EmployeesPage.js b/src/employees/EmployeesPage.js
index 2cde549..a4c6983 100644
--- a/src/employees/EmployeesPage.js
+++ b/src/employees/EmployeesPage.js
@@ -5,10 +5,9 @@ import * as React from 'react';
import { graphql, useLazyLoadQuery } from '@adeira/relay';
import fbt from 'fbt';
-import type { EmployeesPageQuery } from './__generated__/EmployeesPageQuery.graphql';
-
export default function EmployeesPage(): React.Node {
- const data = useLazyLoadQuery(graphql`
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(graphql`
query EmployeesPageQuery {
auth {
listUsers {
diff --git a/src/employees/__generated__/EmployeesPageQuery.graphql.js b/src/employees/__generated__/EmployeesPageQuery.graphql.js
index 909de79..75ecdf7 100644
--- a/src/employees/__generated__/EmployeesPageQuery.graphql.js
+++ b/src/employees/__generated__/EmployeesPageQuery.graphql.js
@@ -1,38 +1,36 @@
/**
+ * @generated SignedSource<<5470b5b9da6321d7e110d55a79d7080c>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type EmployeesPageQueryVariables = {||};
-export type EmployeesPageQueryResponse = {|
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+export type EmployeesPageQuery$variables = {||};
+export type EmployeesPageQueryVariables = EmployeesPageQuery$variables;
+export type EmployeesPageQuery$data = {|
+auth: {|
+listUsers: $ReadOnlyArray<{|
+name: ?string,
+hasEmailVerified: ?boolean,
+isActive: boolean,
- |}>
- |}
+ |}>,
+ |},
|};
+export type EmployeesPageQueryResponse = EmployeesPageQuery$data;
export type EmployeesPageQuery = {|
variables: EmployeesPageQueryVariables,
- response: EmployeesPageQueryResponse,
+ response: EmployeesPageQuery$data,
|};
-
-/*
-query EmployeesPageQuery {
- auth {
- listUsers {
- name
- hasEmailVerified
- isActive
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = [
{
"alias": null,
@@ -105,6 +103,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '2e20a6c5048340bea0ce11b0fb28638c';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "2e20a6c5048340bea0ce11b0fb28638c";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ EmployeesPageQuery$variables,
+ EmployeesPageQuery$data,
+>*/);
diff --git a/src/index/IndexPage.js b/src/index/IndexPage.js
index 4aa8519..5667526 100644
--- a/src/index/IndexPage.js
+++ b/src/index/IndexPage.js
@@ -8,10 +8,10 @@ import sx from '@adeira/sx';
import BarChart from '../d3/BarChart';
import refineSupportedCurrencies from '../refineSupportedCurrencies';
-import type { IndexPageQuery } from './__generated__/IndexPageQuery.graphql';
export default function IndexPage(): React.Node {
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query IndexPageQuery {
analytics {
diff --git a/src/index/__generated__/IndexPageQuery.graphql.js b/src/index/__generated__/IndexPageQuery.graphql.js
index 2e78453..3731c5f 100644
--- a/src/index/__generated__/IndexPageQuery.graphql.js
+++ b/src/index/__generated__/IndexPageQuery.graphql.js
@@ -1,13 +1,21 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
export type SupportedCurrency = "MXN" | "%future added value";
-export type IndexPageQueryVariables = {||};
-export type IndexPageQueryResponse = {|
+export type IndexPageQuery$variables = {||};
+export type IndexPageQueryVariables = IndexPageQuery$variables;
+export type IndexPageQuery$data = {|
+analytics: {|
+mostSoldProducts: $ReadOnlyArray<{|
+productName: string,
@@ -24,36 +32,16 @@ export type IndexPageQueryResponse = {|
+totalUnits: number,
|}>,
|}>,
- |}
+ |},
|};
+export type IndexPageQueryResponse = IndexPageQuery$data;
export type IndexPageQuery = {|
variables: IndexPageQueryVariables,
- response: IndexPageQueryResponse,
+ response: IndexPageQuery$data,
|};
-
-/*
-query IndexPageQuery {
- analytics {
- mostSoldProducts {
- productName
- productUnits
- }
- dailyReports {
- dateDay
- total {
- unitAmount
- unitAmountCurrency
- }
- productsSummary {
- productName
- totalUnits
- }
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"alias": null,
"args": null,
@@ -182,6 +170,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '6aa30f95e3533d8110a8f321ec5104a7';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "6aa30f95e3533d8110a8f321ec5104a7";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ IndexPageQuery$variables,
+ IndexPageQuery$data,
+>*/);
diff --git a/src/pos/ProductsGrid.js b/src/pos/ProductsGrid.js
index b97010e..46298b9 100644
--- a/src/pos/ProductsGrid.js
+++ b/src/pos/ProductsGrid.js
@@ -11,7 +11,6 @@ import useApplicationLocale from '../useApplicationLocale';
import ProductsGridModal from './ProductsGridModal';
import useSelectedItemsApi from './recoil/selectedItemsState';
import ProductsGridModalBodyQuery from './__generated__/ProductsGridModalBodyQuery.graphql';
-import type { ProductsGridPosQuery } from './__generated__/ProductsGridPosQuery.graphql';
type Props = {
+selectedCategory: string | null,
@@ -24,7 +23,8 @@ export default function ProductsGrid(props: Props): Node {
});
const applicationLocale = useApplicationLocale();
const { select } = useSelectedItemsApi();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductsGridPosQuery(
$clientLocale: SupportedLocale!
diff --git a/src/pos/ProductsGridModalBody.js b/src/pos/ProductsGridModalBody.js
index 0af1cf3..49628de 100644
--- a/src/pos/ProductsGridModalBody.js
+++ b/src/pos/ProductsGridModalBody.js
@@ -24,7 +24,7 @@ export default function ProductsGridModalBody(props: Props): Node {
const {
commerce: { product },
- } = usePreloadedQuery(
+ } = usePreloadedQuery(
graphql`
query ProductsGridModalBodyQuery($clientLocale: SupportedLocale!, $productKey: ID!) {
commerce {
diff --git a/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js b/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js
index 2560e61..78c3cc6 100644
--- a/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js
+++ b/src/pos/__generated__/POSCheckoutPageLayoutMutation.graphql.js
@@ -1,10 +1,17 @@
/**
+ * @generated SignedSource<<243a93a3bac43fbb6bfb4e1245b68a36>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
export type SupportedCurrency = "MXN" | "%future added value";
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
export type PosCheckoutProductInput = {|
@@ -19,11 +26,12 @@ export type PosCheckoutProductAddonInput = {|
productAddonExtraPriceUnitAmount: number,
productAddonExtraPriceUnitAmountCurrency: SupportedCurrency,
|};
-export type POSCheckoutPageLayoutMutationVariables = {|
+export type POSCheckoutPageLayoutMutation$variables = {|
checkoutInput: $ReadOnlyArray,
clientLocale: SupportedLocale,
|};
-export type POSCheckoutPageLayoutMutationResponse = {|
+export type POSCheckoutPageLayoutMutationVariables = POSCheckoutPageLayoutMutation$variables;
+export type POSCheckoutPageLayoutMutation$data = {|
+pos: {|
+checkout: {|
+__typename: "PosCheckoutPayload",
@@ -34,35 +42,18 @@ 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 POSCheckoutPageLayoutMutationResponse = POSCheckoutPageLayoutMutation$data;
export type POSCheckoutPageLayoutMutation = {|
variables: POSCheckoutPageLayoutMutationVariables,
- response: POSCheckoutPageLayoutMutationResponse,
+ response: POSCheckoutPageLayoutMutation$data,
|};
-
-/*
-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,
@@ -178,6 +169,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '3b8a9c4decbee14c8acb49768c9d3091';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "3b8a9c4decbee14c8acb49768c9d3091";
+}
+
+module.exports = ((node/*: any*/)/*: Mutation<
+ POSCheckoutPageLayoutMutation$variables,
+ POSCheckoutPageLayoutMutation$data,
+>*/);
diff --git a/src/pos/__generated__/ProductsGridModalBodyQuery.graphql.js b/src/pos/__generated__/ProductsGridModalBodyQuery.graphql.js
index b23cec8..6aae00e 100644
--- a/src/pos/__generated__/ProductsGridModalBodyQuery.graphql.js
+++ b/src/pos/__generated__/ProductsGridModalBodyQuery.graphql.js
@@ -1,22 +1,30 @@
/**
+ * @generated SignedSource<<7349f73cd1498d178cf6f5f268e0a538>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
export type SupportedCurrency = "MXN" | "%future added value";
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductsGridModalBodyQueryVariables = {|
+export type ProductsGridModalBodyQuery$variables = {|
clientLocale: SupportedLocale,
productKey: string,
|};
-export type ProductsGridModalBodyQueryResponse = {|
+export type ProductsGridModalBodyQueryVariables = ProductsGridModalBodyQuery$variables;
+export type ProductsGridModalBodyQuery$data = {|
+commerce: {|
+product: {|
+name: string,
+price: {|
- +unitAmount: number
+ +unitAmount: number,
|},
+selectedAddons: $ReadOnlyArray{|
+id: string,
@@ -26,40 +34,17 @@ export type ProductsGridModalBodyQueryResponse = {|
+unitAmountCurrency: SupportedCurrency,
|},
|}>,
- |}
- |}
+ |},
+ |},
|};
+export type ProductsGridModalBodyQueryResponse = ProductsGridModalBodyQuery$data;
export type ProductsGridModalBodyQuery = {|
variables: ProductsGridModalBodyQueryVariables,
- response: ProductsGridModalBodyQueryResponse,
+ response: ProductsGridModalBodyQuery$data,
|};
-
-/*
-query ProductsGridModalBodyQuery(
- $clientLocale: SupportedLocale!
- $productKey: ID!
-) {
- commerce {
- product: getPublishedProductByKey(clientLocale: $clientLocale, productKey: $productKey) {
- name
- price {
- unitAmount
- }
- selectedAddons(clientLocale: $clientLocale) {
- id
- name
- priceExtra {
- unitAmount
- unitAmountCurrency
- }
- }
- id
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = [
{
"defaultValue": null,
@@ -232,6 +217,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '6de4765822d4f76264cde76f74a90a16';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "d5ba7882859f9abf1bca86496b5bc43e";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsGridModalBodyQuery$variables,
+ ProductsGridModalBodyQuery$data,
+>*/);
diff --git a/src/pos/__generated__/ProductsGridPosQuery.graphql.js b/src/pos/__generated__/ProductsGridPosQuery.graphql.js
index 858894c..9408583 100644
--- a/src/pos/__generated__/ProductsGridPosQuery.graphql.js
+++ b/src/pos/__generated__/ProductsGridPosQuery.graphql.js
@@ -1,19 +1,27 @@
/**
+ * @generated SignedSource<<334efcbbf4ae284ef8e69d8207148bec>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-export type PriceSortDirection = "HIGH_TO_LOW" | "LOW_TO_HIGH" | "%future added value";
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+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 = {|
+export type ProductsGridPosQuery$variables = {|
clientLocale: SupportedLocale,
priceSortDirection: PriceSortDirection,
categories?: ?$ReadOnlyArray,
|};
-export type ProductsGridPosQueryResponse = {|
+export type ProductsGridPosQueryVariables = ProductsGridPosQuery$variables;
+export type ProductsGridPosQuery$data = {|
+commerce: {|
+products: $ReadOnlyArray{|
+id: string,
@@ -28,40 +36,17 @@ export type ProductsGridPosQueryResponse = {|
+unitAmountCurrency: SupportedCurrency,
|},
+hasSelectedAddons: boolean,
- |}>
- |}
+ |}>,
+ |},
|};
+export type ProductsGridPosQueryResponse = ProductsGridPosQuery$data;
export type ProductsGridPosQuery = {|
variables: ProductsGridPosQueryVariables,
- response: ProductsGridPosQueryResponse,
+ response: ProductsGridPosQuery$data,
|};
-
-/*
-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
- }
- hasSelectedAddons
- }
- }
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"defaultValue": null,
"kind": "LocalArgument",
@@ -235,6 +220,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '4af3e1a3f3cc24d1cc4dff00aecf13f6';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "ee7ac4fa90eea0072e03c41fe566ff9f";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsGridPosQuery$variables,
+ ProductsGridPosQuery$data,
+>*/);
diff --git a/src/products/ProductAddons.js b/src/products/ProductAddons.js
index 20028b8..3636cca 100644
--- a/src/products/ProductAddons.js
+++ b/src/products/ProductAddons.js
@@ -7,11 +7,11 @@ import React, { type Node } from 'react';
import refineSupportedCurrencies from '../refineSupportedCurrencies';
import useApplicationLocale from '../useApplicationLocale';
-import type { ProductAddonsQuery } from './__generated__/ProductAddonsQuery.graphql';
export default function ProductAddons(): Node {
const applicationLocale = useApplicationLocale();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductAddonsQuery($clientLocale: SupportedLocale!) {
commerce {
diff --git a/src/products/ProductCategoriesList.js b/src/products/ProductCategoriesList.js
index 374b4fc..b1a14b5 100644
--- a/src/products/ProductCategoriesList.js
+++ b/src/products/ProductCategoriesList.js
@@ -5,11 +5,11 @@ import React, { type Node } from 'react';
import { Entity, EntityField, LayoutBlock, Text } from '@adeira/sx-design';
import useApplicationLocale from '../useApplicationLocale';
-import type { ProductCategoriesListQuery } from './__generated__/ProductCategoriesListQuery.graphql';
export default function ProductCategoriesList(): Node {
const applicationLocale = useApplicationLocale();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductCategoriesListQuery($clientLocale: SupportedLocale!) {
commerce {
diff --git a/src/products/ProductCreateForm.js b/src/products/ProductCreateForm.js
index c3c5e7b..e61c054 100644
--- a/src/products/ProductCreateForm.js
+++ b/src/products/ProductCreateForm.js
@@ -11,7 +11,7 @@ import { uiStatusBarAtom } from '../recoil/uiStatusBarAtom';
import useApplicationLocale from '../useApplicationLocale';
import ProductForm from './ProductForm';
import type { ProductCreateFormData$key } from './__generated__/ProductCreateFormData.graphql';
-import type { ProductCreateFormMutationVariables } from './__generated__/ProductCreateFormMutation.graphql';
+import type { ProductCreateFormMutation$variables } from './__generated__/ProductCreateFormMutation.graphql';
type Props = {
+commerceData: ProductCreateFormData$key,
@@ -22,7 +22,7 @@ export default function ProductCreateForm(props: Props): Node {
const router = useRouter();
const setStatusBar = useSetRecoilState(uiStatusBarAtom);
- const data = useFragment(
+ const data = useFragment(
graphql`
fragment ProductCreateFormData on CommerceQuery {
productCategories: searchAllProductCategories(clientLocale: $clientLocale) {
@@ -86,7 +86,7 @@ export default function ProductCreateForm(props: Props): Node {
}
}
`}
- variables={(formValues): ProductCreateFormMutationVariables => ({
+ variables={(formValues): ProductCreateFormMutation$variables => ({
clientLocale: applicationLocale.graphql,
productImagesNames: formValues.images,
productPriceUnitAmount: formValues.price * 100, // adjusted for centavo
diff --git a/src/products/ProductEditForm.js b/src/products/ProductEditForm.js
index 99768e2..d4cb4a0 100644
--- a/src/products/ProductEditForm.js
+++ b/src/products/ProductEditForm.js
@@ -9,7 +9,7 @@ import FormSubmit from '../forms/FormSubmit';
import { uiStatusBarAtom } from '../recoil/uiStatusBarAtom';
import useApplicationLocale from '../useApplicationLocale';
import type { ProductEditFormData$key } from './__generated__/ProductEditFormData.graphql';
-import type { ProductEditFormMutationVariables } from './__generated__/ProductEditFormMutation.graphql';
+import type { ProductEditFormMutation$variables } from './__generated__/ProductEditFormMutation.graphql';
import ProductForm from './ProductForm';
type Props = {
@@ -21,7 +21,7 @@ export default function ProductEditForm(props: Props): Node {
const applicationLocale = useApplicationLocale();
const setStatusBar = useSetRecoilState(uiStatusBarAtom);
- const data = useFragment(
+ const data = useFragment(
graphql`
fragment ProductEditFormData on Product {
key
@@ -132,7 +132,7 @@ export default function ProductEditForm(props: Props): Node {
}
}
`}
- variables={(formValues): ProductEditFormMutationVariables => ({
+ variables={(formValues): ProductEditFormMutation$variables => ({
clientLocale: applicationLocale.graphql,
productKey: data.key,
productRevision: data.revision,
diff --git a/src/products/ProductEditHeading.js b/src/products/ProductEditHeading.js
index 834335a..490bea4 100644
--- a/src/products/ProductEditHeading.js
+++ b/src/products/ProductEditHeading.js
@@ -13,8 +13,8 @@ import LayoutHeadingLink from '../LayoutHeadingLink';
import ProductEditHeadingPublishUnpublish from './ProductEditHeadingPublishUnpublish';
import useApplicationLocale from '../useApplicationLocale';
import { uiStatusBarAtom } from '../recoil/uiStatusBarAtom';
-import type { ProductEditHeadingArchiveMutation } from './__generated__/ProductEditHeadingArchiveMutation.graphql';
import type { ProductEditHeading$key } from './__generated__/ProductEditHeading.graphql';
+import type { ProductEditHeadingArchiveMutation } from './__generated__/ProductEditHeadingArchiveMutation.graphql';
type Props = {
+product: ProductEditHeading$key,
@@ -47,7 +47,7 @@ export default function ProductEditHeading(props: Props): React.Node {
`,
);
- const product = useFragment(
+ const product = useFragment(
graphql`
fragment ProductEditHeading on Product {
key
diff --git a/src/products/ProductForm.js b/src/products/ProductForm.js
index 9f1887f..3f1fc93 100644
--- a/src/products/ProductForm.js
+++ b/src/products/ProductForm.js
@@ -34,7 +34,7 @@ export default function ProductForm(props: {
+visibility: $ReadOnlyArray<'POS' | 'ESHOP'>,
+button: RestrictedElement,
}): React.Node {
- const productCategories = useFragment(
+ const productCategories = useFragment(
graphql`
fragment ProductFormCategoriesData on ProductCategory @relay(plural: true) {
id
@@ -44,7 +44,7 @@ export default function ProductForm(props: {
props.availableCategories,
);
- const productAddons = useFragment(
+ const productAddons = useFragment(
graphql`
fragment ProductFormAddonsData on ProductAddon @relay(plural: true) {
id
diff --git a/src/products/ProductsCards.js b/src/products/ProductsCards.js
index ae57088..32b4e12 100644
--- a/src/products/ProductsCards.js
+++ b/src/products/ProductsCards.js
@@ -14,7 +14,7 @@ type Props = {
};
export default function ProductsCards(props: Props): Node {
- const products = useFragment(
+ const products = useFragment(
graphql`
fragment ProductsCardsData on Product @relay(plural: true) {
id
diff --git a/src/products/ProductsCardsInCategory.js b/src/products/ProductsCardsInCategory.js
index 1339382..e797aa2 100644
--- a/src/products/ProductsCardsInCategory.js
+++ b/src/products/ProductsCardsInCategory.js
@@ -7,7 +7,6 @@ import React, { type Node } from 'react';
import useApplicationLocale from '../useApplicationLocale';
import ProductsCards from './ProductsCards';
-import type { ProductsCardsInCategoryQuery } from './__generated__/ProductsCardsInCategoryQuery.graphql';
type Props = {
+selectedCategory: string | null,
@@ -15,7 +14,8 @@ type Props = {
export default function ProductsCardsInCategory(props: Props): Node {
const applicationLocale = useApplicationLocale();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductsCardsInCategoryQuery(
$clientLocale: SupportedLocale!
diff --git a/src/products/ProductsCategories.js b/src/products/ProductsCategories.js
index 20d94e5..1fe6ec7 100644
--- a/src/products/ProductsCategories.js
+++ b/src/products/ProductsCategories.js
@@ -6,7 +6,6 @@ import React, { type Node } from 'react';
import fbt from 'fbt';
import useApplicationLocale from '../useApplicationLocale';
-import type { ProductsCategoriesQuery } from './__generated__/ProductsCategoriesQuery.graphql';
type TabValue = string | null;
type Props = {
@@ -16,7 +15,8 @@ type Props = {
export default function ProductsCategories(props: Props): Node {
const applicationLocale = useApplicationLocale();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductsCategoriesQuery($clientLocale: SupportedLocale!) {
commerce {
diff --git a/src/products/ProductsCreateLayout.js b/src/products/ProductsCreateLayout.js
index 521eebb..02af979 100644
--- a/src/products/ProductsCreateLayout.js
+++ b/src/products/ProductsCreateLayout.js
@@ -8,12 +8,12 @@ import LayoutPage from '../LayoutPage';
import LayoutHeadingLink from '../LayoutHeadingLink';
import useApplicationLocale from '../useApplicationLocale';
import ProductCreateForm from './ProductCreateForm';
-import type { ProductsCreateLayoutQuery } from './__generated__/ProductsCreateLayoutQuery.graphql';
export default function ProductsCreateLayout(): Node {
const applicationLocale = useApplicationLocale();
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductsCreateLayoutQuery($clientLocale: SupportedLocale!) {
commerce {
diff --git a/src/products/ProductsEditLayout.js b/src/products/ProductsEditLayout.js
index 3938c64..584e779 100644
--- a/src/products/ProductsEditLayout.js
+++ b/src/products/ProductsEditLayout.js
@@ -9,7 +9,6 @@ import sx from '@adeira/sx';
import ProductEditForm from './ProductEditForm';
import ProductEditHeading from './ProductEditHeading';
import useApplicationLocale from '../useApplicationLocale';
-import type { ProductsEditLayoutQuery } from './__generated__/ProductsEditLayoutQuery.graphql';
type Props = {
+productKey: string,
@@ -19,7 +18,8 @@ export default function ProductsEditLayout(props: Props): Node {
const applicationLocale = useApplicationLocale();
const [imagesToDelete, setImagesToDelete] = useState([]);
- const data = useLazyLoadQuery(
+ // eslint-disable-next-line relay/generated-flow-types -- https://github.com/relayjs/eslint-plugin-relay/issues/131
+ const data = useLazyLoadQuery(
graphql`
query ProductsEditLayoutQuery($clientLocale: SupportedLocale!, $productKey: ID!) {
commerce {
diff --git a/src/products/__generated__/ProductAddonsQuery.graphql.js b/src/products/__generated__/ProductAddonsQuery.graphql.js
index 1978916..3c5346c 100644
--- a/src/products/__generated__/ProductAddonsQuery.graphql.js
+++ b/src/products/__generated__/ProductAddonsQuery.graphql.js
@@ -1,16 +1,24 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } 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
+export type ProductAddonsQuery$variables = {|
+ clientLocale: SupportedLocale,
|};
-export type ProductAddonsQueryResponse = {|
+export type ProductAddonsQueryVariables = ProductAddonsQuery$variables;
+export type ProductAddonsQuery$data = {|
+commerce: {|
+productAddons: $ReadOnlyArray{|
+id: string,
@@ -19,32 +27,17 @@ export type ProductAddonsQueryResponse = {|
+unitAmount: number,
+unitAmountCurrency: SupportedCurrency,
|},
- |}>
- |}
+ |}>,
+ |},
|};
+export type ProductAddonsQueryResponse = ProductAddonsQuery$data;
export type ProductAddonsQuery = {|
variables: ProductAddonsQueryVariables,
- response: ProductAddonsQueryResponse,
+ response: ProductAddonsQuery$data,
|};
-
-/*
-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 +141,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = 'b7b1f1b709c3e56f2a3a999bf3f03cdb';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "b7b1f1b709c3e56f2a3a999bf3f03cdb";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductAddonsQuery$variables,
+ ProductAddonsQuery$data,
+>*/);
diff --git a/src/products/__generated__/ProductCategoriesListQuery.graphql.js b/src/products/__generated__/ProductCategoriesListQuery.graphql.js
index 0d16af0..75dcd51 100644
--- a/src/products/__generated__/ProductCategoriesListQuery.graphql.js
+++ b/src/products/__generated__/ProductCategoriesListQuery.graphql.js
@@ -1,41 +1,38 @@
/**
+ * @generated SignedSource<<41a15e1019e1a8148e06158dff3d0fd9>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductCategoriesListQueryVariables = {|
- clientLocale: SupportedLocale
+export type ProductCategoriesListQuery$variables = {|
+ clientLocale: SupportedLocale,
|};
-export type ProductCategoriesListQueryResponse = {|
+export type ProductCategoriesListQueryVariables = ProductCategoriesListQuery$variables;
+export type ProductCategoriesListQuery$data = {|
+commerce: {|
+categories: $ReadOnlyArray{|
+id: string,
+name: string,
- |}>
- |}
+ |}>,
+ |},
|};
+export type ProductCategoriesListQueryResponse = ProductCategoriesListQuery$data;
export type ProductCategoriesListQuery = {|
variables: ProductCategoriesListQueryVariables,
- response: ProductCategoriesListQueryResponse,
+ response: ProductCategoriesListQuery$data,
|};
-
-/*
-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 +111,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '7316f6f463886f0de452366ff2fc918e';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "7316f6f463886f0de452366ff2fc918e";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductCategoriesListQuery$variables,
+ ProductCategoriesListQuery$data,
+>*/);
diff --git a/src/products/__generated__/ProductCreateFormData.graphql.js b/src/products/__generated__/ProductCreateFormData.graphql.js
index 7befa49..82089be 100644
--- a/src/products/__generated__/ProductCreateFormData.graphql.js
+++ b/src/products/__generated__/ProductCreateFormData.graphql.js
@@ -1,33 +1,40 @@
/**
+ * @generated SignedSource<<52f69c86bbb9a157762a033a02c4dd0d>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-type ProductFormAddonsData$ref = any;
-type ProductFormCategoriesData$ref = any;
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductCreateFormData$ref: FragmentReference;
-declare export opaque type ProductCreateFormData$fragmentType: ProductCreateFormData$ref;
-export type ProductCreateFormData = {|
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+type ProductFormAddonsData$fragmentType = any;
+type ProductFormCategoriesData$fragmentType = any;
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductCreateFormData$fragmentType: FragmentType;
+export type ProductCreateFormData$ref = ProductCreateFormData$fragmentType;
+export type ProductCreateFormData$data = {|
+productCategories: $ReadOnlyArray{|
- +$fragmentRefs: ProductFormCategoriesData$ref
+ +$fragmentSpreads: ProductFormCategoriesData$fragmentType,
|}>,
+productAddons: $ReadOnlyArray{|
- +$fragmentRefs: ProductFormAddonsData$ref
+ +$fragmentSpreads: ProductFormAddonsData$fragmentType,
|}>,
- +$refType: ProductCreateFormData$ref,
+ +$fragmentType: ProductCreateFormData$fragmentType,
|};
-export type ProductCreateFormData$data = ProductCreateFormData;
+export type ProductCreateFormData = ProductCreateFormData$data;
export type ProductCreateFormData$key = {
+$data?: ProductCreateFormData$data,
- +$fragmentRefs: ProductCreateFormData$ref,
+ +$fragmentSpreads: ProductCreateFormData$fragmentType,
...
};
+*/
-
-const node: ReaderFragment = (function(){
+var node/*: ReaderFragment*/ = (function(){
var v0 = [
{
"kind": "Variable",
@@ -83,6 +90,12 @@ return {
"abstractKey": null
};
})();
-// prettier-ignore
-(node: any).hash = 'ff8090d2ca7b56d4e1f13870c0837098';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "ff8090d2ca7b56d4e1f13870c0837098";
+}
+
+module.exports = ((node/*: any*/)/*: Fragment<
+ ProductCreateFormData$fragmentType,
+ ProductCreateFormData$data,
+>*/);
diff --git a/src/products/__generated__/ProductCreateFormMutation.graphql.js b/src/products/__generated__/ProductCreateFormMutation.graphql.js
index 56b4ba7..a6b7fda 100644
--- a/src/products/__generated__/ProductCreateFormMutation.graphql.js
+++ b/src/products/__generated__/ProductCreateFormMutation.graphql.js
@@ -1,10 +1,17 @@
/**
+ * @generated SignedSource<<2f995b9fbfd1b7a9aa1e9767a0daea30>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value";
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
export type ProductMultilingualInputTranslations = {|
@@ -12,16 +19,17 @@ export type ProductMultilingualInputTranslations = {|
name: string,
description?: ?string,
|};
-export type ProductCreateFormMutationVariables = {|
+export type ProductCreateFormMutation$variables = {|
clientLocale: SupportedLocale,
- productImagesNames: $ReadOnlyArray,
+ productImagesNames: $ReadOnlyArray,
productPriceUnitAmount: number,
translations: $ReadOnlyArray,
visibility: $ReadOnlyArray,
categories: $ReadOnlyArray,
addons: $ReadOnlyArray,
|};
-export type ProductCreateFormMutationResponse = {|
+export type ProductCreateFormMutationVariables = ProductCreateFormMutation$variables;
+export type ProductCreateFormMutation$data = {|
+commerce: {|
+result: {|
+__typename: "Product",
@@ -32,42 +40,18 @@ 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 ProductCreateFormMutationResponse = ProductCreateFormMutation$data;
export type ProductCreateFormMutation = {|
variables: ProductCreateFormMutationVariables,
- response: ProductCreateFormMutationResponse,
+ response: ProductCreateFormMutation$data,
|};
-
-/*
-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 +255,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 +284,21 @@ 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/*: any*/)/*: Mutation<
+ ProductCreateFormMutation$variables,
+ ProductCreateFormMutation$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditFormData.graphql.js b/src/products/__generated__/ProductEditFormData.graphql.js
index 3782be7..299a7b9 100644
--- a/src/products/__generated__/ProductEditFormData.graphql.js
+++ b/src/products/__generated__/ProductEditFormData.graphql.js
@@ -1,33 +1,40 @@
/**
+ * @generated SignedSource<<178883ba562da8565e943c0ce50cc84f>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-type ProductFormAddonsData$ref = any;
-type ProductFormCategoriesData$ref = any;
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+type ProductFormAddonsData$fragmentType = any;
+type ProductFormCategoriesData$fragmentType = any;
export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value";
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductEditFormData$ref: FragmentReference;
-declare export opaque type ProductEditFormData$fragmentType: ProductEditFormData$ref;
-export type ProductEditFormData = {|
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductEditFormData$fragmentType: FragmentType;
+export type ProductEditFormData$ref = ProductEditFormData$fragmentType;
+export type ProductEditFormData$data = {|
+key: string,
+revision: string,
+availableCategories: $ReadOnlyArray{|
- +$fragmentRefs: ProductFormCategoriesData$ref
+ +$fragmentSpreads: ProductFormCategoriesData$fragmentType,
|}>,
+availableAddons: $ReadOnlyArray{|
- +$fragmentRefs: ProductFormAddonsData$ref
+ +$fragmentSpreads: ProductFormAddonsData$fragmentType,
|}>,
+price: {|
- +unitAmount: number
+ +unitAmount: number,
|},
+selectedCategories: $ReadOnlyArray{|
- +id: string
+ +id: string,
|}>,
+selectedAddons: $ReadOnlyArray{|
- +id: string
+ +id: string,
|}>,
+visibility: $ReadOnlyArray,
+enTranslation: ?{|
@@ -39,19 +46,19 @@ export type ProductEditFormData = {|
+description: ?string,
|},
+images: $ReadOnlyArray<{|
- +name: string
+ +name: string,
|}>,
- +$refType: ProductEditFormData$ref,
+ +$fragmentType: ProductEditFormData$fragmentType,
|};
-export type ProductEditFormData$data = ProductEditFormData;
+export type ProductEditFormData = ProductEditFormData$data;
export type ProductEditFormData$key = {
+$data?: ProductEditFormData$data,
- +$fragmentRefs: ProductEditFormData$ref,
+ +$fragmentSpreads: ProductEditFormData$fragmentType,
...
};
+*/
-
-const node: ReaderFragment = (function(){
+var node/*: ReaderFragment*/ = (function(){
var v0 = [
{
"kind": "Variable",
@@ -236,6 +243,12 @@ return {
"abstractKey": null
};
})();
-// prettier-ignore
-(node: any).hash = '681633a20f6272cb9d2dbeae0f7b4919';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "681633a20f6272cb9d2dbeae0f7b4919";
+}
+
+module.exports = ((node/*: any*/)/*: Fragment<
+ ProductEditFormData$fragmentType,
+ ProductEditFormData$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditFormMutation.graphql.js b/src/products/__generated__/ProductEditFormMutation.graphql.js
index 94a8ae5..673536a 100644
--- a/src/products/__generated__/ProductEditFormMutation.graphql.js
+++ b/src/products/__generated__/ProductEditFormMutation.graphql.js
@@ -1,11 +1,18 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-type ProductEditFormData$ref = any;
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
+type ProductEditFormData$fragmentType = any;
export type ProductMultilingualInputVisibility = "ESHOP" | "POS" | "%future added value";
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
export type ProductMultilingualInputTranslations = {|
@@ -13,120 +20,44 @@ export type ProductMultilingualInputTranslations = {|
name: string,
description?: ?string,
|};
-export type ProductEditFormMutationVariables = {|
+export type ProductEditFormMutation$variables = {|
clientLocale: SupportedLocale,
productKey: string,
productRevision: string,
- productImagesNames: $ReadOnlyArray,
+ productImagesNames: $ReadOnlyArray,
productPriceUnitAmount: number,
translations: $ReadOnlyArray,
visibility: $ReadOnlyArray,
categories: $ReadOnlyArray,
addons: $ReadOnlyArray,
|};
-export type ProductEditFormMutationResponse = {|
+export type ProductEditFormMutationVariables = ProductEditFormMutation$variables;
+export type ProductEditFormMutation$data = {|
+commerce: {|
+result: {|
+__typename: "Product",
+id: string,
+name: string,
+revision: string,
- +$fragmentRefs: ProductEditFormData$ref,
+ +$fragmentSpreads: ProductEditFormData$fragmentType,
|} | {|
+__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 ProductEditFormMutationResponse = ProductEditFormMutation$data;
export type ProductEditFormMutation = {|
variables: ProductEditFormMutationVariables,
- response: ProductEditFormMutationResponse,
+ response: ProductEditFormMutation$data,
|};
-
-/*
-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 +498,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '2400c8982c9b36261593cb7920f33251';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "5ea7f8b50995909c30fb798b4847a574";
+}
+
+module.exports = ((node/*: any*/)/*: Mutation<
+ ProductEditFormMutation$variables,
+ ProductEditFormMutation$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditHeading.graphql.js b/src/products/__generated__/ProductEditHeading.graphql.js
index 38a5873..dbe64ce 100644
--- a/src/products/__generated__/ProductEditHeading.graphql.js
+++ b/src/products/__generated__/ProductEditHeading.graphql.js
@@ -1,28 +1,35 @@
/**
+ * @generated SignedSource<<671e86e9cf2dce94d68c8b61cfb3fae7>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductEditHeading$ref: FragmentReference;
-declare export opaque type ProductEditHeading$fragmentType: ProductEditHeading$ref;
-export type ProductEditHeading = {|
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductEditHeading$fragmentType: FragmentType;
+export type ProductEditHeading$ref = ProductEditHeading$fragmentType;
+export type ProductEditHeading$data = {|
+key: string,
+name: string,
+isPublished: boolean,
- +$refType: ProductEditHeading$ref,
+ +$fragmentType: ProductEditHeading$fragmentType,
|};
-export type ProductEditHeading$data = ProductEditHeading;
+export type ProductEditHeading = ProductEditHeading$data;
export type ProductEditHeading$key = {
+$data?: ProductEditHeading$data,
- +$fragmentRefs: ProductEditHeading$ref,
+ +$fragmentSpreads: ProductEditHeading$fragmentType,
...
};
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
@@ -53,6 +60,12 @@ 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/*: any*/)/*: Fragment<
+ ProductEditHeading$fragmentType,
+ ProductEditHeading$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js b/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js
index de6fb75..f67acf4 100644
--- a/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js
+++ b/src/products/__generated__/ProductEditHeadingArchiveMutation.graphql.js
@@ -1,55 +1,45 @@
/**
+ * @generated SignedSource<<9bc38960134f6aa3d27ec4cd32c4ea53>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductEditHeadingArchiveMutationVariables = {|
+export type ProductEditHeadingArchiveMutation$variables = {|
productKey: string,
clientLocale: SupportedLocale,
|};
-export type ProductEditHeadingArchiveMutationResponse = {|
+export type ProductEditHeadingArchiveMutationVariables = ProductEditHeadingArchiveMutation$variables;
+export type ProductEditHeadingArchiveMutation$data = {|
+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 ProductEditHeadingArchiveMutationResponse = ProductEditHeadingArchiveMutation$data;
export type ProductEditHeadingArchiveMutation = {|
variables: ProductEditHeadingArchiveMutationVariables,
- response: ProductEditHeadingArchiveMutationResponse,
+ response: ProductEditHeadingArchiveMutation$data,
|};
-
-/*
-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 +155,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 +186,21 @@ 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/*: any*/)/*: Mutation<
+ ProductEditHeadingArchiveMutation$variables,
+ ProductEditHeadingArchiveMutation$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js b/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js
index 5ad8224..dd8dd49 100644
--- a/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js
+++ b/src/products/__generated__/ProductEditHeadingPublishUnpublishPublishMutation.graphql.js
@@ -1,55 +1,45 @@
/**
+ * @generated SignedSource<<2d70ba3248d7cec9d3314c7778487f2b>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductEditHeadingPublishUnpublishPublishMutationVariables = {|
+export type ProductEditHeadingPublishUnpublishPublishMutation$variables = {|
productKey: string,
clientLocale: SupportedLocale,
|};
-export type ProductEditHeadingPublishUnpublishPublishMutationResponse = {|
+export type ProductEditHeadingPublishUnpublishPublishMutationVariables = ProductEditHeadingPublishUnpublishPublishMutation$variables;
+export type ProductEditHeadingPublishUnpublishPublishMutation$data = {|
+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 ProductEditHeadingPublishUnpublishPublishMutationResponse = ProductEditHeadingPublishUnpublishPublishMutation$data;
export type ProductEditHeadingPublishUnpublishPublishMutation = {|
variables: ProductEditHeadingPublishUnpublishPublishMutationVariables,
- response: ProductEditHeadingPublishUnpublishPublishMutationResponse,
+ response: ProductEditHeadingPublishUnpublishPublishMutation$data,
|};
-
-/*
-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 +155,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 +186,21 @@ 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/*: any*/)/*: Mutation<
+ ProductEditHeadingPublishUnpublishPublishMutation$variables,
+ ProductEditHeadingPublishUnpublishPublishMutation$data,
+>*/);
diff --git a/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js b/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js
index 242bfdf..3861b39 100644
--- a/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js
+++ b/src/products/__generated__/ProductEditHeadingPublishUnpublishUnpublishMutation.graphql.js
@@ -1,55 +1,45 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Mutation } from 'relay-runtime';
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductEditHeadingPublishUnpublishUnpublishMutationVariables = {|
+export type ProductEditHeadingPublishUnpublishUnpublishMutation$variables = {|
productKey: string,
clientLocale: SupportedLocale,
|};
-export type ProductEditHeadingPublishUnpublishUnpublishMutationResponse = {|
+export type ProductEditHeadingPublishUnpublishUnpublishMutationVariables = ProductEditHeadingPublishUnpublishUnpublishMutation$variables;
+export type ProductEditHeadingPublishUnpublishUnpublishMutation$data = {|
+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 ProductEditHeadingPublishUnpublishUnpublishMutationResponse = ProductEditHeadingPublishUnpublishUnpublishMutation$data;
export type ProductEditHeadingPublishUnpublishUnpublishMutation = {|
variables: ProductEditHeadingPublishUnpublishUnpublishMutationVariables,
- response: ProductEditHeadingPublishUnpublishUnpublishMutationResponse,
+ response: ProductEditHeadingPublishUnpublishUnpublishMutation$data,
|};
-
-/*
-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 +155,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 +186,21 @@ 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/*: any*/)/*: Mutation<
+ ProductEditHeadingPublishUnpublishUnpublishMutation$variables,
+ ProductEditHeadingPublishUnpublishUnpublishMutation$data,
+>*/);
diff --git a/src/products/__generated__/ProductFormAddonsData.graphql.js b/src/products/__generated__/ProductFormAddonsData.graphql.js
index bf07ff0..a5a8d89 100644
--- a/src/products/__generated__/ProductFormAddonsData.graphql.js
+++ b/src/products/__generated__/ProductFormAddonsData.graphql.js
@@ -1,32 +1,39 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
export type SupportedCurrency = "MXN" | "%future added value";
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductFormAddonsData$ref: FragmentReference;
-declare export opaque type ProductFormAddonsData$fragmentType: ProductFormAddonsData$ref;
-export type ProductFormAddonsData = $ReadOnlyArray<{|
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductFormAddonsData$fragmentType: FragmentType;
+export type ProductFormAddonsData$ref = ProductFormAddonsData$fragmentType;
+export type ProductFormAddonsData$data = $ReadOnlyArray<{|
+id: string,
+name: string,
+priceExtra: {|
+unitAmount: number,
+unitAmountCurrency: SupportedCurrency,
|},
- +$refType: ProductFormAddonsData$ref,
+ +$fragmentType: ProductFormAddonsData$fragmentType,
|}>;
-export type ProductFormAddonsData$data = ProductFormAddonsData;
+export type ProductFormAddonsData = ProductFormAddonsData$data;
export type ProductFormAddonsData$key = $ReadOnlyArray<{
+$data?: ProductFormAddonsData$data,
- +$fragmentRefs: ProductFormAddonsData$ref,
+ +$fragmentSpreads: ProductFormAddonsData$fragmentType,
...
}>;
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": {
@@ -77,6 +84,12 @@ 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/*: any*/)/*: Fragment<
+ ProductFormAddonsData$fragmentType,
+ ProductFormAddonsData$data,
+>*/);
diff --git a/src/products/__generated__/ProductFormCategoriesData.graphql.js b/src/products/__generated__/ProductFormCategoriesData.graphql.js
index babfe08..5a197cb 100644
--- a/src/products/__generated__/ProductFormCategoriesData.graphql.js
+++ b/src/products/__generated__/ProductFormCategoriesData.graphql.js
@@ -1,27 +1,34 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductFormCategoriesData$ref: FragmentReference;
-declare export opaque type ProductFormCategoriesData$fragmentType: ProductFormCategoriesData$ref;
-export type ProductFormCategoriesData = $ReadOnlyArray<{|
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductFormCategoriesData$fragmentType: FragmentType;
+export type ProductFormCategoriesData$ref = ProductFormCategoriesData$fragmentType;
+export type ProductFormCategoriesData$data = $ReadOnlyArray<{|
+id: string,
+name: string,
- +$refType: ProductFormCategoriesData$ref,
+ +$fragmentType: ProductFormCategoriesData$fragmentType,
|}>;
-export type ProductFormCategoriesData$data = ProductFormCategoriesData;
+export type ProductFormCategoriesData = ProductFormCategoriesData$data;
export type ProductFormCategoriesData$key = $ReadOnlyArray<{
+$data?: ProductFormCategoriesData$data,
- +$fragmentRefs: ProductFormCategoriesData$ref,
+ +$fragmentSpreads: ProductFormCategoriesData$fragmentType,
...
}>;
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": {
@@ -47,6 +54,12 @@ 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/*: any*/)/*: Fragment<
+ ProductFormCategoriesData$fragmentType,
+ ProductFormCategoriesData$data,
+>*/);
diff --git a/src/products/__generated__/ProductsCardsData.graphql.js b/src/products/__generated__/ProductsCardsData.graphql.js
index 9abc866..8f798e4 100644
--- a/src/products/__generated__/ProductsCardsData.graphql.js
+++ b/src/products/__generated__/ProductsCardsData.graphql.js
@@ -1,15 +1,22 @@
/**
+ * @generated SignedSource<>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ReaderFragment } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { Fragment, ReaderFragment } from 'relay-runtime';
export type SupportedCurrency = "MXN" | "%future added value";
-import type { FragmentReference } from "relay-runtime";
-declare export opaque type ProductsCardsData$ref: FragmentReference;
-declare export opaque type ProductsCardsData$fragmentType: ProductsCardsData$ref;
-export type ProductsCardsData = $ReadOnlyArray<{|
+import type { FragmentType } from "relay-runtime";
+declare export opaque type ProductsCardsData$fragmentType: FragmentType;
+export type ProductsCardsData$ref = ProductsCardsData$fragmentType;
+export type ProductsCardsData$data = $ReadOnlyArray<{|
+id: string,
+key: string,
+name: string,
@@ -22,17 +29,17 @@ export type ProductsCardsData = $ReadOnlyArray<{|
+unitAmountCurrency: SupportedCurrency,
|},
+isPublished: boolean,
- +$refType: ProductsCardsData$ref,
+ +$fragmentType: ProductsCardsData$fragmentType,
|}>;
-export type ProductsCardsData$data = ProductsCardsData;
+export type ProductsCardsData = ProductsCardsData$data;
export type ProductsCardsData$key = $ReadOnlyArray<{
+$data?: ProductsCardsData$data,
- +$fragmentRefs: ProductsCardsData$ref,
+ +$fragmentSpreads: ProductsCardsData$fragmentType,
...
}>;
+*/
-
-const node: ReaderFragment = {
+var node/*: ReaderFragment*/ = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": {
@@ -122,6 +129,12 @@ const node: ReaderFragment = {
"type": "Product",
"abstractKey": null
};
-// prettier-ignore
-(node: any).hash = '7109a74f00365ae495c2967a968c658e';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "7109a74f00365ae495c2967a968c658e";
+}
+
+module.exports = ((node/*: any*/)/*: Fragment<
+ ProductsCardsData$fragmentType,
+ ProductsCardsData$data,
+>*/);
diff --git a/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js b/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js
index 423ac22..6fb3b59 100644
--- a/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js
+++ b/src/products/__generated__/ProductsCardsInCategoryQuery.graphql.js
@@ -1,61 +1,41 @@
/**
+ * @generated SignedSource<<75d8eb49611d9bb528e655b13da1f274>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-type ProductsCardsData$ref = any;
-export type PriceSortDirection = "HIGH_TO_LOW" | "LOW_TO_HIGH" | "%future added value";
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+type ProductsCardsData$fragmentType = any;
+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 = {|
+export type ProductsCardsInCategoryQuery$variables = {|
clientLocale: SupportedLocale,
priceSortDirection: PriceSortDirection,
categories?: ?$ReadOnlyArray,
|};
-export type ProductsCardsInCategoryQueryResponse = {|
+export type ProductsCardsInCategoryQueryVariables = ProductsCardsInCategoryQuery$variables;
+export type ProductsCardsInCategoryQuery$data = {|
+commerce: {|
+products: $ReadOnlyArray{|
- +$fragmentRefs: ProductsCardsData$ref
- |}>
- |}
+ +$fragmentSpreads: ProductsCardsData$fragmentType,
+ |}>,
+ |},
|};
+export type ProductsCardsInCategoryQueryResponse = ProductsCardsInCategoryQuery$data;
export type ProductsCardsInCategoryQuery = {|
variables: ProductsCardsInCategoryQueryVariables,
- response: ProductsCardsInCategoryQueryResponse,
+ response: ProductsCardsInCategoryQuery$data,
|};
-
-/*
-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
- }
- isPublished
-}
*/
-const node: ConcreteRequest = (function(){
+var node/*: ConcreteRequest*/ = (function(){
var v0 = {
"defaultValue": null,
"kind": "LocalArgument",
@@ -252,6 +232,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '1fb8a914e7bbc4c6535f25b4f592cb12';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "978767bfb60ad8c2fbe1d8fad793c608";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsCardsInCategoryQuery$variables,
+ ProductsCardsInCategoryQuery$data,
+>*/);
diff --git a/src/products/__generated__/ProductsCategoriesQuery.graphql.js b/src/products/__generated__/ProductsCategoriesQuery.graphql.js
index 1dfeae1..0e3e28e 100644
--- a/src/products/__generated__/ProductsCategoriesQuery.graphql.js
+++ b/src/products/__generated__/ProductsCategoriesQuery.graphql.js
@@ -1,41 +1,38 @@
/**
+ * @generated SignedSource<<9b645d7c812c4b5540d0f76945174649>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductsCategoriesQueryVariables = {|
- clientLocale: SupportedLocale
+export type ProductsCategoriesQuery$variables = {|
+ clientLocale: SupportedLocale,
|};
-export type ProductsCategoriesQueryResponse = {|
+export type ProductsCategoriesQueryVariables = ProductsCategoriesQuery$variables;
+export type ProductsCategoriesQuery$data = {|
+commerce: {|
+productCategories: $ReadOnlyArray{|
+id: string,
+name: string,
- |}>
- |}
+ |}>,
+ |},
|};
+export type ProductsCategoriesQueryResponse = ProductsCategoriesQuery$data;
export type ProductsCategoriesQuery = {|
variables: ProductsCategoriesQueryVariables,
- response: ProductsCategoriesQueryResponse,
+ response: ProductsCategoriesQuery$data,
|};
-
-/*
-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 +111,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = 'cf82629107f79add52f01d591e0da585';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "cf82629107f79add52f01d591e0da585";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsCategoriesQuery$variables,
+ ProductsCategoriesQuery$data,
+>*/);
diff --git a/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js b/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js
index fbd30a4..655e6a6 100644
--- a/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js
+++ b/src/products/__generated__/ProductsCreateLayoutQuery.graphql.js
@@ -1,61 +1,36 @@
/**
+ * @generated SignedSource<<433f631535b0a1ae995a2e4d30acdd57>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-type ProductCreateFormData$ref = any;
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+type ProductCreateFormData$fragmentType = any;
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductsCreateLayoutQueryVariables = {|
- clientLocale: SupportedLocale
+export type ProductsCreateLayoutQuery$variables = {|
+ clientLocale: SupportedLocale,
|};
-export type ProductsCreateLayoutQueryResponse = {|
+export type ProductsCreateLayoutQueryVariables = ProductsCreateLayoutQuery$variables;
+export type ProductsCreateLayoutQuery$data = {|
+commerce: {|
- +$fragmentRefs: ProductCreateFormData$ref
- |}
+ +$fragmentSpreads: ProductCreateFormData$fragmentType,
+ |},
|};
+export type ProductsCreateLayoutQueryResponse = ProductsCreateLayoutQuery$data;
export type ProductsCreateLayoutQuery = {|
variables: ProductsCreateLayoutQueryVariables,
- response: ProductsCreateLayoutQueryResponse,
+ response: ProductsCreateLayoutQuery$data,
|};
-
-/*
-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 +166,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = '92d67871b187e5ae9ad965b1fea6eac2';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "92d67871b187e5ae9ad965b1fea6eac2";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsCreateLayoutQuery$variables,
+ ProductsCreateLayoutQuery$data,
+>*/);
diff --git a/src/products/__generated__/ProductsEditLayoutQuery.graphql.js b/src/products/__generated__/ProductsEditLayoutQuery.graphql.js
index 109b0d8..6d75a2f 100644
--- a/src/products/__generated__/ProductsEditLayoutQuery.graphql.js
+++ b/src/products/__generated__/ProductsEditLayoutQuery.graphql.js
@@ -1,18 +1,26 @@
/**
+ * @generated SignedSource<<0b6aabce498ba922868f8f92f67f4361>>
* @flow
+ * @lightSyntaxTransform
+ * @nogrep
+ * @codegen-command: ./node_modules/.bin/relay-compiler
*/
/* eslint-disable */
-import type { ConcreteRequest } from 'relay-runtime';
-type ProductEditFormData$ref = any;
-type ProductEditHeading$ref = any;
+'use strict';
+
+/*::
+import type { ConcreteRequest, Query } from 'relay-runtime';
+type ProductEditFormData$fragmentType = any;
+type ProductEditHeading$fragmentType = any;
export type SupportedLocale = "en_US" | "es_MX" | "%future added value";
-export type ProductsEditLayoutQueryVariables = {|
+export type ProductsEditLayoutQuery$variables = {|
clientLocale: SupportedLocale,
productKey: string,
|};
-export type ProductsEditLayoutQueryResponse = {|
+export type ProductsEditLayoutQueryVariables = ProductsEditLayoutQuery$variables;
+export type ProductsEditLayoutQuery$data = {|
+commerce: {|
+product: {|
+images: $ReadOnlyArray<{|
@@ -20,90 +28,18 @@ export type ProductsEditLayoutQueryResponse = {|
+blurhash: string,
+url: string,
|}>,
- +$fragmentRefs: ProductEditHeading$ref & ProductEditFormData$ref,
- |}
- |}
+ +$fragmentSpreads: ProductEditHeading$fragmentType & ProductEditFormData$fragmentType,
+ |},
+ |},
|};
+export type ProductsEditLayoutQueryResponse = ProductsEditLayoutQuery$data;
export type ProductsEditLayoutQuery = {|
variables: ProductsEditLayoutQueryVariables,
- response: ProductsEditLayoutQueryResponse,
+ response: ProductsEditLayoutQuery$data,
|};
-
-/*
-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 +151,12 @@ return {
"name": "getUnpublishedProductByKey",
"plural": false,
"selections": [
- (v4/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
"name": "ProductEditHeading"
},
+ (v4/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
@@ -416,6 +352,12 @@ return {
}
};
})();
-// prettier-ignore
-(node: any).hash = 'a0bfb0ff14c17bd91dd157d472cab49e';
-export default node;
+
+if (__DEV__) {
+ (node/*: any*/).hash = "65d361f91d79ebe6a215a4a69979a04f";
+}
+
+module.exports = ((node/*: any*/)/*: Query<
+ ProductsEditLayoutQuery$variables,
+ ProductsEditLayoutQuery$data,
+>*/);