move move frontend to progress-test

This commit is contained in:
João Geonizeli
2022-07-21 21:16:59 -03:00
parent f8d5d08447
commit 386050d4ad
129 changed files with 159374 additions and 39 deletions

View File

@@ -0,0 +1,18 @@
import { Node } from "../../__generated__/graphql-schema";
const SEPARATOR_TOKEN = "-";
type Decoded = { typeName: string; id: string };
const decode = (id: Node["id"]): Decoded => {
const raw = Buffer.from(id, "base64").toString("ascii");
const [nodeTypeName, nodeId] = raw.split(SEPARATOR_TOKEN);
return {
id: nodeId,
typeName: nodeTypeName,
};
};
export const NodeId = { decode };