mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-27 11:14:33 +01:00
fix: add excerpt to schema
This commit is contained in:
@@ -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!
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user