Skip to content

Commit efe95a4

Browse files
stefanprobstpieh
authored andcommitted
feat(gatsby-transformer-sharp): expose sizes argument for fluid query (#8466)
* Expose sizes * Allow querying presentationWidth
1 parent bb5c0d2 commit efe95a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/gatsby-transformer-sharp/src/extend-node-type.js

+6
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ const fluidNodeType = ({
216216
sizes: { type: GraphQLString },
217217
originalImg: { type: GraphQLString },
218218
originalName: { type: GraphQLString },
219+
presentationWidth: { type: GraphQLInt },
220+
presentationHeight: { type: GraphQLInt },
219221
},
220222
}),
221223
args: {
@@ -257,6 +259,10 @@ const fluidNodeType = ({
257259
type: GraphQLInt,
258260
defaultValue: 0,
259261
},
262+
sizes: {
263+
type: GraphQLString,
264+
defaultValue: ``,
265+
},
260266
},
261267
resolve: (image, fieldArgs, context) => {
262268
const file = getNodeAndSavePathDependency(image.parent, context.path)

0 commit comments

Comments
 (0)