@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user