feat: mutations and queries for shortcode management

This commit is contained in:
Andrew Bastin
2021-11-21 20:02:09 +05:30
parent 1a4eb1fabe
commit 4a32fc6180
6 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { runMutation } from "../GQLClient"
import {
CreateShortcodeDocument,
CreateShortcodeMutation,
CreateShortcodeMutationVariables,
} from "../graphql"
import { HoppRESTRequest } from "~/helpers/types/HoppRESTRequest"
export const createShortcode = (request: HoppRESTRequest) =>
runMutation<CreateShortcodeMutation, CreateShortcodeMutationVariables, "">(
CreateShortcodeDocument,
{
request: JSON.stringify(request),
}
)