users update create delete tested

This commit is contained in:
2025-11-16 20:35:19 +03:00
parent cf4f632afe
commit f870c2e62e
58 changed files with 4511 additions and 191 deletions

View File

@@ -2,7 +2,7 @@
import { NextResponse } from 'next/server';
import { GraphQLClient, gql } from 'graphql-request';
const endpoint = process.env.GRAPHQL_URL || "http://localhost:3001/graphql";
const endpoint = "http://localhost:3001/graphql";
export async function POST(request: Request) {
const body = await request.json();
@@ -50,7 +50,6 @@ export async function POST(request: Request) {
}
}
`;
console.dir({ limit, skip, sort, filters }, { depth: null });
const variables = { input: { limit, skip, sort, filters } };
const data = await client.request(query, variables);
return NextResponse.json({ data: data.users.data, totalCount: data.users.totalCount });