From efe95a4eb4326e4b116c54346ced7412cc7be467 Mon Sep 17 00:00:00 2001 From: stefanprobst Date: Mon, 24 Sep 2018 13:25:21 +0200 Subject: [PATCH] feat(gatsby-transformer-sharp): expose sizes argument for fluid query (#8466) * Expose sizes * Allow querying presentationWidth --- packages/gatsby-transformer-sharp/src/extend-node-type.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/gatsby-transformer-sharp/src/extend-node-type.js b/packages/gatsby-transformer-sharp/src/extend-node-type.js index aed14a6856272..8c552937df851 100644 --- a/packages/gatsby-transformer-sharp/src/extend-node-type.js +++ b/packages/gatsby-transformer-sharp/src/extend-node-type.js @@ -216,6 +216,8 @@ const fluidNodeType = ({ sizes: { type: GraphQLString }, originalImg: { type: GraphQLString }, originalName: { type: GraphQLString }, + presentationWidth: { type: GraphQLInt }, + presentationHeight: { type: GraphQLInt }, }, }), args: { @@ -257,6 +259,10 @@ const fluidNodeType = ({ type: GraphQLInt, defaultValue: 0, }, + sizes: { + type: GraphQLString, + defaultValue: ``, + }, }, resolve: (image, fieldArgs, context) => { const file = getNodeAndSavePathDependency(image.parent, context.path)