Pass current code as input for fork mutation (#563)
This commit was merged in pull request #563.
This commit is contained in:
@@ -43,6 +43,7 @@ export const schema = gql`
|
|||||||
input ForkProjectInput {
|
input ForkProjectInput {
|
||||||
userId: String!
|
userId: String!
|
||||||
forkedFromId: String
|
forkedFromId: String
|
||||||
|
code: String
|
||||||
}
|
}
|
||||||
|
|
||||||
input UpdateProjectInput {
|
input UpdateProjectInput {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export const forkProject = async ({ input }) => {
|
|||||||
data: foreignKeyReplacement({
|
data: foreignKeyReplacement({
|
||||||
...input,
|
...input,
|
||||||
title,
|
title,
|
||||||
code,
|
code: input.code || code,
|
||||||
description,
|
description,
|
||||||
cadPackage,
|
cadPackage,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ export default function IdeHeader({
|
|||||||
input: {
|
input: {
|
||||||
userId: currentUser.sub,
|
userId: currentUser.sub,
|
||||||
forkedFromId: project?.id,
|
forkedFromId: project?.id,
|
||||||
|
code: state?.code,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user