Skip to content

Commit

Permalink
add maxHeight and maxWidth to node
Browse files Browse the repository at this point in the history
  • Loading branch information
sbardian committed Aug 23, 2019
1 parent a492167 commit 4ac71dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/gatsby-transformer-sharp/src/extend-node-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ const fluidNodeType = ({
},
},
sizes: { type: GraphQLString },
maxWidth: {
type: GraphQLString,
resolve: ({ file, image, fieldArgs }) => fieldArgs.maxWidth,
},
maxHeight: {
type: GraphQLString,
resolve: ({ file, image, fieldArgs }) => fieldArgs.maxHeight,
},
originalImg: { type: GraphQLString },
originalName: { type: GraphQLString },
presentationWidth: { type: GraphQLInt },
Expand Down

0 comments on commit 4ac71dd

Please sign in to comment.