Skip to content

Commit

Permalink
Merge pull request #523 from broskoski/image-alt
Browse files Browse the repository at this point in the history
@sweir27 - Adds image_title attr for artwork images
  • Loading branch information
sweir27 committed Jan 18, 2017
2 parents 8f3d4b5 + 1dbfa08 commit ad8cb61
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions schema/artwork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ const ArtworkType = new GraphQLObjectType({
image_rights: {
type: GraphQLString,
},
image_title: {
type: GraphQLString,
resolve: ({ artist, title, date }) => {
return _.compact([
(artist && artist.name),
(title && `‘${title}’`),
date,
]).join(', ');
},
},
website: {
type: GraphQLString,
resolve: artwork =>
Expand Down

0 comments on commit ad8cb61

Please sign in to comment.