diff --git a/packages/peregrine/lib/store/actions/user/asyncActions.js b/packages/peregrine/lib/store/actions/user/asyncActions.js
index 353187d66c..d3a2ccdb25 100755
--- a/packages/peregrine/lib/store/actions/user/asyncActions.js
+++ b/packages/peregrine/lib/store/actions/user/asyncActions.js
@@ -63,17 +63,13 @@ export const resetPassword = ({ email }) =>
dispatch(actions.resetPassword.receive());
};
-export const setToken = (token, customerAccessTokenLifetime = 1) =>
+export const setToken = (token, customer_token_lifetime = 3600) =>
async function thunk(...args) {
const [dispatch] = args;
// Store token in local storage.
// TODO: Get correct token expire time from API
- storage.setItem(
- 'signin_token',
- token,
- customerAccessTokenLifetime * 3600
- );
+ storage.setItem('signin_token', token, customer_token_lifetime);
// Persist in store
dispatch(actions.setToken(token));
diff --git a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/useCreateAccount.spec.js.snap b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/useCreateAccount.spec.js.snap
index f64b802037..59d4c64a3f 100644
--- a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/useCreateAccount.spec.js.snap
+++ b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/useCreateAccount.spec.js.snap
@@ -1,12 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`errros should render properly 1`] = `
-Map {
- "createAccountQuery" => "Create Account Mutation Error",
- "signInMutation" => "Sign In Mutation Error",
-}
-`;
-
exports[`handle submit event creates an account, dispatches event, signs in, and generates a new cart 1`] = `
Object {
"payload": Object {
@@ -19,30 +12,6 @@ Object {
}
`;
-exports[`handle submit event should dispatch create account event 1`] = `
-Object {
- "payload": Object {
- "email": "bender@planet.express",
- "firstName": "Bender",
- "isSubscribed": false,
- "lastName": "Rodriguez",
- },
- "type": "USER_CREATE_ACCOUNT",
-}
-`;
-
-exports[`handleSubmit should dispatch create account event 1`] = `
-Object {
- "payload": Object {
- "email": "bender@planet.express",
- "firstName": "Bender",
- "isSubscribed": false,
- "lastName": "Rodriguez",
- },
- "type": "USER_CREATE_ACCOUNT",
-}
-`;
-
exports[`returns the correct shape 1`] = `
Object {
"errors": Map {
@@ -60,7 +29,6 @@ Object {
},
"isDisabled": false,
"recaptchaWidgetProps": Object {},
- "minimumPasswordLength":8
}
`;
@@ -81,28 +49,5 @@ Object {
},
"isDisabled": false,
"recaptchaWidgetProps": Object {},
- minimumPasswordLength:8
-}
-`;
-
-exports[`should return properly 1`] = `
-Object {
- "errors": Map {
- "createAccountQuery" => null,
- "signInMutation" => null,
- },
- "handleEnterKeyPress": [Function],
- "handleSubmit": [Function],
- "initialValues": Object {
- "customer": Object {
- "email": "gooston@goosemail.com",
- "firstname": "Gooseton",
- "lastname": "Jr",
- },
- "userName": "gooseton",
- },
- "isDisabled": false,
- "minimumPasswordLength": 8,
- "recaptchaWidgetProps": Object {},
}
`;
diff --git a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/useCreateAccount.spec.js b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/useCreateAccount.spec.js
index 5389309839..f84bbc00a8 100644
--- a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/useCreateAccount.spec.js
+++ b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/__tests__/useCreateAccount.spec.js
@@ -1,338 +1,248 @@
import React from 'react';
-import { useMutation, useQuery, useApolloClient } from '@apollo/client';
-import { act } from 'react-test-renderer';
+import { MockedProvider } from '@apollo/client/testing';
+import { renderHook, act } from '@testing-library/react-hooks';
-import { useCartContext } from '../../../../../lib/context/cart';
-import { useUserContext } from '../../../../../lib/context/user';
+import { useUserContext } from '../../../../context/user';
+import { useCartContext } from '../../../../context/cart';
import { useAwaitQuery } from '../../../../hooks/useAwaitQuery';
-import createTestInstance from '../../../../util/createTestInstance';
+
import { useCreateAccount } from '../useCreateAccount';
+import defaultOperations from '../createAccount.gql';
import { useEventingContext } from '../../../../context/eventing';
-jest.mock('@apollo/client', () => {
- const apolloClient = jest.requireActual('@apollo/client');
-
- return {
- ...apolloClient,
- useMutation: jest.fn().mockReturnValue([jest.fn()]),
- useApolloClient: jest.fn(),
- useQuery: jest.fn()
- };
-});
-jest.mock('../../../../hooks/useAwaitQuery', () => ({
- useAwaitQuery: jest.fn().mockReturnValue(jest.fn())
-}));
-jest.mock('../../../../../lib/context/user', () => ({
- useUserContext: jest
- .fn()
- .mockReturnValue([
- { isGettingDetails: false },
- { getUserDetails: jest.fn(), setToken: jest.fn() }
- ])
-}));
-jest.mock('../../../../../lib/context/cart', () => ({
- useCartContext: jest.fn().mockReturnValue([
- { cartId: '1234' },
- {
- createCart: jest.fn(),
- removeCart: jest.fn(),
- getCartDetails: jest.fn()
- }
- ])
-}));
-jest.mock('../../../../store/actions/cart', () => {
- const cartActions = jest.requireActual(
- '../../../store/actions/cart/actions'
- );
- const retrieveCartId = jest.fn().mockReturnValue('12345');
-
- return Object.assign(cartActions, {
- retrieveCartId
- });
-});
-
-jest.mock('../../../../hooks/useGoogleReCaptcha', () => ({
- useGoogleReCaptcha: jest.fn().mockReturnValue({
- recaptchaLoading: false,
- generateReCaptchaData: jest.fn(() => {}),
- recaptchaWidgetProps: {}
- })
-}));
-
-jest.mock('@magento/peregrine/lib/context/eventing', () => ({
- useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
-}));
-const Component = props => {
- const talonProps = useCreateAccount(props);
-
- return ;
+const createAccountVariables = {
+ email: 'bender@planet.express',
+ firstname: 'Bender',
+ lastname: 'Rodriguez',
+ password: '123456',
+ is_subscribed: false
};
+const createAccount = jest.fn();
+const createAccountMock = {
+ request: {
+ query: defaultOperations.createAccountMutation,
+ variables: createAccountVariables
+ },
+ result: () => {
+ createAccount();
-const getTalonProps = props => {
- const tree = createTestInstance();
- const { root } = tree;
- const { talonProps } = root.findByType('i').props;
-
- const update = newProps => {
- act(() => {
- tree.update();
- });
-
- return root.findByType('i').props.talonProps;
- };
+ return {
+ data: {
+ id: 'user_id'
+ }
+ };
+ }
+};
- return { talonProps, tree, update };
+const createCartMock = {
+ request: {
+ query: defaultOperations.createCartMutation
+ },
+ result: {
+ data: {
+ cartId: '1234'
+ }
+ }
};
-const getCustomerQuery = 'getCustomerQuery';
-const getCartDetailsQuery = 'getCartDetailsQuery';
-const createAccountMutation = 'createAccountMutation';
-const createCartMutation = 'createCartMutation';
-const signInMutation = 'signInMutation';
-const mergeCartsMutation = 'mergeCartsMutation';
-const getStoreConfigQuery = 'getStoreConfigQuery';
-
-const getStoreConfigQueryFn = jest.fn().mockReturnValue({
- data: {
- storeConfig: {
- store_code: 'default',
- minimum_password_length: 8,
- customer_access_token_lifetime: 1
+const getCartDetailsMock = {
+ request: {
+ query: defaultOperations.getCartDetailsQuery,
+ variables: {
+ cartId: '1234'
+ }
+ },
+ result: {
+ data: {
+ id: '1234'
}
}
-});
-const customerQueryFn = jest.fn();
-const getCartDetailsQueryFn = jest.fn();
-const createAccountMutationFn = jest
- .fn()
- .mockReturnValue([jest.fn(), { error: null }]);
-const createCartMutationFn = jest.fn().mockReturnValue([jest.fn()]);
-const signInMutationFn = jest.fn().mockReturnValue([
- jest.fn().mockReturnValue({
+};
+
+const getCustomerMock = {
+ request: {
+ query: defaultOperations.getCustomerQuery
+ },
+ result: {
data: {
- generateCustomerToken: {
- token: 'customer token'
+ customer: {
+ id: '123'
}
}
- }),
- { error: null }
-]);
-const mergeCartsMutationFn = jest.fn().mockReturnValue([jest.fn()]);
-const clearCacheData = jest.fn();
-const client = { clearCacheData };
-
-const defaultProps = {
- operations: {
- createAccountMutation,
- createCartMutation,
- getCartDetailsQuery,
- getCustomerQuery,
- mergeCartsMutation,
- getStoreConfigQuery,
- signInMutation
- },
- initialValues: {
- email: 'gooston@goosemail.com',
- firstName: 'Gooseton',
- lastName: 'Jr',
- userName: 'gooseton'
- },
- onSubmit: jest.fn(),
- onCancel: jest.fn()
+ }
};
-const defaultFormValues = {
- customer: {
- email: 'bender@planet.express',
- firstname: 'Bender',
- lastname: 'Rodriguez'
- },
- password: '123456',
- subscribe: false
+const signInVariables = {
+ email: 'bender@planet.express',
+ password: '123456'
};
-beforeAll(() => {
- useQuery.mockImplementation(query => {
- if (query === getStoreConfigQuery) {
- return getStoreConfigQueryFn();
- } else {
- return [jest.fn(), {}];
- }
- });
- useAwaitQuery.mockImplementation(query => {
- if (query === getCustomerQuery) {
- return customerQueryFn();
- } else if (query === getCartDetailsQuery) {
- return getCartDetailsQueryFn();
- } else {
- return jest.fn();
+const authToken = 'auth-token-123';
+const customerTokenLifetime = 3600;
+const signInMock = {
+ request: {
+ query: defaultOperations.signInMutation,
+ variables: signInVariables
+ },
+ result: {
+ data: {
+ generateCustomerToken: {
+ token: authToken,
+ customer_token_lifetime: customerTokenLifetime
+ }
}
- });
+ }
+};
- useMutation.mockImplementation(mutation => {
- if (mutation === createAccountMutation) {
- return createAccountMutationFn();
- } else if (mutation === createCartMutation) {
- return createCartMutationFn();
- } else if (mutation === signInMutation) {
- return signInMutationFn();
- } else if (mutation === mergeCartsMutation) {
- return mergeCartsMutationFn();
- } else {
- return [jest.fn()];
- }
- });
+jest.mock('../../../../context/user');
+const mockGetUserDetails = jest.fn();
+const mockSetToken = jest.fn();
+useUserContext.mockImplementation(() => {
+ const data = {
+ isGettingDetails: false
+ };
- useApolloClient.mockReturnValue(client);
+ const api = {
+ getUserDetails: mockGetUserDetails,
+ setToken: mockSetToken
+ };
+
+ return [data, api];
});
-test('should return properly', () => {
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
- expect(talonProps).toMatchSnapshot();
+jest.mock('../../../../context/cart');
+const mockCreateCart = jest.fn();
+const mockGetCartDetails = jest.fn();
+const mockRemoveCart = jest.fn();
+useCartContext.mockImplementation(() => {
+ const data = {};
+ const api = {
+ createCart: mockCreateCart,
+ getCartDetails: mockGetCartDetails,
+ removeCart: mockRemoveCart
+ };
+
+ return [data, api];
});
-// test('returns the correct shape with no initial values', async() => {
-// const onSubmit = jest.fn();
-// const { talonProps } = getTalonProps({
-// ...defaultProps,
-// onSubmit: handleSubmit
-// });
-// // await talonProps.handleSubmit()
-// expect(talonProps).toMatchSnapshot();
-// });
+jest.mock('../../../../hooks/useAwaitQuery');
+useAwaitQuery.mockImplementation(jest.fn());
-describe('handle submit event', () => {
- it('should create a new account', async () => {
- const createAccount = jest.fn().mockResolvedValueOnce(true);
- createAccountMutationFn.mockReturnValueOnce([
- createAccount,
- { error: null }
- ]);
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+jest.mock('../../../../hooks/useGoogleReCaptcha', () => ({
+ useGoogleReCaptcha: jest.fn().mockReturnValue({
+ recaptchaLoading: false,
+ generateReCaptchaData: jest.fn(() => {}),
+ recaptchaWidgetProps: {}
+ })
+}));
- await talonProps.handleSubmit(defaultFormValues);
+const handleSubmit = jest.fn();
- expect(createAccount).toHaveBeenCalledWith({
- variables: {
- email: defaultFormValues.customer.email,
- firstname: defaultFormValues.customer.firstname,
- lastname: defaultFormValues.customer.lastname,
- password: defaultFormValues.password,
- is_subscribed: !!defaultFormValues.subscribe
- }
- });
- });
- it('should dispatch create account event', async () => {
- const mockDispatch = jest.fn();
+const initialProps = {
+ initialValues: {
+ email: 'philipfry@fake.email',
+ firstName: 'Philip',
+ lastName: 'Fry'
+ },
+ onSubmit: handleSubmit
+};
- useEventingContext.mockReturnValueOnce([
- {},
- {
- dispatch: mockDispatch
- }
- ]);
+jest.mock('@magento/peregrine/lib/context/eventing', () => ({
+ useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
+}));
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+const renderHookWithProviders = ({
+ renderHookOptions = { initialProps },
+ mocks = [
+ createAccountMock,
+ signInMock,
+ createCartMock,
+ getCartDetailsMock,
+ getCustomerMock
+ ]
+} = {}) => {
+ const wrapper = ({ children }) => (
+
+ {children}
+
+ );
- await talonProps.handleSubmit(defaultFormValues);
+ return renderHook(useCreateAccount, { wrapper, ...renderHookOptions });
+};
- expect(mockDispatch).toHaveBeenCalledTimes(1);
- expect(mockDispatch.mock.calls[0][0]).toMatchSnapshot();
- });
- test('should signin after account creation', async () => {
- const token = 'customertoken';
- const customer_token_lifetime = 1;
- const signIn = jest.fn().mockReturnValue({
- data: {
- generateCustomerToken: {
- token
- }
- }
- });
- signInMutationFn.mockReturnValueOnce([signIn, { error: null }]);
- const setToken = jest.fn();
- useUserContext.mockReturnValueOnce([
- { isGettingDetails: false },
- { getUserDetails: jest.fn(), setToken }
- ]);
-
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+test('returns the correct shape', () => {
+ const { result } = renderHookWithProviders();
- await talonProps.handleSubmit(defaultFormValues);
+ expect(result.current).toMatchSnapshot();
+});
- expect(signIn).toHaveBeenCalledWith({
- variables: {
- email: defaultFormValues.customer.email,
- password: defaultFormValues.password
+test('returns the correct shape with no initial values', () => {
+ const { result } = renderHookWithProviders({
+ renderHookOptions: {
+ initialProps: {
+ onSubmit: handleSubmit
}
- });
- expect(setToken).toHaveBeenCalledWith(token, customer_token_lifetime);
+ }
});
- it('should create a new cart', async () => {
- const createCart = jest.fn();
- useCartContext.mockReturnValueOnce([
- { cartId: '1234' },
- {
- createCart,
- removeCart: jest.fn(),
- getCartDetails: jest.fn()
- }
- ]);
+ expect(result.current).toMatchSnapshot();
+});
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+describe('handle submit event', () => {
+ const formValues = {
+ customer: {
+ email: 'bender@planet.express',
+ firstname: 'Bender',
+ lastname: 'Rodriguez'
+ },
+ password: '123456',
+ subscribe: false
+ };
- await talonProps.handleSubmit(defaultFormValues);
+ it('creates an account, dispatches event, signs in, and generates a new cart', async () => {
+ const [, { dispatch }] = useEventingContext();
- expect(createCart).toHaveBeenCalled();
- });
+ const { result } = renderHookWithProviders();
- it('should remove cart', async () => {
- const removeCart = jest.fn();
- useCartContext.mockReturnValueOnce([
- { cartId: '1234' },
- {
- createCart: jest.fn(),
- removeCart,
- getCartDetails: jest.fn()
- }
- ]);
+ await act(async () => {
+ await result.current.handleSubmit(formValues);
+ });
- const { talonProps } = getTalonProps({
- ...defaultProps
+ expect(mockSetToken).toHaveBeenCalledWith('auth-token-123', 3600);
+ expect(createAccount).toHaveBeenCalled();
+ expect(mockRemoveCart).toHaveBeenCalled();
+ expect(mockCreateCart).toHaveBeenCalledWith({
+ fetchCartId: expect.anything()
});
+ expect(mockGetUserDetails).toHaveBeenCalled();
+ expect(mockGetCartDetails).toHaveBeenCalled();
- await talonProps.handleSubmit(defaultFormValues);
+ expect(handleSubmit).toHaveBeenCalledTimes(1);
+ expect(result.current.isDisabled).toBeTruthy();
- expect(removeCart).toHaveBeenCalled();
+ expect(dispatch).toHaveBeenCalledTimes(1);
+ expect(dispatch.mock.calls[0][0]).toMatchSnapshot();
});
- it('should call onSubmit', async () => {
- const onSubmit = jest.fn();
-
- const { talonProps } = getTalonProps({
- ...defaultProps,
- onSubmit
+ it('does not call the submit callback if it is not defined', async () => {
+ const { result } = renderHookWithProviders({
+ renderHookOptions: {
+ initialProps: {
+ onSubmit: undefined
+ }
+ }
});
- await talonProps.handleSubmit(defaultFormValues);
+ await act(async () => {
+ await result.current.handleSubmit(formValues);
+ });
- expect(onSubmit).toHaveBeenCalled();
+ expect(handleSubmit).not.toHaveBeenCalled();
});
it('resets the submitting state on error', async () => {
const consoleErrorSpy = jest.spyOn(console, 'error');
- const mockGetUserDetails = jest.fn();
+
useUserContext.mockImplementationOnce(() => {
return [
{
@@ -346,20 +256,20 @@ describe('handle submit event', () => {
}
];
});
- const { talonProps, update } = getTalonProps({
- ...defaultProps
+ const { result } = renderHookWithProviders();
+
+ await act(async () => {
+ await result.current.handleSubmit(formValues);
});
- const { isDisabled } = update;
- await talonProps.handleSubmit(defaultFormValues);
expect(consoleErrorSpy).toHaveBeenCalled();
- expect(isDisabled).toBeFalsy();
+ expect(result.current.isDisabled).toBeFalsy();
});
it('does not log errors to console in production when an error happens', async () => {
const consoleErrorSpy = jest.spyOn(console, 'error');
process.env.NODE_ENV = 'production';
- const mockGetUserDetails = jest.fn();
+
useUserContext.mockImplementationOnce(() => {
return [
{
@@ -373,10 +283,12 @@ describe('handle submit event', () => {
}
];
});
- const { talonProps } = getTalonProps(defaultProps);
+ const { result } = renderHookWithProviders();
+
await act(async () => {
- await talonProps.handleSubmit();
+ await result.current.handleSubmit(formValues);
});
+
expect(consoleErrorSpy).not.toHaveBeenCalled();
});
});
diff --git a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/createAccount.gql.js b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/createAccount.gql.js
index 730eb08a89..6787d4682f 100644
--- a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/createAccount.gql.js
+++ b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/createAccount.gql.js
@@ -1,5 +1,4 @@
import { gql } from '@apollo/client';
-import { GET_STORE_CONFIG_DATA } from '../../CreateAccount/createAccount.gql';
export const CREATE_ACCOUNT = gql`
mutation CreateAccountAfterCheckout(
@@ -45,6 +44,7 @@ export const SIGN_IN = gql`
mutation SignInAfterCheckout($email: String!, $password: String!) {
generateCustomerToken(email: $email, password: $password) {
token
+ customer_token_lifetime
}
}
`;
@@ -111,6 +111,5 @@ export default {
createCartMutation: CREATE_CART,
getCartDetailsQuery: GET_CART_DETAILS,
getCustomerQuery: GET_CUSTOMER,
- signInMutation: SIGN_IN,
- getStoreConfigQuery: GET_STORE_CONFIG_DATA
+ signInMutation: SIGN_IN
};
diff --git a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useCreateAccount.js b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useCreateAccount.js
index b9176afb3f..ef3a6d6169 100644
--- a/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useCreateAccount.js
+++ b/packages/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useCreateAccount.js
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useState } from 'react';
-import { useMutation, useQuery } from '@apollo/client';
+import { useMutation } from '@apollo/client';
import mergeOperations from '../../../util/shallowMerge';
import { useUserContext } from '../../../context/user';
@@ -39,8 +39,7 @@ export const useCreateAccount = props => {
createCartMutation,
getCartDetailsQuery,
getCustomerQuery,
- signInMutation,
- getStoreConfigQuery
+ signInMutation
} = operations;
const [isSubmitting, setIsSubmitting] = useState(false);
const [, { createCart, getCartDetails, removeCart }] = useCartContext();
@@ -66,23 +65,6 @@ export const useCreateAccount = props => {
fetchPolicy: 'no-cache'
});
- const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
- fetchPolicy: 'cache-and-network',
- nextFetchPolicy: 'cache-first'
- });
-
- const {
- minimumPasswordLength,
- customerAccessTokenLifetime
- } = useMemo(() => {
- const storeConfig = storeConfigData?.storeConfig || {};
-
- return {
- minimumPasswordLength: storeConfig.minimum_password_length,
- customerAccessTokenLifetime:
- storeConfig.customer_access_token_lifetime
- };
- }, [storeConfigData]);
const fetchUserDetails = useAwaitQuery(getCustomerQuery);
const fetchCartDetails = useAwaitQuery(getCartDetailsQuery);
@@ -135,8 +117,12 @@ export const useCreateAccount = props => {
...recaptchaDataForSignIn
});
const token = signInResponse.data.generateCustomerToken.token;
- await (customerAccessTokenLifetime
- ? setToken(token, customerAccessTokenLifetime)
+ const customerTokenLifetime =
+ signInResponse.data.generateCustomerToken
+ .customer_token_lifetime;
+
+ await (customerTokenLifetime
+ ? setToken(token, customerTokenLifetime)
: setToken(token));
// Clear guest cart from redux.
@@ -166,7 +152,6 @@ export const useCreateAccount = props => {
}
},
[
- customerAccessTokenLifetime,
createAccount,
createCart,
fetchCartDetails,
@@ -215,7 +200,6 @@ export const useCreateAccount = props => {
handleEnterKeyPress,
isDisabled: isSubmitting || isGettingDetails || recaptchaLoading,
initialValues: sanitizedInitialValues,
- recaptchaWidgetProps,
- minimumPasswordLength
+ recaptchaWidgetProps
};
};
diff --git a/packages/peregrine/lib/talons/CreateAccount/__tests__/__snapshots__/useCreateAccount.spec.js.snap b/packages/peregrine/lib/talons/CreateAccount/__tests__/__snapshots__/useCreateAccount.spec.js.snap
index 7553782a17..47c2adbc08 100644
--- a/packages/peregrine/lib/talons/CreateAccount/__tests__/__snapshots__/useCreateAccount.spec.js.snap
+++ b/packages/peregrine/lib/talons/CreateAccount/__tests__/__snapshots__/useCreateAccount.spec.js.snap
@@ -37,7 +37,6 @@ Object {
"userName": "gooseton",
},
"isDisabled": false,
- "minimumPasswordLength": 8,
"recaptchaWidgetProps": Object {},
}
`;
diff --git a/packages/peregrine/lib/talons/CreateAccount/__tests__/useCreateAccount.spec.js b/packages/peregrine/lib/talons/CreateAccount/__tests__/useCreateAccount.spec.js
index 6c22e62abe..01dbabe7a7 100644
--- a/packages/peregrine/lib/talons/CreateAccount/__tests__/useCreateAccount.spec.js
+++ b/packages/peregrine/lib/talons/CreateAccount/__tests__/useCreateAccount.spec.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { useMutation, useQuery, useApolloClient } from '@apollo/client';
+import { useMutation, useApolloClient } from '@apollo/client';
import { act } from 'react-test-renderer';
import { useCartContext } from '../../../context/cart';
@@ -16,8 +16,7 @@ jest.mock('@apollo/client', () => {
return {
...apolloClient,
useMutation: jest.fn().mockReturnValue([jest.fn()]),
- useApolloClient: jest.fn(),
- useQuery: jest.fn()
+ useApolloClient: jest.fn()
};
});
jest.mock('../../../../lib/hooks/useAwaitQuery', () => ({
@@ -92,17 +91,7 @@ const createAccountMutation = 'createAccountMutation';
const createCartMutation = 'createCartMutation';
const signInMutation = 'signInMutation';
const mergeCartsMutation = 'mergeCartsMutation';
-const getStoreConfigQuery = 'getStoreConfigQuery';
-
-const getStoreConfigQueryFn = jest.fn().mockReturnValue({
- data: {
- storeConfig: {
- store_code: 'default',
- minimum_password_length: 8,
- customer_access_token_lifetime: 1
- }
- }
-});
+
const customerQueryFn = jest.fn();
const getCartDetailsQueryFn = jest.fn();
const createAccountMutationFn = jest
@@ -113,7 +102,8 @@ const signInMutationFn = jest.fn().mockReturnValue([
jest.fn().mockReturnValue({
data: {
generateCustomerToken: {
- token: 'customer token'
+ token: 'customer token',
+ customer_token_lifetime: 3600
}
}
}),
@@ -130,7 +120,6 @@ const defaultProps = {
getCartDetailsQuery,
getCustomerQuery,
mergeCartsMutation,
- getStoreConfigQuery,
signInMutation
},
initialValues: {
@@ -154,13 +143,6 @@ const defaultFormValues = {
};
beforeAll(() => {
- useQuery.mockImplementation(query => {
- if (query === getStoreConfigQuery) {
- return getStoreConfigQueryFn();
- } else {
- return [jest.fn(), {}];
- }
- });
useAwaitQuery.mockImplementation(query => {
if (query === getCustomerQuery) {
return customerQueryFn();
@@ -291,11 +273,12 @@ describe('handleSubmit', () => {
test('should signin after account creation', async () => {
const token = 'customertoken';
- const customer_token_lifetime = 1;
+ const customer_token_lifetime = 3600;
const signIn = jest.fn().mockReturnValue({
data: {
generateCustomerToken: {
- token
+ token,
+ customer_token_lifetime
}
}
});
diff --git a/packages/peregrine/lib/talons/CreateAccount/createAccount.gql.js b/packages/peregrine/lib/talons/CreateAccount/createAccount.gql.js
index 0400d0e0e4..4eed9375f0 100644
--- a/packages/peregrine/lib/talons/CreateAccount/createAccount.gql.js
+++ b/packages/peregrine/lib/talons/CreateAccount/createAccount.gql.js
@@ -45,6 +45,7 @@ export const SIGN_IN = gql`
mutation SignInAfterCreate($email: String!, $password: String!) {
generateCustomerToken(email: $email, password: $password) {
token
+ customer_token_lifetime
}
}
`;
@@ -125,16 +126,6 @@ export const MERGE_CARTS = gql`
}
${CheckoutPageFragment}
`;
-export const GET_STORE_CONFIG_DATA = gql`
- query GetStoreConfigData {
- # eslint-disable-next-line @graphql-eslint/require-id-when-available
- storeConfig {
- store_code
- minimum_password_length
- customer_access_token_lifetime
- }
- }
-`;
export default {
createAccountMutation: CREATE_ACCOUNT,
@@ -142,6 +133,5 @@ export default {
getCartDetailsQuery: GET_CART_DETAILS,
getCustomerQuery: GET_CUSTOMER,
mergeCartsMutation: MERGE_CARTS,
- signInMutation: SIGN_IN,
- getStoreConfigQuery: GET_STORE_CONFIG_DATA
+ signInMutation: SIGN_IN
};
diff --git a/packages/peregrine/lib/talons/CreateAccount/useCreateAccount.js b/packages/peregrine/lib/talons/CreateAccount/useCreateAccount.js
index 68922ca694..5bfca3e6bc 100644
--- a/packages/peregrine/lib/talons/CreateAccount/useCreateAccount.js
+++ b/packages/peregrine/lib/talons/CreateAccount/useCreateAccount.js
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useState } from 'react';
-import { useApolloClient, useMutation, useQuery } from '@apollo/client';
+import { useApolloClient, useMutation } from '@apollo/client';
import mergeOperations from '../../util/shallowMerge';
import { useUserContext } from '../../context/user';
@@ -37,8 +37,7 @@ export const useCreateAccount = props => {
getCartDetailsQuery,
getCustomerQuery,
mergeCartsMutation,
- signInMutation,
- getStoreConfigQuery
+ signInMutation
} = operations;
const apolloClient = useApolloClient();
const [isSubmitting, setIsSubmitting] = useState(false);
@@ -70,24 +69,6 @@ export const useCreateAccount = props => {
fetchPolicy: 'no-cache'
});
- const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
- fetchPolicy: 'cache-and-network',
- nextFetchPolicy: 'cache-first'
- });
-
- const {
- minimumPasswordLength,
- customerAccessTokenLifetime
- } = useMemo(() => {
- const storeConfig = storeConfigData?.storeConfig || {};
-
- return {
- minimumPasswordLength: storeConfig.minimum_password_length,
- customerAccessTokenLifetime:
- storeConfig.customer_access_token_lifetime
- };
- }, [storeConfigData]);
-
const fetchUserDetails = useAwaitQuery(getCustomerQuery);
const fetchCartDetails = useAwaitQuery(getCartDetailsQuery);
@@ -155,8 +136,11 @@ export const useCreateAccount = props => {
...recaptchaDataForSignIn
});
const token = signInResponse.data.generateCustomerToken.token;
- await (customerAccessTokenLifetime
- ? setToken(token, customerAccessTokenLifetime)
+ const customerTokenLifetime =
+ signInResponse.data.generateCustomerToken
+ .customer_token_lifetime;
+ await (customerTokenLifetime
+ ? setToken(token, customerTokenLifetime)
: setToken(token));
// Clear all cart/customer data from cache and redux.
await apolloClient.clearCacheData(apolloClient, 'cart');
@@ -197,7 +181,6 @@ export const useCreateAccount = props => {
},
[
- customerAccessTokenLifetime,
cartId,
generateReCaptchaData,
createAccount,
@@ -242,8 +225,7 @@ export const useCreateAccount = props => {
handleCancelKeyPress,
initialValues: sanitizedInitialValues,
isDisabled: isSubmitting || isGettingDetails || recaptchaLoading,
- recaptchaWidgetProps,
- minimumPasswordLength
+ recaptchaWidgetProps
};
};
@@ -257,7 +239,6 @@ export const useCreateAccount = props => {
*
* @property {GraphQLAST} customerQuery query to fetch customer details
* @property {GraphQLAST} getCartDetailsQuery query to get cart details
- * @property {GraphQLAST} getStoreConfigQuery query to get store config
*/
/**
diff --git a/packages/peregrine/lib/talons/SignIn/__tests__/__snapshots__/useSignIn.spec.js.snap b/packages/peregrine/lib/talons/SignIn/__tests__/__snapshots__/useSignIn.spec.js.snap
deleted file mode 100644
index fff8f0d9a3..0000000000
--- a/packages/peregrine/lib/talons/SignIn/__tests__/__snapshots__/useSignIn.spec.js.snap
+++ /dev/null
@@ -1,75 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`mutation error is returned by talon 1`] = `
-Map {
- "getUserDetailsQuery" => "getDetails error from redux",
- "signInMutation" => "Sign In Mutation Error",
-}
-`;
-
-exports[`returns correct shape 1`] = `
-Object {
- "cartContext": Array [
- Object {
- "cartId": "1234",
- },
- Object {
- "createCart": [MockFunction],
- "getCartDetails": [MockFunction],
- "removeCart": [MockFunction],
- },
- ],
- "errors": Map {
- "getUserDetailsQuery" => "getDetails error from redux",
- "signInMutation" => null,
- },
- "eventingContext": Array [
- Object {},
- Object {
- "dispatch": [MockFunction],
- },
- ],
- "fetchCartDetails": [MockFunction],
- "fetchCartId": [MockFunction],
- "fetchUserDetails": undefined,
- "forgotPasswordHandleEnterKeyPress": [Function],
- "googleReCaptcha": Object {
- "generateReCaptchaData": [Function],
- "recaptchaLoading": undefined,
- "recaptchaWidgetProps": Object {
- "containerElement": [Function],
- "shouldRender": false,
- },
- },
- "handleCreateAccount": [Function],
- "handleEnterKeyPress": [Function],
- "handleForgotPassword": [Function],
- "handleSubmit": [Function],
- "isBusy": undefined,
- "isSigningIn": false,
- "mergeCarts": [MockFunction],
- "recaptchaWidgetProps": Object {
- "containerElement": [Function],
- "shouldRender": false,
- },
- "setFormApi": [Function],
- "setIsSigningIn": [Function],
- "signInMutationResult": Array [
- [MockFunction],
- Object {
- "error": null,
- },
- ],
- "signinHandleEnterKeyPress": [Function],
- "userContext": Array [
- Object {
- "getDetailsError": "getDetails error from redux",
- "isGettingDetails": false,
- },
- Object {
- "getUserDetails": [MockFunction],
- "setToken": [MockFunction],
- },
- ],
-}
-`;
diff --git a/packages/peregrine/lib/talons/SignIn/__tests__/useSignIn.spec.js b/packages/peregrine/lib/talons/SignIn/__tests__/useSignIn.spec.js
index 42845b790a..9f3ed201bb 100644
--- a/packages/peregrine/lib/talons/SignIn/__tests__/useSignIn.spec.js
+++ b/packages/peregrine/lib/talons/SignIn/__tests__/useSignIn.spec.js
@@ -1,17 +1,19 @@
import React from 'react';
-import { useApolloClient, useQuery, useMutation } from '@apollo/client';
-import { act } from '@testing-library/react-hooks';
-import createTestInstance from '../../../util/createTestInstance';
+import { useApolloClient } from '@apollo/client';
+import { MockedProvider } from '@apollo/client/testing';
+import { renderHook, act } from '@testing-library/react-hooks';
+
+import { useCartContext } from '../../../context/cart';
import { useUserContext } from '../../../context/user';
+import defaultOperations from '../signIn.gql';
import { useSignIn } from '../useSignIn';
+import { useEventingContext } from '../../../context/eventing';
import { useAwaitQuery } from '../../../hooks/useAwaitQuery';
jest.mock('@apollo/client', () => {
return {
...jest.requireActual('@apollo/client'),
- useApolloClient: jest.fn(),
- useMutation: jest.fn().mockReturnValue([jest.fn()]),
- useQuery: jest.fn()
+ useApolloClient: jest.fn()
};
});
jest.mock('../../../hooks/useAwaitQuery', () => ({
@@ -21,9 +23,9 @@ jest.mock('../../../store/actions/cart', () => ({
retrieveCartId: jest.fn().mockReturnValue('new-cart-id')
}));
-jest.mock('../../../../lib/context/cart', () => ({
+jest.mock('../../../context/cart', () => ({
useCartContext: jest.fn().mockReturnValue([
- { cartId: '1234' },
+ { cartId: 'old-cart-id' },
{
createCart: jest.fn(),
removeCart: jest.fn(),
@@ -32,7 +34,7 @@ jest.mock('../../../../lib/context/cart', () => ({
])
}));
-jest.mock('../../../../lib/context/user', () => ({
+jest.mock('../../../context/user', () => ({
useUserContext: jest.fn().mockReturnValue([
{
isGettingDetails: false,
@@ -41,6 +43,7 @@ jest.mock('../../../../lib/context/user', () => ({
{ getUserDetails: jest.fn(), setToken: jest.fn() }
])
}));
+
jest.mock('../../../hooks/useGoogleReCaptcha', () => ({
useGoogleReCaptcha: jest.fn().mockReturnValue({
recaptchaLoading: false,
@@ -53,71 +56,43 @@ jest.mock('@magento/peregrine/lib/context/eventing', () => ({
useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
}));
-const Component = props => {
- const talonProps = useSignIn(props);
-
- return ;
-};
-
-const getTalonProps = props => {
- const tree = createTestInstance();
- const { root } = tree;
- const { talonProps } = root.findByType('i').props;
-
- const update = newProps => {
- act(() => {
- tree.update();
- });
-
- return root.findByType('i').props.talonProps;
- };
-
- return { talonProps, tree, update };
-};
-
const signInVariables = {
email: 'fry@planetexpress.com',
password: 'slurm is the best'
};
+const authToken = 'auth-token-123';
+const customerTokenLifetime = 3600;
-const getCartDetailsQuery = 'getCartDetailsQuery';
-const getCustomerQuery = 'getCustomerQuery';
-const createCartMutation = 'createCartMutation';
-const signInMutation = 'signInMutation';
-const mergeCartsMutation = 'mergeCartsMutation';
-const getStoreConfigQuery = 'getStoreConfigQuery';
-
-const getCartDetailsQueryFn = jest.fn();
-const customerQueryFn = jest.fn();
-const mergeCartsMutationFn = jest.fn().mockReturnValue([jest.fn()]);
-const getStoreConfigQueryFn = jest.fn().mockReturnValue({
- data: {
- storeConfig: {
- store_code: 'default',
- customer_access_token_lifetime: 1
- }
- }
-});
-const signInMutationFn = jest.fn().mockReturnValue([
- jest.fn().mockReturnValue({
+const signInMock = {
+ request: {
+ query: defaultOperations.signInMutation,
+ variables: signInVariables
+ },
+ result: {
data: {
generateCustomerToken: {
- token: 'customer token'
+ token: authToken,
+ customer_token_lifetime: customerTokenLifetime
}
}
- }),
- { error: null }
-]);
-
-const defaultProps = {
- operations: {
- createCartMutation,
- getCustomerQuery,
- mergeCartsMutation,
- signInMutation,
- getStoreConfigQuery
+ }
+};
+
+const mergeCartsMock = {
+ request: {
+ query: defaultOperations.mergeCartsMutation,
+ variables: {
+ destinationCartId: 'new-cart-id',
+ sourceCartId: 'old-cart-id'
+ }
},
- getCartDetailsQuery: jest.fn(),
+ result: {
+ data: null
+ }
+};
+
+const initialProps = {
+ getCartDetailsQuery: 'getCartDetailsQuery',
setDefaultUsername: jest.fn(),
showCreateAccount: jest.fn(),
showForgotPassword: jest.fn(),
@@ -127,160 +102,7312 @@ const defaultProps = {
const clearCacheData = jest.fn();
const client = { clearCacheData };
+const renderHookWithProviders = ({
+ renderHookOptions = { initialProps },
+ mocks = [signInMock, mergeCartsMock]
+} = {}) => {
+ const wrapper = ({ children }) => (
+
+ {children}
+
+ );
+
+ return renderHook(useSignIn, { wrapper, ...renderHookOptions });
+};
+
beforeEach(() => {
- useQuery.mockImplementation(query => {
- if (query === getStoreConfigQuery) {
- return getStoreConfigQueryFn();
- } else {
- return [jest.fn(), {}];
- }
- });
- useAwaitQuery.mockImplementation(query => {
- if (query === getCustomerQuery) {
- return customerQueryFn();
- } else if (query === getCartDetailsQuery) {
- return getCartDetailsQueryFn();
- } else {
- return jest.fn();
- }
- });
- useMutation.mockImplementation(mutation => {
- if (mutation === signInMutation) {
- return signInMutationFn();
- } else if (mutation === mergeCartsMutation) {
- return mergeCartsMutationFn();
- } else {
- return [jest.fn()];
- }
- });
useApolloClient.mockReturnValue(client);
});
test('returns correct shape', () => {
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+ const { result } = renderHookWithProviders();
- expect(talonProps).toMatchSnapshot();
-});
-test('should set isBusy to true', () => {
- const { talonProps, update } = getTalonProps({
- ...defaultProps
- });
- talonProps.handleSubmit(signInVariables);
-
- const { isBusy } = update();
-
- expect(isBusy).toBeTruthy();
+ expect(result.current).toMatchInlineSnapshot(`
+ Object {
+ "cartContext": Array [
+ Object {
+ "cartId": "old-cart-id",
+ },
+ Object {
+ "createCart": [MockFunction],
+ "getCartDetails": [MockFunction],
+ "removeCart": [MockFunction],
+ },
+ ],
+ "errors": Map {
+ "getUserDetailsQuery" => "getDetails error from redux",
+ "signInMutation" => undefined,
+ },
+ "eventingContext": Array [
+ Object {},
+ Object {
+ "dispatch": [MockFunction],
+ },
+ ],
+ "fetchCartDetails": undefined,
+ "fetchCartId": [Function],
+ "fetchUserDetails": undefined,
+ "forgotPasswordHandleEnterKeyPress": [Function],
+ "googleReCaptcha": Object {
+ "generateReCaptchaData": [Function],
+ "recaptchaLoading": true,
+ "recaptchaWidgetProps": Object {
+ "containerElement": [Function],
+ "shouldRender": false,
+ },
+ },
+ "handleCreateAccount": [Function],
+ "handleEnterKeyPress": [Function],
+ "handleForgotPassword": [Function],
+ "handleSubmit": [Function],
+ "isBusy": true,
+ "isSigningIn": false,
+ "mergeCarts": [Function],
+ "recaptchaWidgetProps": Object {
+ "containerElement": [Function],
+ "shouldRender": false,
+ },
+ "setFormApi": [Function],
+ "setIsSigningIn": [Function],
+ "signInMutationResult": Array [
+ [Function],
+ Object {
+ "called": false,
+ "client": ApolloClient {
+ "cache": InMemoryCache {
+ "addTypename": false,
+ "config": Object {
+ "addTypename": false,
+ "canonizeResults": false,
+ "dataIdFromObject": [Function],
+ "resultCaching": true,
+ },
+ "data": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": [Circular],
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "toReference": [Function],
+ },
+ "evict": [Function],
+ "getFragmentDoc": [Function],
+ "makeVar": [Function],
+ "maybeBroadcastWatch": [Function],
+ "modify": [Function],
+ "optimisticData": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": [Circular],
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "reset": [Function],
+ "storeReader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ "storeWriter": StoreWriter {
+ "cache": [Circular],
+ "reader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ },
+ "txCount": 0,
+ "typenameDocumentCache": Map {},
+ "watches": Set {
+ Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": QueryInfo {
+ "cache": [Circular],
+ "cancel": [Function],
+ "dirty": false,
+ "document": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "graphQLErrors": Array [],
+ "lastDiff": Object {
+ "diff": Object {
+ "complete": false,
+ "missing": Array [
+ MissingFieldError {
+ "message": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ "path": Object {
+ "recaptchaV3Config": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ },
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ ],
+ "result": Object {},
+ },
+ "options": Object {
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ },
+ },
+ "lastRequestId": 1,
+ "lastWatch": [Circular],
+ "listeners": Set {
+ [Function],
+ },
+ "networkError": null,
+ "networkStatus": 1,
+ "observableQuery": ObservableQuery {
+ "_subscriber": [Function],
+ "concast": Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ "initialFetchPolicy": "cache-and-network",
+ "isTornDown": false,
+ "last": Object {
+ "result": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ "variables": Object {},
+ },
+ "observer": Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": undefined,
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": Array [
+ Object {
+ "type": "next",
+ "value": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ },
+ ],
+ "_state": "buffering",
+ },
+ },
+ },
+ "options": Object {
+ "fetchPolicy": "cache-and-network",
+ "notifyOnNetworkStatusChange": false,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ "queryId": "1",
+ "queryInfo": [Circular],
+ "queryManager": QueryManager {
+ "assumeImmutableResults": false,
+ "cache": [Circular],
+ "clientAwareness": Object {
+ "name": undefined,
+ "version": undefined,
+ },
+ "fetchCancelFns": Map {
+ "1" => [Function],
+ },
+ "inFlightLinkObservables": Map {
+ Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ } => Map {
+ "{}" => Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ },
+ "link": MockLink {
+ "addTypename": false,
+ "mockedResponsesByKey": Object {
+ "{\\"query\\":\\"mutation MergeCartsAfterSignIn($sourceCartId: String!, $destinationCartId: String!) {\\\\n mergeCarts(\\\\n source_cart_id: $sourceCartId\\\\n destination_cart_id: $destinationCartId\\\\n ) {\\\\n id\\\\n items {\\\\n uid\\\\n }\\\\n ...CheckoutPageFragment\\\\n }\\\\n}\\\\n\\\\nfragment CheckoutPageFragment on Cart {\\\\n id\\\\n items {\\\\n uid\\\\n product {\\\\n uid\\\\n stock_status\\\\n }\\\\n }\\\\n total_quantity\\\\n available_payment_methods {\\\\n code\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "MergeCartsAfterSignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "source_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "destination_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "mergeCarts",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentSpread",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "product",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "stock_status",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "total_quantity",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "available_payment_methods",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "code",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "typeCondition": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "Cart",
+ },
+ },
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 932,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "destinationCartId": "new-cart-id",
+ "sourceCartId": "old-cart-id",
+ },
+ },
+ "result": Object {
+ "data": null,
+ },
+ },
+ ],
+ "{\\"query\\":\\"mutation SignIn($email: String!, $password: String!) {\\\\n generateCustomerToken(email: $email, password: $password) {\\\\n token\\\\n customer_token_lifetime\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "SignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "generateCustomerToken",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "token",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "customer_token_lifetime",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 198,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "email": "fry@planetexpress.com",
+ "password": "slurm is the best",
+ },
+ },
+ "result": Object {
+ "data": Object {
+ "generateCustomerToken": Object {
+ "customer_token_lifetime": 3600,
+ "token": "auth-token-123",
+ },
+ },
+ },
+ },
+ ],
+ },
+ "operation": Object {
+ "extensions": Object {},
+ "operationName": "GetReCaptchaV3Config",
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ },
+ "localState": LocalState {
+ "cache": [Circular],
+ "client": [Circular],
+ },
+ "mutationIdCounter": 1,
+ "mutationStore": Object {},
+ "onBroadcast": [Function],
+ "queries": Map {
+ "1" => [Circular],
+ },
+ "queryDeduplication": true,
+ "queryIdCounter": 2,
+ "requestIdCounter": 2,
+ "ssrMode": false,
+ "transformCache": WeakMap {},
+ },
+ "queryName": "GetReCaptchaV3Config",
+ "subscriptions": Set {},
+ },
+ "oqListener": [Function],
+ "queryId": "1",
+ "stopped": false,
+ "subscriptions": Set {},
+ "variables": Object {},
+ },
+ },
+ },
+ },
+ "clearStoreCallbacks": Array [],
+ "defaultOptions": Object {},
+ "disableNetworkFetches": false,
+ "link": MockLink {
+ "addTypename": false,
+ "mockedResponsesByKey": Object {
+ "{\\"query\\":\\"mutation MergeCartsAfterSignIn($sourceCartId: String!, $destinationCartId: String!) {\\\\n mergeCarts(\\\\n source_cart_id: $sourceCartId\\\\n destination_cart_id: $destinationCartId\\\\n ) {\\\\n id\\\\n items {\\\\n uid\\\\n }\\\\n ...CheckoutPageFragment\\\\n }\\\\n}\\\\n\\\\nfragment CheckoutPageFragment on Cart {\\\\n id\\\\n items {\\\\n uid\\\\n product {\\\\n uid\\\\n stock_status\\\\n }\\\\n }\\\\n total_quantity\\\\n available_payment_methods {\\\\n code\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "MergeCartsAfterSignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "source_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "destination_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "mergeCarts",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentSpread",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "product",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "stock_status",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "total_quantity",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "available_payment_methods",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "code",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "typeCondition": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "Cart",
+ },
+ },
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 932,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "destinationCartId": "new-cart-id",
+ "sourceCartId": "old-cart-id",
+ },
+ },
+ "result": Object {
+ "data": null,
+ },
+ },
+ ],
+ "{\\"query\\":\\"mutation SignIn($email: String!, $password: String!) {\\\\n generateCustomerToken(email: $email, password: $password) {\\\\n token\\\\n customer_token_lifetime\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "SignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "generateCustomerToken",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "token",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "customer_token_lifetime",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 198,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "email": "fry@planetexpress.com",
+ "password": "slurm is the best",
+ },
+ },
+ "result": Object {
+ "data": Object {
+ "generateCustomerToken": Object {
+ "customer_token_lifetime": 3600,
+ "token": "auth-token-123",
+ },
+ },
+ },
+ },
+ ],
+ },
+ "operation": Object {
+ "extensions": Object {},
+ "operationName": "GetReCaptchaV3Config",
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ },
+ "localState": LocalState {
+ "cache": InMemoryCache {
+ "addTypename": false,
+ "config": Object {
+ "addTypename": false,
+ "canonizeResults": false,
+ "dataIdFromObject": [Function],
+ "resultCaching": true,
+ },
+ "data": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": [Circular],
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "toReference": [Function],
+ },
+ "evict": [Function],
+ "getFragmentDoc": [Function],
+ "makeVar": [Function],
+ "maybeBroadcastWatch": [Function],
+ "modify": [Function],
+ "optimisticData": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": [Circular],
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "reset": [Function],
+ "storeReader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ "storeWriter": StoreWriter {
+ "cache": [Circular],
+ "reader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ },
+ "txCount": 0,
+ "typenameDocumentCache": Map {},
+ "watches": Set {
+ Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": QueryInfo {
+ "cache": [Circular],
+ "cancel": [Function],
+ "dirty": false,
+ "document": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "graphQLErrors": Array [],
+ "lastDiff": Object {
+ "diff": Object {
+ "complete": false,
+ "missing": Array [
+ MissingFieldError {
+ "message": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ "path": Object {
+ "recaptchaV3Config": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ },
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ ],
+ "result": Object {},
+ },
+ "options": Object {
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ },
+ },
+ "lastRequestId": 1,
+ "lastWatch": [Circular],
+ "listeners": Set {
+ [Function],
+ },
+ "networkError": null,
+ "networkStatus": 1,
+ "observableQuery": ObservableQuery {
+ "_subscriber": [Function],
+ "concast": Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ "initialFetchPolicy": "cache-and-network",
+ "isTornDown": false,
+ "last": Object {
+ "result": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ "variables": Object {},
+ },
+ "observer": Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": undefined,
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": Array [
+ Object {
+ "type": "next",
+ "value": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ },
+ ],
+ "_state": "buffering",
+ },
+ },
+ },
+ "options": Object {
+ "fetchPolicy": "cache-and-network",
+ "notifyOnNetworkStatusChange": false,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ "queryId": "1",
+ "queryInfo": [Circular],
+ "queryManager": QueryManager {
+ "assumeImmutableResults": false,
+ "cache": [Circular],
+ "clientAwareness": Object {
+ "name": undefined,
+ "version": undefined,
+ },
+ "fetchCancelFns": Map {
+ "1" => [Function],
+ },
+ "inFlightLinkObservables": Map {
+ Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ } => Map {
+ "{}" => Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ },
+ "link": MockLink {
+ "addTypename": false,
+ "mockedResponsesByKey": Object {
+ "{\\"query\\":\\"mutation MergeCartsAfterSignIn($sourceCartId: String!, $destinationCartId: String!) {\\\\n mergeCarts(\\\\n source_cart_id: $sourceCartId\\\\n destination_cart_id: $destinationCartId\\\\n ) {\\\\n id\\\\n items {\\\\n uid\\\\n }\\\\n ...CheckoutPageFragment\\\\n }\\\\n}\\\\n\\\\nfragment CheckoutPageFragment on Cart {\\\\n id\\\\n items {\\\\n uid\\\\n product {\\\\n uid\\\\n stock_status\\\\n }\\\\n }\\\\n total_quantity\\\\n available_payment_methods {\\\\n code\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "MergeCartsAfterSignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "source_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "destination_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "mergeCarts",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentSpread",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "product",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "stock_status",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "total_quantity",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "available_payment_methods",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "code",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "typeCondition": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "Cart",
+ },
+ },
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 932,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "destinationCartId": "new-cart-id",
+ "sourceCartId": "old-cart-id",
+ },
+ },
+ "result": Object {
+ "data": null,
+ },
+ },
+ ],
+ "{\\"query\\":\\"mutation SignIn($email: String!, $password: String!) {\\\\n generateCustomerToken(email: $email, password: $password) {\\\\n token\\\\n customer_token_lifetime\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "SignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "generateCustomerToken",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "token",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "customer_token_lifetime",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 198,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "email": "fry@planetexpress.com",
+ "password": "slurm is the best",
+ },
+ },
+ "result": Object {
+ "data": Object {
+ "generateCustomerToken": Object {
+ "customer_token_lifetime": 3600,
+ "token": "auth-token-123",
+ },
+ },
+ },
+ },
+ ],
+ },
+ "operation": Object {
+ "extensions": Object {},
+ "operationName": "GetReCaptchaV3Config",
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ },
+ "localState": [Circular],
+ "mutationIdCounter": 1,
+ "mutationStore": Object {},
+ "onBroadcast": [Function],
+ "queries": Map {
+ "1" => [Circular],
+ },
+ "queryDeduplication": true,
+ "queryIdCounter": 2,
+ "requestIdCounter": 2,
+ "ssrMode": false,
+ "transformCache": WeakMap {},
+ },
+ "queryName": "GetReCaptchaV3Config",
+ "subscriptions": Set {},
+ },
+ "oqListener": [Function],
+ "queryId": "1",
+ "stopped": false,
+ "subscriptions": Set {},
+ "variables": Object {},
+ },
+ },
+ },
+ },
+ "client": [Circular],
+ },
+ "mutate": [Function],
+ "query": [Function],
+ "queryDeduplication": true,
+ "queryManager": QueryManager {
+ "assumeImmutableResults": false,
+ "cache": InMemoryCache {
+ "addTypename": false,
+ "config": Object {
+ "addTypename": false,
+ "canonizeResults": false,
+ "dataIdFromObject": [Function],
+ "resultCaching": true,
+ },
+ "data": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": [Circular],
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "toReference": [Function],
+ },
+ "evict": [Function],
+ "getFragmentDoc": [Function],
+ "makeVar": [Function],
+ "maybeBroadcastWatch": [Function],
+ "modify": [Function],
+ "optimisticData": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": [Circular],
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "reset": [Function],
+ "storeReader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ "storeWriter": StoreWriter {
+ "cache": [Circular],
+ "reader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ },
+ "txCount": 0,
+ "typenameDocumentCache": Map {},
+ "watches": Set {
+ Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": QueryInfo {
+ "cache": [Circular],
+ "cancel": [Function],
+ "dirty": false,
+ "document": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "graphQLErrors": Array [],
+ "lastDiff": Object {
+ "diff": Object {
+ "complete": false,
+ "missing": Array [
+ MissingFieldError {
+ "message": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ "path": Object {
+ "recaptchaV3Config": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ },
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ ],
+ "result": Object {},
+ },
+ "options": Object {
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ },
+ },
+ "lastRequestId": 1,
+ "lastWatch": [Circular],
+ "listeners": Set {
+ [Function],
+ },
+ "networkError": null,
+ "networkStatus": 1,
+ "observableQuery": ObservableQuery {
+ "_subscriber": [Function],
+ "concast": Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ "initialFetchPolicy": "cache-and-network",
+ "isTornDown": false,
+ "last": Object {
+ "result": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ "variables": Object {},
+ },
+ "observer": Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": undefined,
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": Array [
+ Object {
+ "type": "next",
+ "value": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ },
+ ],
+ "_state": "buffering",
+ },
+ },
+ },
+ "options": Object {
+ "fetchPolicy": "cache-and-network",
+ "notifyOnNetworkStatusChange": false,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ "queryId": "1",
+ "queryInfo": [Circular],
+ "queryManager": [Circular],
+ "queryName": "GetReCaptchaV3Config",
+ "subscriptions": Set {},
+ },
+ "oqListener": [Function],
+ "queryId": "1",
+ "stopped": false,
+ "subscriptions": Set {},
+ "variables": Object {},
+ },
+ },
+ },
+ },
+ "clientAwareness": Object {
+ "name": undefined,
+ "version": undefined,
+ },
+ "fetchCancelFns": Map {
+ "1" => [Function],
+ },
+ "inFlightLinkObservables": Map {
+ Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ } => Map {
+ "{}" => Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ },
+ },
+ "link": MockLink {
+ "addTypename": false,
+ "mockedResponsesByKey": Object {
+ "{\\"query\\":\\"mutation MergeCartsAfterSignIn($sourceCartId: String!, $destinationCartId: String!) {\\\\n mergeCarts(\\\\n source_cart_id: $sourceCartId\\\\n destination_cart_id: $destinationCartId\\\\n ) {\\\\n id\\\\n items {\\\\n uid\\\\n }\\\\n ...CheckoutPageFragment\\\\n }\\\\n}\\\\n\\\\nfragment CheckoutPageFragment on Cart {\\\\n id\\\\n items {\\\\n uid\\\\n product {\\\\n uid\\\\n stock_status\\\\n }\\\\n }\\\\n total_quantity\\\\n available_payment_methods {\\\\n code\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "MergeCartsAfterSignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "source_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "destination_cart_id",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "mergeCarts",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentSpread",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "sourceCartId",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "destinationCartId",
+ },
+ },
+ },
+ ],
+ },
+ Object {
+ "directives": Array [],
+ "kind": "FragmentDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "CheckoutPageFragment",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "id",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "items",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "product",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "uid",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "stock_status",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "total_quantity",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "available_payment_methods",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "code",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "typeCondition": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "Cart",
+ },
+ },
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 932,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "destinationCartId": "new-cart-id",
+ "sourceCartId": "old-cart-id",
+ },
+ },
+ "result": Object {
+ "data": null,
+ },
+ },
+ ],
+ "{\\"query\\":\\"mutation SignIn($email: String!, $password: String!) {\\\\n generateCustomerToken(email: $email, password: $password) {\\\\n token\\\\n customer_token_lifetime\\\\n }\\\\n}\\\\n\\"}": Array [
+ Object {
+ "request": Object {
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "SignIn",
+ },
+ "operation": "mutation",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "kind": "Argument",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ "value": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "generateCustomerToken",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "token",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "customer_token_lifetime",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "email",
+ },
+ },
+ },
+ Object {
+ "defaultValue": undefined,
+ "directives": Array [],
+ "kind": "VariableDefinition",
+ "type": Object {
+ "kind": "NonNullType",
+ "type": Object {
+ "kind": "NamedType",
+ "name": Object {
+ "kind": "Name",
+ "value": "String",
+ },
+ },
+ },
+ "variable": Object {
+ "kind": "Variable",
+ "name": Object {
+ "kind": "Name",
+ "value": "password",
+ },
+ },
+ },
+ ],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 198,
+ "start": 0,
+ },
+ },
+ "variables": Object {
+ "email": "fry@planetexpress.com",
+ "password": "slurm is the best",
+ },
+ },
+ "result": Object {
+ "data": Object {
+ "generateCustomerToken": Object {
+ "customer_token_lifetime": 3600,
+ "token": "auth-token-123",
+ },
+ },
+ },
+ },
+ ],
+ },
+ "operation": Object {
+ "extensions": Object {},
+ "operationName": "GetReCaptchaV3Config",
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ },
+ "localState": LocalState {
+ "cache": InMemoryCache {
+ "addTypename": false,
+ "config": Object {
+ "addTypename": false,
+ "canonizeResults": false,
+ "dataIdFromObject": [Function],
+ "resultCaching": true,
+ },
+ "data": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": [Circular],
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "toReference": [Function],
+ },
+ "evict": [Function],
+ "getFragmentDoc": [Function],
+ "makeVar": [Function],
+ "maybeBroadcastWatch": [Function],
+ "modify": [Function],
+ "optimisticData": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": [Circular],
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "reset": [Function],
+ "storeReader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ "storeWriter": StoreWriter {
+ "cache": [Circular],
+ "reader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ },
+ "txCount": 0,
+ "typenameDocumentCache": Map {},
+ "watches": Set {
+ Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": QueryInfo {
+ "cache": [Circular],
+ "cancel": [Function],
+ "dirty": false,
+ "document": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "graphQLErrors": Array [],
+ "lastDiff": Object {
+ "diff": Object {
+ "complete": false,
+ "missing": Array [
+ MissingFieldError {
+ "message": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ "path": Object {
+ "recaptchaV3Config": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ },
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ ],
+ "result": Object {},
+ },
+ "options": Object {
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ },
+ },
+ "lastRequestId": 1,
+ "lastWatch": [Circular],
+ "listeners": Set {
+ [Function],
+ },
+ "networkError": null,
+ "networkStatus": 1,
+ "observableQuery": ObservableQuery {
+ "_subscriber": [Function],
+ "concast": Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ "initialFetchPolicy": "cache-and-network",
+ "isTornDown": false,
+ "last": Object {
+ "result": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ "variables": Object {},
+ },
+ "observer": Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": undefined,
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": Array [
+ Object {
+ "type": "next",
+ "value": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ },
+ ],
+ "_state": "buffering",
+ },
+ },
+ },
+ "options": Object {
+ "fetchPolicy": "cache-and-network",
+ "notifyOnNetworkStatusChange": false,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ "queryId": "1",
+ "queryInfo": [Circular],
+ "queryManager": [Circular],
+ "queryName": "GetReCaptchaV3Config",
+ "subscriptions": Set {},
+ },
+ "oqListener": [Function],
+ "queryId": "1",
+ "stopped": false,
+ "subscriptions": Set {},
+ "variables": Object {},
+ },
+ },
+ },
+ },
+ "client": [Circular],
+ },
+ "mutationIdCounter": 1,
+ "mutationStore": Object {},
+ "onBroadcast": [Function],
+ "queries": Map {
+ "1" => QueryInfo {
+ "cache": InMemoryCache {
+ "addTypename": false,
+ "config": Object {
+ "addTypename": false,
+ "canonizeResults": false,
+ "dataIdFromObject": [Function],
+ "resultCaching": true,
+ },
+ "data": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": [Circular],
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "toReference": [Function],
+ },
+ "evict": [Function],
+ "getFragmentDoc": [Function],
+ "makeVar": [Function],
+ "maybeBroadcastWatch": [Function],
+ "modify": [Function],
+ "optimisticData": Stump {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ "parent": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ },
+ "id": "EntityStore.Stump",
+ "parent": Root {
+ "canRead": [Function],
+ "data": Object {},
+ "getFieldValue": [Function],
+ "group": CacheGroup {
+ "caching": true,
+ "d": [Function],
+ "keyMaker": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "parent": null,
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "rootIds": Object {},
+ "storageTrie": Trie {
+ "makeData": [Function],
+ "weakness": true,
+ },
+ "stump": [Circular],
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "refs": Object {},
+ "replay": [Function],
+ "rootIds": Object {},
+ "toReference": [Function],
+ },
+ "policies": Policies {
+ "cache": [Circular],
+ "config": Object {
+ "cache": [Circular],
+ "dataIdFromObject": [Function],
+ "possibleTypes": undefined,
+ "typePolicies": undefined,
+ },
+ "fuzzySubtypes": Map {},
+ "rootIdsByTypename": Object {
+ "Mutation": "ROOT_MUTATION",
+ "Query": "ROOT_QUERY",
+ "Subscription": "ROOT_SUBSCRIPTION",
+ },
+ "rootTypenamesById": Object {
+ "ROOT_MUTATION": "Mutation",
+ "ROOT_QUERY": "Query",
+ "ROOT_SUBSCRIPTION": "Subscription",
+ },
+ "supertypeMap": Map {},
+ "toBeAdded": Object {},
+ "typePolicies": Object {
+ "Query": Object {
+ "fields": Object {},
+ },
+ },
+ "usingPossibleTypes": false,
+ },
+ "reset": [Function],
+ "storeReader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ "storeWriter": StoreWriter {
+ "cache": [Circular],
+ "reader": StoreReader {
+ "canon": ObjectCanon {
+ "empty": Object {},
+ "keysByJSON": Map {
+ "[]" => Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "known": WeakSet {},
+ "passes": WeakMap {},
+ "pool": Trie {
+ "data": Object {
+ "keys": Object {
+ "json": "[]",
+ "sorted": Array [],
+ },
+ },
+ "makeData": [Function],
+ "weak": WeakMap {},
+ "weakness": true,
+ },
+ },
+ "config": Object {
+ "addTypename": false,
+ "cache": [Circular],
+ "canonizeResults": false,
+ },
+ "executeSelectionSet": [Function],
+ "executeSubSelectedArray": [Function],
+ "knownResults": WeakMap {},
+ },
+ },
+ "txCount": 0,
+ "typenameDocumentCache": Map {},
+ "watches": Set {
+ Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": [Circular],
+ },
+ },
+ },
+ "cancel": [Function],
+ "dirty": false,
+ "document": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "graphQLErrors": Array [],
+ "lastDiff": Object {
+ "diff": Object {
+ "complete": false,
+ "missing": Array [
+ MissingFieldError {
+ "message": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ "path": Object {
+ "recaptchaV3Config": "Can't find field 'recaptchaV3Config' on ROOT_QUERY object",
+ },
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ ],
+ "result": Object {},
+ },
+ "options": Object {
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ },
+ },
+ "lastRequestId": 1,
+ "lastWatch": Object {
+ "callback": [Function],
+ "canonizeResults": undefined,
+ "optimistic": true,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "returnPartialData": true,
+ "variables": Object {},
+ "watcher": [Circular],
+ },
+ "listeners": Set {
+ [Function],
+ },
+ "networkError": null,
+ "networkStatus": 1,
+ "observableQuery": ObservableQuery {
+ "_subscriber": [Function],
+ "concast": Concast {
+ "_subscriber": [Function],
+ "addCount": 1,
+ "cancel": [Function],
+ "handlers": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ },
+ "promise": Promise {},
+ "reject": [Function],
+ "resolve": [Function],
+ "sources": Array [],
+ "sub": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": [Function],
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": undefined,
+ "_state": "ready",
+ },
+ },
+ "initialFetchPolicy": "cache-and-network",
+ "isTornDown": false,
+ "last": Object {
+ "result": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ "variables": Object {},
+ },
+ "observer": Object {
+ "error": [Function],
+ "next": [Function],
+ },
+ "observers": Set {
+ SubscriptionObserver {
+ "_subscription": Subscription {
+ "_cleanup": [Function],
+ "_observer": Object {
+ "complete": undefined,
+ "error": [Function],
+ "next": [Function],
+ },
+ "_queue": Array [
+ Object {
+ "type": "next",
+ "value": Object {
+ "loading": true,
+ "networkStatus": 1,
+ "partial": true,
+ },
+ },
+ ],
+ "_state": "buffering",
+ },
+ },
+ },
+ "options": Object {
+ "fetchPolicy": "cache-and-network",
+ "notifyOnNetworkStatusChange": false,
+ "query": Object {
+ "definitions": Array [
+ Object {
+ "directives": Array [],
+ "kind": "OperationDefinition",
+ "name": Object {
+ "kind": "Name",
+ "value": "GetReCaptchaV3Config",
+ },
+ "operation": "query",
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "recaptchaV3Config",
+ },
+ "selectionSet": Object {
+ "kind": "SelectionSet",
+ "selections": Array [
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "website_key",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "badge_position",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "language_code",
+ },
+ "selectionSet": undefined,
+ },
+ Object {
+ "alias": undefined,
+ "arguments": Array [],
+ "directives": Array [],
+ "kind": "Field",
+ "name": Object {
+ "kind": "Name",
+ "value": "forms",
+ },
+ "selectionSet": undefined,
+ },
+ ],
+ },
+ },
+ ],
+ },
+ "variableDefinitions": Array [],
+ },
+ ],
+ "kind": "Document",
+ "loc": Object {
+ "end": 173,
+ "start": 0,
+ },
+ },
+ "variables": Object {},
+ },
+ "queryId": "1",
+ "queryInfo": [Circular],
+ "queryManager": [Circular],
+ "queryName": "GetReCaptchaV3Config",
+ "subscriptions": Set {},
+ },
+ "oqListener": [Function],
+ "queryId": "1",
+ "stopped": false,
+ "subscriptions": Set {},
+ "variables": Object {},
+ },
+ },
+ "queryDeduplication": true,
+ "queryIdCounter": 2,
+ "requestIdCounter": 2,
+ "ssrMode": false,
+ "transformCache": WeakMap {},
+ },
+ "reFetchObservableQueries": [Function],
+ "resetStore": [Function],
+ "resetStoreCallbacks": Array [],
+ "typeDefs": undefined,
+ "version": "3.5.10",
+ "watchQuery": [Function],
+ },
+ "loading": false,
+ "reset": [Function],
+ },
+ ],
+ "signinHandleEnterKeyPress": [Function],
+ "userContext": Array [
+ Object {
+ "getDetailsError": "getDetails error from redux",
+ "isGettingDetails": false,
+ },
+ Object {
+ "getUserDetails": [MockFunction],
+ "setToken": [MockFunction],
+ },
+ ],
+ }
+ `);
});
test('handleSubmit triggers waterfall of operations and actions', async () => {
- const token = 'customertoken';
- const customer_token_lifetime = 1;
- const signIn = jest.fn().mockReturnValue({
+ useAwaitQuery.mockReturnValueOnce(() => ({
data: {
- generateCustomerToken: {
- token
+ customer: {
+ email: 'john@fake.email'
}
}
- });
- signInMutationFn.mockReturnValueOnce([signIn, { error: null }]);
- const setToken = jest.fn();
- useUserContext.mockReturnValueOnce([
- { isGettingDetails: false },
- { getUserDetails: jest.fn(), setToken }
- ]);
-
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
-
- await talonProps.handleSubmit(signInVariables);
- expect(signIn).toHaveBeenCalledWith({
- variables: {
- email: signInVariables.email,
- password: signInVariables.password
+ }));
+
+ const [, { getCartDetails }] = useCartContext();
+ const [, { getUserDetails, setToken }] = useUserContext();
+ const [, { dispatch }] = useEventingContext();
+
+ const { result } = renderHookWithProviders();
+
+ await act(() => result.current.handleSubmit(signInVariables));
+
+ expect(result.current.isBusy).toBe(true);
+ expect(setToken).toHaveBeenCalledWith(authToken, customerTokenLifetime);
+ expect(getCartDetails).toHaveBeenCalled();
+ expect(getUserDetails).toHaveBeenCalled();
+
+ expect(dispatch).toHaveBeenCalledTimes(1);
+ expect(dispatch.mock.calls[0][0]).toMatchInlineSnapshot(`
+ Object {
+ "payload": Object {
+ "email": "john@fake.email",
+ },
+ "type": "USER_SIGN_IN",
}
- });
- expect(setToken).toHaveBeenCalledWith(token, customer_token_lifetime);
+ `);
});
test('handleSubmit exception is logged and resets state', async () => {
- const fetchUserDetails = jest.fn();
- customerQueryFn.mockReturnValueOnce(fetchUserDetails);
- const getUserDetails = jest.fn();
- useUserContext.mockReturnValueOnce([
- { isGettingDetails: false },
- { getUserDetails: jest.fn(), setToken: jest.fn() }
- ]);
+ const errorMessage = 'Oh no! Something went wrong :(';
+ const [, { getUserDetails, setToken }] = useUserContext();
+ setToken.mockRejectedValue(errorMessage);
+ jest.spyOn(console, 'error');
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+ const { result } = renderHookWithProviders();
- expect(talonProps.isBusy).toBeFalsy();
+ await act(() => result.current.handleSubmit(signInVariables));
+
+ expect(result.current.isBusy).toBe(false);
expect(getUserDetails).not.toHaveBeenCalled();
+ expect(console.error).toHaveBeenCalledWith(errorMessage);
});
-test('handleForgotPassword triggers callbacks', async () => {
- const setDefaultUsername = jest.fn();
- const showForgotPassword = jest.fn();
- const { talonProps } = getTalonProps({
- ...defaultProps,
- setDefaultUsername,
- showForgotPassword
- });
+test('handleForgotPassword triggers callbacks', () => {
const mockUsername = 'fry@planetexpress.com';
const mockApi = {
getValue: jest.fn().mockReturnValue(mockUsername)
};
- await talonProps.setFormApi(mockApi);
- await talonProps.handleForgotPassword();
- expect(setDefaultUsername).toHaveBeenCalledWith(mockUsername);
- expect(showForgotPassword).toHaveBeenCalled();
+
+ const { result } = renderHookWithProviders();
+ act(() => result.current.setFormApi(mockApi));
+ act(() => result.current.handleForgotPassword());
+
+ expect(initialProps.setDefaultUsername).toHaveBeenCalledWith(mockUsername);
+ expect(initialProps.showForgotPassword).toHaveBeenCalled();
});
-test('handleCreateAccount triggers callbacks', async () => {
- const setDefaultUsername = jest.fn();
- const showCreateAccount = jest.fn();
- const { talonProps } = getTalonProps({
- ...defaultProps,
- setDefaultUsername,
- showCreateAccount
- });
+test('handleCreateAccount triggers callbacks', () => {
const mockUsername = 'fry@planetexpress.com';
const mockApi = {
getValue: jest.fn().mockReturnValue(mockUsername)
};
- await talonProps.setFormApi(mockApi);
- await talonProps.handleCreateAccount();
- expect(setDefaultUsername).toHaveBeenCalledWith(mockUsername);
- expect(showCreateAccount).toHaveBeenCalled();
+
+ const { result } = renderHookWithProviders();
+ act(() => result.current.setFormApi(mockApi));
+ act(() => result.current.handleCreateAccount());
+
+ expect(initialProps.setDefaultUsername).toHaveBeenCalledWith(mockUsername);
+ expect(initialProps.showCreateAccount).toHaveBeenCalled();
});
test('mutation error is returned by talon', async () => {
- const getUserDetailsQuery = jest.fn();
- getUserDetailsQuery.mockReturnValueOnce([
- jest.fn(),
- { error: 'getDetails error from redux' }
- ]);
- signInMutationFn.mockReturnValueOnce([
- jest.fn(),
- { error: 'Sign In Mutation Error' }
- ]);
-
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
-
- await talonProps.handleSubmit(signInVariables);
- expect(talonProps.errors).toMatchSnapshot();
+ const signInErrorMock = {
+ request: signInMock.request,
+ error: new Error('Uh oh! There was an error signing in :(')
+ };
+
+ const { result } = renderHookWithProviders({ mocks: [signInErrorMock] });
+ await act(() => result.current.handleSubmit(signInVariables));
+
+ expect(result.current.errors.get('signInMutation')).toMatchInlineSnapshot(
+ `[Error: Uh oh! There was an error signing in :(]`
+ );
});
it('should call handleForgotPassword when Enter key is pressed', () => {
- const { talonProps } = getTalonProps({
- ...defaultProps
- });
+ const { result } = renderHookWithProviders();
+ const { forgotPasswordHandleEnterKeyPress } = result.current;
+ const enterKeyEvent = { key: 'Enter' };
+ renderHook(() => forgotPasswordHandleEnterKeyPress(enterKeyEvent));
+});
+
+it('should call handleEnterKeyPress when Enter key is pressed', () => {
+ const { result } = renderHookWithProviders();
+ const { handleEnterKeyPress } = result.current;
const enterKeyEvent = { key: 'Enter' };
- talonProps.forgotPasswordHandleEnterKeyPress(enterKeyEvent);
+ renderHook(() => handleEnterKeyPress(enterKeyEvent));
});
diff --git a/packages/peregrine/lib/talons/SignIn/signIn.gql.js b/packages/peregrine/lib/talons/SignIn/signIn.gql.js
index 0c91e813b0..b960c3452e 100644
--- a/packages/peregrine/lib/talons/SignIn/signIn.gql.js
+++ b/packages/peregrine/lib/talons/SignIn/signIn.gql.js
@@ -1,6 +1,5 @@
import { gql } from '@apollo/client';
import { CheckoutPageFragment } from '../CheckoutPage/checkoutPageFragments.gql';
-import { GET_STORE_CONFIG_DATA } from '../CreateAccount/createAccount.gql';
export const GET_CUSTOMER = gql`
query GetCustomerAfterSignIn {
@@ -18,6 +17,7 @@ export const SIGN_IN = gql`
mutation SignIn($email: String!, $password: String!) {
generateCustomerToken(email: $email, password: $password) {
token
+ customer_token_lifetime
}
}
`;
@@ -52,6 +52,5 @@ export default {
createCartMutation: CREATE_CART,
getCustomerQuery: GET_CUSTOMER,
mergeCartsMutation: MERGE_CARTS,
- signInMutation: SIGN_IN,
- getStoreConfigQuery: GET_STORE_CONFIG_DATA
+ signInMutation: SIGN_IN
};
diff --git a/packages/peregrine/lib/talons/SignIn/useSignIn.js b/packages/peregrine/lib/talons/SignIn/useSignIn.js
index 34fb99f043..afedbcc05a 100644
--- a/packages/peregrine/lib/talons/SignIn/useSignIn.js
+++ b/packages/peregrine/lib/talons/SignIn/useSignIn.js
@@ -1,5 +1,5 @@
import { useCallback, useRef, useState, useMemo } from 'react';
-import { useApolloClient, useMutation, useQuery } from '@apollo/client';
+import { useApolloClient, useMutation } from '@apollo/client';
import { useGoogleReCaptcha } from '../../hooks/useGoogleReCaptcha/useGoogleReCaptcha';
import mergeOperations from '../../util/shallowMerge';
@@ -25,8 +25,7 @@ export const useSignIn = props => {
createCartMutation,
getCustomerQuery,
mergeCartsMutation,
- signInMutation,
- getStoreConfigQuery
+ signInMutation
} = operations;
const apolloClient = useApolloClient();
@@ -62,19 +61,6 @@ export const useSignIn = props => {
recaptchaWidgetProps
} = googleReCaptcha;
- const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
- fetchPolicy: 'cache-and-network',
- nextFetchPolicy: 'cache-first'
- });
-
- const { customerAccessTokenLifetime } = useMemo(() => {
- const storeConfig = storeConfigData?.storeConfig || {};
-
- return {
- customerAccessTokenLifetime:
- storeConfig.customer_access_token_lifetime
- };
- }, [storeConfigData]);
const [fetchCartId] = useMutation(createCartMutation);
const [mergeCarts] = useMutation(mergeCartsMutation);
const fetchUserDetails = useAwaitQuery(getCustomerQuery);
@@ -105,8 +91,12 @@ export const useSignIn = props => {
});
const token = signInResponse.data.generateCustomerToken.token;
- await (customerAccessTokenLifetime
- ? setToken(token, customerAccessTokenLifetime)
+ const customerTokenLifetime =
+ signInResponse.data.generateCustomerToken
+ .customer_token_lifetime;
+
+ await (customerTokenLifetime
+ ? setToken(token, customerTokenLifetime)
: setToken(token));
// Clear all cart/customer data from cache and redux.
@@ -153,7 +143,6 @@ export const useSignIn = props => {
}
},
[
- customerAccessTokenLifetime,
cartId,
generateReCaptchaData,
signIn,
diff --git a/packages/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js b/packages/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js
index 4256fccd6d..ef56003fa5 100644
--- a/packages/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js
+++ b/packages/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js
@@ -65,8 +65,7 @@ const CreateAccount = props => {
handleSubmit,
isDisabled,
initialValues,
- recaptchaWidgetProps,
- minimumPasswordLength
+ recaptchaWidgetProps
} = talonProps;
return (
@@ -156,7 +155,7 @@ const CreateAccount = props => {
data-cy="OrderConfirmationPage-CreateAccount-password"
validate={combine([
isRequired,
- [hasLengthAtLeast, minimumPasswordLength],
+ [hasLengthAtLeast, 8],
validatePassword
])}
validateOnBlur
diff --git a/packages/venia-ui/lib/components/CreateAccount/__tests__/createAccount.spec.js b/packages/venia-ui/lib/components/CreateAccount/__tests__/createAccount.spec.js
index c174a60ae3..ad84b877d1 100644
--- a/packages/venia-ui/lib/components/CreateAccount/__tests__/createAccount.spec.js
+++ b/packages/venia-ui/lib/components/CreateAccount/__tests__/createAccount.spec.js
@@ -14,11 +14,7 @@ jest.mock('@apollo/client', () => ({
}
]),
useQuery: jest.fn().mockImplementation(() => ({
- data: {
- storeConfig: {
- minimum_password_length: 8 // or whatever value is expected
- }
- },
+ data: {},
loading: false,
error: null
}))
diff --git a/packages/venia-ui/lib/components/CreateAccount/createAccount.js b/packages/venia-ui/lib/components/CreateAccount/createAccount.js
index 84ababb1fe..31fa9a17a1 100644
--- a/packages/venia-ui/lib/components/CreateAccount/createAccount.js
+++ b/packages/venia-ui/lib/components/CreateAccount/createAccount.js
@@ -35,10 +35,8 @@ const CreateAccount = props => {
handleCancelKeyPress,
isDisabled,
initialValues,
- recaptchaWidgetProps,
- minimumPasswordLength
+ recaptchaWidgetProps
} = talonProps;
- console.log('minimumPasswordLength==', minimumPasswordLength);
const { formatMessage } = useIntl();
const classes = useStyle(defaultClasses, props.classes);
@@ -166,7 +164,7 @@ const CreateAccount = props => {
})}
validate={combine([
isRequired,
- [hasLengthAtLeast, minimumPasswordLength],
+ [hasLengthAtLeast, 8],
validatePassword
])}
validateOnBlur