Skip to content

Commit

Permalink
Update virtual-fields.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
jakegiri authored Oct 1, 2021
1 parent 3ae9031 commit 7234bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pages/docs/guides/virtual-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export default config({
content: text(),
author: relationship({ ref: 'Author', many: false }),
authorName: virtual({
type: graphql.String,
field: graphql.field({
type: graphql.String,
async resolve(item, args, context) {
const { author } = await context.lists.Post.findOne({
where: { id: item.id.toString() },
Expand Down

0 comments on commit 7234bec

Please sign in to comment.