imgix/gatsby

GraphQL types for imgixParams

frederickfogerty opened this issue ยท 1 comments

This is a potential feature for this library. If you want to see us build this, please indicate your support by reacting to this with a ๐Ÿ‘

User Story

I want to have my imgix parameters in my Gatsby/GraphQL query be strongly-typed

Description

This would ensure that imgix parameters passed to any transformations in a GraphQL query would be strongly typed, to reduce errors, typos, and improve developer experience.

For example:

{
	allWordpressPosts {
		heroImage # The original image url
		imgixHeroImage( # The transformed hero image, served by imgix
			imgixParams: {
				auto: ["format", "compress", "not-a-parameter"], # this would throw an error as "not-a-parameter" is, well, not a valid paremeter.
				q: 50,
				focus: 10 # this would throw an error because focus is not an imgix parameter.
			}
		) {
			url
		}
}

Closing as there hasn't been much movement here but I have noted this feature in our backlog.