release: WRNexusJS 0.8.0
Quality / quality (ubuntu-latest) (push) Failing after 21s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-02 23:18:51 +05:30
parent 87507edf59
commit 586a6db8ff
625 changed files with 243608 additions and 11210 deletions
+24
View File
@@ -0,0 +1,24 @@
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import type { WrnexusPlugin } from "@wrnexus/plugin";
import { createGraphqlHandler, type GraphqlOptions } from "./index.ts";
export function graphqlPlugin(options: GraphqlOptions & { path?: string }): WrnexusPlugin {
return {
name: "@wrnexus/graphql",
version: "0.8.0",
setup() {
(globalThis as any).__wrnexusGraphqlHandler = createGraphqlHandler(options);
},
routeEntries: [
{
kind: "api",
path: options.path ?? "/api/graphql",
entry: join(dirname(fileURLToPath(import.meta.url)), "route.ts"),
},
],
documentation: ["packages/graphql/README.md"],
typeDefinitions: ["packages/graphql/src/index.ts"],
};
}
export default graphqlPlugin;