Skip to content

Commit

Permalink
Ensure link() default arg (#13591)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst authored and sidharthachatterjee committed Apr 24, 2019
1 parent 17d7857 commit c18d1e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/schema/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const paginate = (results = [], { skip = 0, limit }) => {
}
}

const link = ({ by, from }) => async (source, args, context, info) => {
const link = ({ by = `id`, from }) => async (source, args, context, info) => {
const fieldValue = source && source[from || info.fieldName]

if (fieldValue == null || _.isPlainObject(fieldValue)) return fieldValue
Expand Down

0 comments on commit c18d1e9

Please sign in to comment.