diff --git a/src/graphql/mutation/draft-create.ts b/src/graphql/mutation/draft-create.ts new file mode 100644 index 00000000..6aae7886 --- /dev/null +++ b/src/graphql/mutation/draft-create.ts @@ -0,0 +1,28 @@ +import { gql } from '@urql/core' + +export default gql` + mutation DraftCreateMutation($draft: DraftInput!) { + createDraft(draft: $draft) { + error + draft { + id + slug + title + subtitle + body + topics { + # id + title + slug + } + authors { + id + name + slug + userpic + caption + } + } + } + } +` diff --git a/src/graphql/mutation/draft-destroy.ts b/src/graphql/mutation/draft-destroy.ts new file mode 100644 index 00000000..e01f8c6b --- /dev/null +++ b/src/graphql/mutation/draft-destroy.ts @@ -0,0 +1,9 @@ +import { gql } from '@urql/core' + +export default gql` + mutation DraftDestroyMutation($draft: Int!) { + deleteDraft(draft: $draft) { + error + } + } +` diff --git a/src/graphql/mutation/article-from-draft.ts b/src/graphql/mutation/draft-to-shout.ts similarity index 100% rename from src/graphql/mutation/article-from-draft.ts rename to src/graphql/mutation/draft-to-shout.ts diff --git a/src/graphql/mutation/draft-update.ts b/src/graphql/mutation/draft-update.ts new file mode 100644 index 00000000..55dabcdc --- /dev/null +++ b/src/graphql/mutation/draft-update.ts @@ -0,0 +1,28 @@ +import { gql } from '@urql/core' + +export default gql` + mutation DraftUpdateMutation($draft: DraftInput!) { + updateDraft(draft: $draft) { + error + draft { + id + slug + title + subtitle + body + topics { + # id + title + slug + } + authors { + id + name + slug + userpic + caption + } + } + } + } +`