parts and areas tested
This commit is contained in:
@@ -12,26 +12,25 @@ export async function POST(request: Request) {
|
||||
const query = gql`
|
||||
query BuildAreas($input: ListArguments!) {
|
||||
buildAreas(input: $input) {
|
||||
data {
|
||||
_id
|
||||
uuid
|
||||
createdAt
|
||||
areaName
|
||||
areaCode
|
||||
areaType
|
||||
areaDirection
|
||||
areaGrossSize
|
||||
areaNetSize
|
||||
width
|
||||
size
|
||||
expiryStarts
|
||||
expiryEnds
|
||||
}
|
||||
data {
|
||||
_id
|
||||
uuid
|
||||
createdAt
|
||||
areaName
|
||||
areaCode
|
||||
areaType
|
||||
areaDirection
|
||||
areaGrossSize
|
||||
areaNetSize
|
||||
width
|
||||
size
|
||||
expiryStarts
|
||||
expiryEnds
|
||||
}
|
||||
totalCount
|
||||
}
|
||||
}`;
|
||||
const variables = { input: { limit, skip, sort, filters } };
|
||||
console.dir({ variables })
|
||||
const data = await client.request(query, variables);
|
||||
return NextResponse.json({ data: data.buildAreas.data, totalCount: data.buildAreas.totalCount });
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user