users update create delete tested
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user