wp-graphql-content-blocks icon indicating copy to clipboard operation
wp-graphql-content-blocks copied to clipboard

Revert CoreImageAttributes width field is of type String but it should be Float

Open ChrisWiegman opened this issue 1 year ago • 2 comments

Steps to Reproduce

Check CoreImageAttributes width type in GraphQLi. It is of type String.

##Issue CoreImageAttributes.width is of type String.

##Expected Behavior CoreImageAttributes.width should be of type Float.

##Additional Information Note any other relevant details.

##Related ticket: CoreImageAttributes.width is type String, but should be a Float · Issue #136 · wpengine/wp-graphql-content-blocks You need to revert the following commit: Bug: CoreImage width attribute resolve throws error. (#130) · wpengine/wp-graphql-content-blocks@28fca4a However we need to document the failing unit test case and provide a workaround for this error. The workaround is to use an alias for the attributes field so that GrapgQL can resolve the types without any conflicts.

Image

ChrisWiegman avatar Dec 29 '23 16:12 ChrisWiegman

I believe i noted this in #136, but just in case: the ideal fix from a schema perspective is to make all width/height attributes a CssUnit { value: Int, unit:CssUnitTypeEnum } or similar, where the unit type defaults if there isn't an explicit one.

justlevine avatar Dec 29 '23 16:12 justlevine

@justlevine I'm sure you did. We're in the process of converting from Jira to GitHub for the teams own work and, as much as I tried to catch all the dupes in moving over work, I'm sure there are a few.

ChrisWiegman avatar Dec 29 '23 16:12 ChrisWiegman

Closing this as we can continue tracking this in #136 in order to see the full context of the issue.

josephfusco avatar Jul 30 '24 18:07 josephfusco