Fix missing creation attributes (#15624)

This commit is contained in:
martmull
2025-11-05 09:29:23 +01:00
committed by GitHub
parent 5d5999b80a
commit 642e0c882a
4 changed files with 18 additions and 2 deletions
@@ -908,6 +908,8 @@ export type CreateRouteTriggerInput = {
export type CreateServerlessFunctionInput = {
code?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
handlerName?: InputMaybe<Scalars['String']>;
handlerPath?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
timeoutSeconds?: InputMaybe<Scalars['Float']>;
};
@@ -872,6 +872,8 @@ export type CreateRouteTriggerInput = {
export type CreateServerlessFunctionInput = {
code?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
handlerName?: InputMaybe<Scalars['String']>;
handlerPath?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
timeoutSeconds?: InputMaybe<Scalars['Float']>;
};
@@ -45,4 +45,14 @@ export class CreateServerlessFunctionInput {
@IsObject()
@IsOptional()
code?: Sources;
@IsString()
@Field({ nullable: true })
@IsOptional()
handlerName?: string;
@IsString()
@Field({ nullable: true })
@IsOptional()
handlerPath?: string;
}
@@ -30,8 +30,10 @@ export const fromCreateServerlessFunctionInputToFlatServerlessFunction = ({
id,
name: rawCreateServerlessFunctionInput.name,
description: rawCreateServerlessFunctionInput.description ?? null,
handlerPath: DEFAULT_HANDLER_PATH,
handlerName: DEFAULT_HANDLER_NAME,
handlerPath:
rawCreateServerlessFunctionInput.handlerPath ?? DEFAULT_HANDLER_PATH,
handlerName:
rawCreateServerlessFunctionInput.handlerName ?? DEFAULT_HANDLER_NAME,
universalIdentifier:
rawCreateServerlessFunctionInput.universalIdentifier ?? v4(),
createdAt: currentDate,