@ -23,7 +23,7 @@ import { loggerLink } from '../utils';
|
||||
const logger = loggerLink(() => 'Twenty');
|
||||
|
||||
export interface Options<TCacheShape> extends ApolloClientOptions<TCacheShape> {
|
||||
onError?: (err: GraphQLFormattedError | undefined) => void;
|
||||
onError?: (err: readonly GraphQLFormattedError[] | undefined) => void;
|
||||
onNetworkError?: (err: Error | ServerParseError | ServerError) => void;
|
||||
onTokenPairChange?: (tokenPair: AuthTokenPair) => void;
|
||||
onUnauthenticatedError?: () => void;
|
||||
@ -80,9 +80,8 @@ export class ApolloFactory<TCacheShape> implements ApolloManager<TCacheShape> {
|
||||
const errorLink = onError(
|
||||
({ graphQLErrors, networkError, forward, operation }) => {
|
||||
if (isDefined(graphQLErrors)) {
|
||||
onErrorCb?.(graphQLErrors);
|
||||
for (const graphQLError of graphQLErrors) {
|
||||
onErrorCb?.(graphQLError);
|
||||
|
||||
if (graphQLError.message === 'Unauthorized') {
|
||||
return fromPromise(
|
||||
renewToken(uri, this.tokenPair)
|
||||
|
||||
@ -11,7 +11,7 @@ import { useIsFieldReadOnly } from '@/object-record/record-field/hooks/useIsFiel
|
||||
import { FieldDefinition } from '@/object-record/record-field/types/FieldDefinition';
|
||||
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
|
||||
|
||||
const entityId = 'entityId';
|
||||
const recordId = 'recordId';
|
||||
|
||||
const getWrapper =
|
||||
(fieldDefinition: FieldDefinition<FieldMetadata>) =>
|
||||
@ -19,7 +19,7 @@ const getWrapper =
|
||||
<FieldContext.Provider
|
||||
value={{
|
||||
fieldDefinition,
|
||||
entityId,
|
||||
recordId,
|
||||
hotkeyScope: 'hotkeyScope',
|
||||
isLabelIdentifier: false,
|
||||
}}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ReactNode, useContext } from 'react';
|
||||
import { styled } from '@linaria/react';
|
||||
import { ReactNode, useContext } from 'react';
|
||||
import { BORDER_COMMON, ThemeContext } from 'twenty-ui';
|
||||
|
||||
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
|
||||
@ -79,7 +79,7 @@ export const RecordTableCellBaseContainer = ({
|
||||
|
||||
const { hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
const editHotkeyScope = { scope: hotkeyScope } ?? DEFAULT_CELL_SCOPE;
|
||||
const editHotkeyScope = { scope: hotkeyScope ?? DEFAULT_CELL_SCOPE };
|
||||
|
||||
return (
|
||||
<CellHotkeyScopeContext.Provider value={editHotkeyScope}>
|
||||
|
||||
@ -7918,7 +7918,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "fieldEdge",
|
||||
"node": {
|
||||
"__typename": "field",
|
||||
"id": "af19a3ba-b725-4b9d-a0b7-8bf6b04fadbf",
|
||||
"id": "5dcef112-ce1b-46c1-a33a-4d1394628c34",
|
||||
"type": "DATE_TIME",
|
||||
"name": "updatedAt",
|
||||
"label": "Update date",
|
||||
@ -7941,7 +7941,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "fieldEdge",
|
||||
"node": {
|
||||
"__typename": "field",
|
||||
"id": "af19a3ba-b725-4b9d-a0b7-8bf6b04fadds",
|
||||
"id": "277d8939-1ead-4cdb-a560-854644219779",
|
||||
"type": "MULTI_SELECT",
|
||||
"name": "testMultiSelect",
|
||||
"label": "Test Multi Select",
|
||||
@ -7964,7 +7964,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "fieldEdge",
|
||||
"node": {
|
||||
"__typename": "field",
|
||||
"id": "tt929592-4f74-419e-8b26-6d216859078f",
|
||||
"id": "f207dd14-f05e-4f29-b222-8993d4680f31",
|
||||
"type": "RAW_JSON",
|
||||
"name": "testRawJson",
|
||||
"label": "Test Raw Json",
|
||||
@ -7987,7 +7987,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
|
||||
"__typename": "fieldEdge",
|
||||
"node": {
|
||||
"__typename": "field",
|
||||
"id": "vv929592-4f74-419e-8b26-6d216859078f",
|
||||
"id": "81db846a-a2f9-4b31-8931-81fac5cdd1b6",
|
||||
"type": "RATING",
|
||||
"name": "testRating",
|
||||
"label": "Rating",
|
||||
|
||||
@ -266,7 +266,7 @@ const customObjectMetadataItemEdge: ObjectEdge = {
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
id: '6f6e1421-8a42-4d4a-bf76-465b5f84b6d2',
|
||||
value: 'HIGH',
|
||||
label: 'High',
|
||||
color: 'red',
|
||||
|
||||
Reference in New Issue
Block a user