What are you trying to do?
When handling icon-picker fields via fragments in GraphQL, the field handle is currently explicitly used in the GQL type. This prevents a generic, relay-style fragment/component which could be used on any icon-picker field, regardless the field handle.
What's your proposed solution?
All icon-picker GQL types (myIconField_Icon) could implement a generic IconInterface, which would allow generically implementing icon-picker fields with a singular fragment/component:
fragment Icon on IconInterface {
value
iconSet
label
keywords
type
isEmpty
url
path
inline
glyph
glyphName
}
fragment Article on Article_Entry {
articleIcon {
...Icon
}
}
fragment Teaser on Teaser_Entry {
teaserIcon {
...Icon
}
}
Additional context
No response
What are you trying to do?
When handling icon-picker fields via fragments in GraphQL, the field handle is currently explicitly used in the GQL type. This prevents a generic, relay-style fragment/component which could be used on any icon-picker field, regardless the field handle.
What's your proposed solution?
All icon-picker GQL types (
myIconField_Icon) could implement a genericIconInterface, which would allow generically implementing icon-picker fields with a singular fragment/component:Additional context
No response