Skip to content

[V4] Provide the ability to produce "entity_url" as an absolute URL #1219

@rollki

Description

@rollki

It seems there's no way to get entity URL via entity_url data producer as an absolute URL object.
Probably we can add an optional consumes to that producer.

So, to produce an absolute URL we can do something like:

    $registry->addFieldResolver('Topic', 'url',
      $builder->compose(
        $builder->produce('entity_url')
          ->map('entity', $builder->fromParent())
          ->map('absolute', $builder->fromValue(TRUE)),
        $builder->produce('url_path')
          ->map('url', $builder->fromParent())
      )
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions