added logging

This commit is contained in:
MTG2000
2022-03-24 17:18:56 +02:00
parent ebb81dd4d9
commit dedfc4ed6f
4 changed files with 8 additions and 7 deletions

View File

@@ -35,8 +35,8 @@ export interface NexusGenObjects {
url: string; // String!
}
Category: { // root type
cover_image: string; // String!
icon: string; // String!
cover_image?: string | null; // String
icon?: string | null; // String
id: number; // Int!
title: string; // String!
}
@@ -93,8 +93,8 @@ export interface NexusGenFieldTypes {
}
Category: { // field return type
apps_count: number; // Int!
cover_image: string; // String!
icon: string; // String!
cover_image: string | null; // String
icon: string | null; // String
id: number; // Int!
project: NexusGenRootTypes['Project'][]; // [Project!]!
title: string; // String!

View File

@@ -12,8 +12,8 @@ type Award {
type Category {
apps_count: Int!
cover_image: String!
icon: String!
cover_image: String
icon: String
id: Int!
project: [Project!]!
title: String!

View File

@@ -55,6 +55,7 @@ const allCategoriesQuery = extendType({
}
}
})
console.log(categories);
categories.sort((c1, c2) => c2._count.project - c1._count.project)
return categories;
}

View File

@@ -8,7 +8,7 @@ service: serverless-graphql
provider:
name: aws
runtime: nodejs12.x
region: ap-southeast-2
functions:
graphql:
handler: functions/graphql/index.handler