release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { createGraphqlHandler } from "@wrnexus/graphql";
|
||||
|
||||
const graphql = createGraphqlHandler({
|
||||
maxDepth: 8,
|
||||
maxAliases: 20,
|
||||
allowIntrospection: false,
|
||||
async execute(request) {
|
||||
return { data: { example: request.operationName ?? "anonymous" } };
|
||||
},
|
||||
});
|
||||
|
||||
export function POST(ctx: { req: Request }): Promise<Response> {
|
||||
return graphql(ctx.req);
|
||||
}
|
||||
Reference in New Issue
Block a user