graphql api tested & user resolver, schema and mongo interfaces tested

This commit is contained in:
2025-11-14 10:30:01 +03:00
parent 053586c5cc
commit 45f6b7a1ef
26 changed files with 1211 additions and 489 deletions

View File

@@ -1,9 +1,8 @@
import { ApolloServer } from '@apollo/server';
import { startServerAndCreateNextHandler } from '@as-integrations/next';
import { NextRequest } from 'next/server';
import { typeDefs, resolvers } from '@/graphql';
const server = new ApolloServer({ typeDefs, resolvers, introspection: process.env.NODE_ENV === 'development' });
const handler = startServerAndCreateNextHandler(server, { context: async (req: NextRequest) => ({ req }) });
const handler = startServerAndCreateNextHandler(server as any, { context: async (req) => ({ req }) });
export { handler as GET, handler as POST };

0
app/api/users/route.ts Normal file
View File