Pass current code as input for fork mutation #563

Merged
lucas-barros merged 1 commits from respect-changes-when-forking-project into main 2021-10-17 02:41:27 +02:00
3 changed files with 3 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ export const schema = gql`
input ForkProjectInput {
userId: String!
forkedFromId: String
code: String
}
input UpdateProjectInput {

View File

@@ -97,7 +97,7 @@ export const forkProject = async ({ input }) => {
data: foreignKeyReplacement({
...input,
title,
code,
code: input.code || code,
description,
cadPackage,
}),

View File

@@ -85,6 +85,7 @@ export default function IdeHeader({
input: {
userId: currentUser.sub,
forkedFromId: project?.id,
code: state?.code,
},
},
})