removed @blocknote/core from dependencies (#6580)

Fixes #6564  & #6561 

@FelixMalfait 

Removed @blocknote/core from dependencies



https://github.com/user-attachments/assets/ef6acfff-2945-4062-a35c-21dd108a4345

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
nitin
2024-08-08 19:14:09 +05:30
committed by GitHub
parent c3bf94e4cc
commit 774cb554f4
21 changed files with 8366 additions and 10067 deletions

View File

@ -6,7 +6,6 @@ import {
ServerError,
ServerParseError,
} from '@apollo/client';
import { GraphQLErrors } from '@apollo/client/errors';
import { setContext } from '@apollo/client/link/context';
import { onError } from '@apollo/client/link/error';
import { RetryLink } from '@apollo/client/link/retry';
@ -17,13 +16,14 @@ import { AuthTokenPair } from '~/generated/graphql';
import { isDefined } from '~/utils/isDefined';
import { logDebug } from '~/utils/logDebug';
import { GraphQLFormattedError } from 'graphql';
import { ApolloManager } from '../types/apolloManager.interface';
import { loggerLink } from '../utils';
const logger = loggerLink(() => 'Twenty');
export interface Options<TCacheShape> extends ApolloClientOptions<TCacheShape> {
onError?: (err: GraphQLErrors | undefined) => void;
onError?: (err: GraphQLFormattedError | undefined) => void;
onNetworkError?: (err: Error | ServerParseError | ServerError) => void;
onTokenPairChange?: (tokenPair: AuthTokenPair) => void;
onUnauthenticatedError?: () => void;
@ -80,9 +80,9 @@ 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)