16 lines
438 B
TypeScript
16 lines
438 B
TypeScript
import { HoppRESTRequest } from "@hoppscotch/data"
|
|
import { runMutation } from "../GQLClient"
|
|
import {
|
|
CreateShortcodeDocument,
|
|
CreateShortcodeMutation,
|
|
CreateShortcodeMutationVariables,
|
|
} from "../graphql"
|
|
|
|
export const createShortcode = (request: HoppRESTRequest) =>
|
|
runMutation<CreateShortcodeMutation, CreateShortcodeMutationVariables, "">(
|
|
CreateShortcodeDocument,
|
|
{
|
|
request: JSON.stringify(request),
|
|
}
|
|
)
|