6654 serverless functions add a deploy button disable deploy when autosave (#6715)
- improvements on serverless function behavior (autosave performances, deploy on execution only) - add versioning to serverless functions - add a publish endpoint to create a new version of a serverless function - add deploy and reset to lastVersion button in the settings section: <img width="736" alt="image" src="https://github.com/user-attachments/assets/2001f8d2-07a4-4f79-84dd-ec74b6f301d3">
This commit is contained in:
@ -6,9 +6,9 @@ export const SERVERLESS_FUNCTION_FRAGMENT = gql`
|
||||
name
|
||||
description
|
||||
sourceCodeHash
|
||||
sourceCodeFullPath
|
||||
runtime
|
||||
syncStatus
|
||||
latestVersion
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const EXECUTE_ONE_SERVERLESS_FUNCTION = gql`
|
||||
mutation ExecuteOneServerlessFunction($id: UUID!, $payload: JSON!) {
|
||||
executeOneServerlessFunction(id: $id, payload: $payload) {
|
||||
mutation ExecuteOneServerlessFunction(
|
||||
$input: ExecuteServerlessFunctionInput!
|
||||
) {
|
||||
executeOneServerlessFunction(input: $input) {
|
||||
data
|
||||
duration
|
||||
status
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
import { gql } from '@apollo/client';
|
||||
import { SERVERLESS_FUNCTION_FRAGMENT } from '@/settings/serverless-functions/graphql/fragments/serverlessFunctionFragment';
|
||||
|
||||
export const PUBLISH_ONE_SERVERLESS_FUNCTION = gql`
|
||||
${SERVERLESS_FUNCTION_FRAGMENT}
|
||||
mutation PublishOneServerlessFunction(
|
||||
$input: PublishServerlessFunctionInput!
|
||||
) {
|
||||
publishServerlessFunction(input: $input) {
|
||||
...ServerlessFunctionFields
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const FIND_ONE_SERVERLESS_FUNCTION_SOURCE_CODE = gql`
|
||||
query FindOneServerlessFunctionSourceCode(
|
||||
$input: GetServerlessFunctionSourceCodeInput!
|
||||
) {
|
||||
getServerlessFunctionSourceCode(input: $input)
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user