Skip to content

Fields issue on preload entity #89

Open
@BenWaNH

Description

Hi!
I'm playing with Vulcain but i'm facing to an issue...
I've 2 entities in an Api Platform project (greeting and author, author have many greetings, for relationship)

If i fetch greetings endpoint:

window.fetch('https://localhost/greetings', {
        headers: {
            preload: '"/hydra:member/*/author"',
            fields: '"/hydra:member/*/@id", "/hydra:member/*/name", "/hydra:member/*/author/@id"'
        }
    }).then(() => window.fetch('https://localhost/authors/1'))

Of course authors/1 exists and it linked to all my greetings for more simplicity.

So... In this case, with fields contains "/hydra:member/*/authors/@id" (it the same with firstname or anyother property) push doesn't work
image

But if instead "/hydra:member/*/authors/@id", i've "/hydra:member/*/authors" (without /@id) push works (but i get full object after, of course)
image

What am i missing....? Documentation seems clear about, i think this should work...

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions