feat: schema version header check (#4563)
closes https://github.com/twentyhq/twenty/issues/4479 tried to catch the error inside various places including https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/exception-handler/exception-handler.service.ts but it seems like the error never reaches the GraphQL module 😮 any idea where we could intercept such an error `Cannot query field`? --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -39,6 +39,23 @@ export type ApiKeyToken = {
|
||||
token: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type AppToken = {
|
||||
__typename?: 'AppToken';
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
expiresAt: Scalars['DateTime']['output'];
|
||||
id: Scalars['ID']['output'];
|
||||
type: Scalars['String']['output'];
|
||||
updatedAt: Scalars['DateTime']['output'];
|
||||
};
|
||||
|
||||
export type AppTokenEdge = {
|
||||
__typename?: 'AppTokenEdge';
|
||||
/** Cursor for this node. */
|
||||
cursor: Scalars['ConnectionCursor']['output'];
|
||||
/** The node containing the AppToken */
|
||||
node: AppToken;
|
||||
};
|
||||
|
||||
export type AuthProviders = {
|
||||
__typename?: 'AuthProviders';
|
||||
google: Scalars['Boolean']['output'];
|
||||
@ -63,6 +80,11 @@ export type AuthTokens = {
|
||||
tokens: AuthTokenPair;
|
||||
};
|
||||
|
||||
export type AuthorizeApp = {
|
||||
__typename?: 'AuthorizeApp';
|
||||
redirectUrl: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type Billing = {
|
||||
__typename?: 'Billing';
|
||||
billingFreeTrialDurationInDays?: Maybe<Scalars['Float']['output']>;
|
||||
@ -110,6 +132,10 @@ export type ClientConfig = {
|
||||
telemetry: Telemetry;
|
||||
};
|
||||
|
||||
export type CreateAppTokenInput = {
|
||||
expiresAt: Scalars['DateTime']['input'];
|
||||
};
|
||||
|
||||
export type CreateFieldInput = {
|
||||
defaultValue?: InputMaybe<Scalars['JSON']['input']>;
|
||||
description?: InputMaybe<Scalars['String']['input']>;
|
||||
@ -138,6 +164,11 @@ export type CreateObjectInput = {
|
||||
nameSingular: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type CreateOneAppTokenInput = {
|
||||
/** The record to create */
|
||||
appToken: CreateAppTokenInput;
|
||||
};
|
||||
|
||||
export type CreateOneFieldMetadataInput = {
|
||||
/** The record to create */
|
||||
field: CreateFieldInput;
|
||||
@ -148,20 +179,11 @@ export type CreateOneObjectInput = {
|
||||
object: CreateObjectInput;
|
||||
};
|
||||
|
||||
export type CreateOneRefreshTokenInput = {
|
||||
/** The record to create */
|
||||
refreshToken: CreateRefreshTokenInput;
|
||||
};
|
||||
|
||||
export type CreateOneRelationInput = {
|
||||
/** The record to create */
|
||||
relation: CreateRelationInput;
|
||||
};
|
||||
|
||||
export type CreateRefreshTokenInput = {
|
||||
expiresAt: Scalars['DateTime']['input'];
|
||||
};
|
||||
|
||||
export type CreateRelationInput = {
|
||||
description?: InputMaybe<Scalars['String']['input']>;
|
||||
fromDescription?: InputMaybe<Scalars['String']['input']>;
|
||||
@ -215,6 +237,13 @@ export type EmailPasswordResetLink = {
|
||||
success: Scalars['Boolean']['output'];
|
||||
};
|
||||
|
||||
export type ExchangeAuthCode = {
|
||||
__typename?: 'ExchangeAuthCode';
|
||||
accessToken: AuthToken;
|
||||
loginToken: AuthToken;
|
||||
refreshToken: AuthToken;
|
||||
};
|
||||
|
||||
export type FeatureFlag = {
|
||||
__typename?: 'FeatureFlag';
|
||||
id: Scalars['ID']['output'];
|
||||
@ -338,11 +367,12 @@ export type LoginToken = {
|
||||
export type Mutation = {
|
||||
__typename?: 'Mutation';
|
||||
activateWorkspace: Workspace;
|
||||
authorizeApp: AuthorizeApp;
|
||||
challenge: LoginToken;
|
||||
checkoutSession: SessionEntity;
|
||||
createOneAppToken: AppToken;
|
||||
createOneField: Field;
|
||||
createOneObject: Object;
|
||||
createOneRefreshToken: RefreshToken;
|
||||
createOneRelation: Relation;
|
||||
createOneRemoteServer: RemoteServer;
|
||||
deleteCurrentWorkspace: Workspace;
|
||||
@ -378,6 +408,12 @@ export type MutationActivateWorkspaceArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationAuthorizeAppArgs = {
|
||||
clientId: Scalars['String']['input'];
|
||||
codeChallenge: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationChallengeArgs = {
|
||||
email: Scalars['String']['input'];
|
||||
password: Scalars['String']['input'];
|
||||
@ -390,6 +426,11 @@ export type MutationCheckoutSessionArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateOneAppTokenArgs = {
|
||||
input: CreateOneAppTokenInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateOneFieldArgs = {
|
||||
input: CreateOneFieldMetadataInput;
|
||||
};
|
||||
@ -400,11 +441,6 @@ export type MutationCreateOneObjectArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateOneRefreshTokenArgs = {
|
||||
input: CreateOneRefreshTokenInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateOneRelationArgs = {
|
||||
input: CreateOneRelationInput;
|
||||
};
|
||||
@ -457,7 +493,7 @@ export type MutationImpersonateArgs = {
|
||||
|
||||
|
||||
export type MutationRenewTokenArgs = {
|
||||
refreshToken: Scalars['String']['input'];
|
||||
appToken: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
|
||||
@ -576,6 +612,7 @@ export type Query = {
|
||||
clientConfig: ClientConfig;
|
||||
currentUser: User;
|
||||
currentWorkspace: Workspace;
|
||||
exchangeAuthorizationCode: ExchangeAuthCode;
|
||||
field: Field;
|
||||
fields: FieldConnection;
|
||||
findAvailableRemoteTablesByServerId: Array<RemoteTable>;
|
||||
@ -610,6 +647,12 @@ export type QueryCheckWorkspaceInviteHashIsValidArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryExchangeAuthorizationCodeArgs = {
|
||||
authorizationCode: Scalars['String']['input'];
|
||||
codeVerifier: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryFieldArgs = {
|
||||
id: Scalars['ID']['input'];
|
||||
};
|
||||
@ -699,22 +742,6 @@ export type QueryValidatePasswordResetTokenArgs = {
|
||||
passwordResetToken: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type RefreshToken = {
|
||||
__typename?: 'RefreshToken';
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
expiresAt: Scalars['DateTime']['output'];
|
||||
id: Scalars['ID']['output'];
|
||||
updatedAt: Scalars['DateTime']['output'];
|
||||
};
|
||||
|
||||
export type RefreshTokenEdge = {
|
||||
__typename?: 'RefreshTokenEdge';
|
||||
/** Cursor for this node. */
|
||||
cursor: Scalars['ConnectionCursor']['output'];
|
||||
/** The node containing the RefreshToken */
|
||||
node: RefreshToken;
|
||||
};
|
||||
|
||||
export type RelationConnection = {
|
||||
__typename?: 'RelationConnection';
|
||||
/** Array of edges. */
|
||||
@ -1027,6 +1054,7 @@ export type Workspace = {
|
||||
billingSubscriptions?: Maybe<Array<BillingSubscription>>;
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
currentBillingSubscription?: Maybe<BillingSubscription>;
|
||||
currentCacheVersion?: Maybe<Scalars['String']['output']>;
|
||||
deletedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
displayName?: Maybe<Scalars['String']['output']>;
|
||||
domainName?: Maybe<Scalars['String']['output']>;
|
||||
|
||||
Reference in New Issue
Block a user