Nicola Nardella
04/09/2020, 7:36 AMNicola Nardella
04/09/2020, 7:37 AMType 'Promise<Post[]>' is not assignable to type '{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[] | PromiseLike<{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[]> | MaybePromise<...>[] | PromiseLike<...>'.
Type 'Promise<Post[]>' is not assignable to type 'PromiseLike<{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[] | MaybePromise<{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; } | { ...; }>[]>'.
Types of property 'then' are incompatible.
Type '<TResult1 = Post[], TResult2 = never>(onfulfilled?: (value: Post[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<...>' is not assignable to type '<TResult1 = { content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[] | MaybePromise<{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; } | { ...; }>[], TResult2 = never>(onfulfilled?: (value: { ...; }[] | MaybePromise<...>[...'.
Types of parameters 'onfulfilled' and 'onfulfilled' are incompatible.
Types of parameters 'value' and 'value' are incompatible.
Type 'Post[]' is not assignable to type '{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[] | MaybePromise<{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; } | { ...; }>[]'.
Type 'Post[]' is not assignable to type '{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }[]'.
Type 'Post' is missing the following properties from type '{ content?: string; createdAt: any; id: string; published: boolean; title: string; updatedAt: any; }': createdAt, updatedAtts(2322)
typegenTypeHelpers.d.ts(68, 88): The expected type comes from the return type of this signature.Nicola Nardella
04/09/2020, 7:39 AMt.list.field('posts', {
type: 'Post',
resolve: parent =>
prisma.user
.findOne({
where: { id: Number(<http://parent.id|parent.id>) },
})
.posts(),
})Nicola Nardella
04/09/2020, 7:41 AMgraphql-nextjs doesn't work wellGreg Egan
08/20/2020, 9:51 PM