diff --git a/packages/gatsby/src/schema/resolvers.js b/packages/gatsby/src/schema/resolvers.js index 02534f3a978b6..4342b43d4981a 100644 --- a/packages/gatsby/src/schema/resolvers.js +++ b/packages/gatsby/src/schema/resolvers.js @@ -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