-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose label data for SelectOne/SelectMultiple #155
Comments
Hrm, I'm worried about switching it to an object because that's not how {
__type(name:"EnumTestEnum") {
name
enumValues{
name
description
}
}
} This works with a Craft Field that has a handle of |
@markhuot Craft will return Yeah the |
Ah, I see. Hrm… then the object does sound nice but it's a backwards compatibility break, let me think on it. I'm leaning towards the directive, though. |
{
entries {
...on EntryType {
checkboxField_FieldData {
selected {
label # the string label of the option
value # the string value of the option
}
options {
label # the string label of the option
value # the string value of the option
selected # a boolean indicating if the option is selected
}
}
}
}
} |
SelectOne/SelectMultiple field types end up as enums of the values, but it may be common to want to access the selected label.
Since the label is added to the enum's description, I thought maybe I could do this introspectively already, but didn't find a solution.
Ideas:
@description
directive that will get the enum value's desc and return it.The text was updated successfully, but these errors were encountered: