@ codesandbox/ api (帮助)
还需要做的事
开始吧
import { CodeSandboxApi, onBrowserRequest } from "@codesandbox/api";
const api = new CodeSandboxApi({
// Which endpoint to use
development: true,
// If it should start in an authenticated state, verifying
// the user
authenticate: true,
// Callback for making requests
onRequest: onBrowserRequest,
});
GQL 查询
import { createQuery, createMutation } from "@codesandbox/api";
const sandboxQuery = createQuery("Sandbox", {
sandbox: [{ sandboxId: "new" }, { isFrozen: true }],
});