Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Urigo committed Dec 12, 2024
1 parent aa644c8 commit d258f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion website/src/pages/tutorial/basic/08-graph-relations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ const resolvers = {
// ... other resolver maps ...
Link: {
// ... other field resolver functions
comments(parent: Link, args: {}, context: GraphQLContext) {
comments: (parent: Link, args: {}, context: GraphQLContext) => {
return context.prisma.comment.findMany({
orderBy: { createdAt: 'desc' },
where: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const resolvers = {
id: (parent: Link) => parent.id,
description: (parent: Link) => parent.description,
url: (parent: Link) => parent.url,
comments(parent: Link, args: {}, context: GraphQLContext) {
comments: (parent: Link, args: {}, context: GraphQLContext) => {
return context.prisma.comment.findMany({
orderBy: { createdAt: 'desc' },
where: {
Expand Down Expand Up @@ -299,7 +299,7 @@ Now, you can simply remove the comments, and migrate the existing `comments` res
import type { LinkResolvers } from './../../types.generated'

export const Link: LinkResolvers = {
comments: async (parent, _arg, context) => {
comments: (parent, _arg, context) => {
return context.prisma.comment.findMany({
orderBy: { createdAt: 'desc' },
where: {
Expand Down

0 comments on commit d258f21

Please sign in to comment.