fix: add excerpt to schema

This commit is contained in:
MTG2000
2022-05-20 16:57:07 +03:00
parent 32374b97d0
commit 5ff83ddc62
2 changed files with 4 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ export interface NexusGenObjects {
cover_image: string; // String!
createdAt: NexusGenScalars['Date']; // Date!
deadline: string; // String!
excerpt: string; // String!
id: number; // Int!
reward_amount: number; // Int!
title: string; // String!
@@ -107,6 +108,7 @@ export interface NexusGenObjects {
answers_count: number; // Int!
body: string; // String!
createdAt: NexusGenScalars['Date']; // Date!
excerpt: string; // String!
id: number; // Int!
title: string; // String!
votes_count: number; // Int!
@@ -115,6 +117,7 @@ export interface NexusGenObjects {
body: string; // String!
cover_image: string; // String!
createdAt: NexusGenScalars['Date']; // Date!
excerpt: string; // String!
id: number; // Int!
title: string; // String!
votes_count: number; // Int!

View File

@@ -82,6 +82,7 @@ const PostBase = interfaceType({
t.nonNull.string('title');
t.nonNull.date('createdAt');
t.nonNull.string('body');
t.nonNull.string('excerpt');
t.nonNull.int('votes_count');
},
})
@@ -94,7 +95,6 @@ const Story = objectType({
resolve: () => t.typeName
});
t.nonNull.string('cover_image');
t.nonNull.list.nonNull.field('comments', {
type: "PostComment",
resolve: (parent) => prisma.story.findUnique({ where: { id: parent.id } }).comments()