Problem/Motivation
When using the menu_link_label data producer with a link, the user has no access to, ith throws an Internal server error.
The feason for that is, that MenuLinkLabel::resolve declares the return type to be string, but in case of an inaccessible link $link->getTitle() returns TranslatableMarkup.
Proposed resolution
Either cast the return value to string, or change the return type declaration to string|TranslatableMarkup.
Issue fork graphql-3525994
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
daniel.bosenComment #4
klausiThanks! I think casting to string here is ok as the result of a dataproducer should probably not be a Translatable markup object.