Optimize metadata queries (#7013)
In this PR: 1. Refactor guards to avoid duplicated queries: WorkspaceAuthGuard and UserAuthGuard only check for existence of workspace and user in the request without querying the database
This commit is contained in:
committed by
Charles Bochet
parent
cf8b1161cc
commit
523df5398a
@ -1,5 +1,5 @@
|
||||
import * as Apollo from '@apollo/client';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
export type Maybe<T> = T | null;
|
||||
export type InputMaybe<T> = Maybe<T>;
|
||||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
||||
@ -219,7 +219,7 @@ export type ExecuteServerlessFunctionInput = {
|
||||
/** Id of the serverless function to execute */
|
||||
id: Scalars['UUID'];
|
||||
/** Payload in JSON format */
|
||||
payload?: InputMaybe<Scalars['JSON']>;
|
||||
payload: Scalars['JSON'];
|
||||
/** Version of the serverless function to execute */
|
||||
version?: Scalars['String'];
|
||||
};
|
||||
@ -338,6 +338,7 @@ export enum MessageChannelVisibility {
|
||||
|
||||
export type Mutation = {
|
||||
__typename?: 'Mutation';
|
||||
activateWorkflowVersion: Scalars['Boolean'];
|
||||
activateWorkspace: Workspace;
|
||||
addUserToWorkspace: User;
|
||||
authorizeApp: AuthorizeApp;
|
||||
@ -347,15 +348,14 @@ export type Mutation = {
|
||||
createOneObject: Object;
|
||||
createOneServerlessFunction: ServerlessFunction;
|
||||
createOneServerlessFunctionFromFile: ServerlessFunction;
|
||||
deactivateWorkflowVersion: Scalars['Boolean'];
|
||||
deleteCurrentWorkspace: Workspace;
|
||||
deleteOneObject: Object;
|
||||
deleteOneServerlessFunction: ServerlessFunction;
|
||||
deleteUser: User;
|
||||
disablePostgresProxy: PostgresCredentials;
|
||||
disableWorkflowTrigger: Scalars['Boolean'];
|
||||
emailPasswordResetLink: EmailPasswordResetLink;
|
||||
enablePostgresProxy: PostgresCredentials;
|
||||
enableWorkflowTrigger: Scalars['Boolean'];
|
||||
exchangeAuthorizationCode: ExchangeAuthCode;
|
||||
executeOneServerlessFunction: ServerlessFunctionExecutionResult;
|
||||
generateApiKeyToken: ApiKeyToken;
|
||||
@ -382,6 +382,11 @@ export type Mutation = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationActivateWorkflowVersionArgs = {
|
||||
workflowVersionId: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationActivateWorkspaceArgs = {
|
||||
data: ActivateWorkspaceInput;
|
||||
};
|
||||
@ -423,6 +428,11 @@ export type MutationCreateOneServerlessFunctionFromFileArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationDeactivateWorkflowVersionArgs = {
|
||||
workflowVersionId: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationDeleteOneObjectArgs = {
|
||||
input: DeleteOneObjectInput;
|
||||
};
|
||||
@ -433,21 +443,11 @@ export type MutationDeleteOneServerlessFunctionArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationDisableWorkflowTriggerArgs = {
|
||||
workflowVersionId: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationEmailPasswordResetLinkArgs = {
|
||||
email: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationEnableWorkflowTriggerArgs = {
|
||||
workflowVersionId: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationExchangeAuthorizationCodeArgs = {
|
||||
authorizationCode: Scalars['String'];
|
||||
clientSecret?: InputMaybe<Scalars['String']>;
|
||||
@ -638,9 +638,10 @@ export type Query = {
|
||||
currentWorkspace: Workspace;
|
||||
findWorkspaceFromInviteHash: Workspace;
|
||||
getAISQLQuery: AisqlQueryResult;
|
||||
getAvailablePackages: Scalars['JSON'];
|
||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||
getProductPrices: ProductPricesEntity;
|
||||
getServerlessFunctionSourceCode: Scalars['String'];
|
||||
getServerlessFunctionSourceCode?: Maybe<Scalars['String']>;
|
||||
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
|
||||
getTimelineCalendarEventsFromPersonId: TimelineCalendarEventsWithTotal;
|
||||
getTimelineThreadsFromCompanyId: TimelineThreadsWithTotal;
|
||||
|
||||
Reference in New Issue
Block a user