Skip to content

Ensure API.query URIs can traverse one-to-many Relationships #1

@enobrev

Description

@enobrev

Currently, to get all the themes for all the currently selected cities, the query looks something like this:

API.query([
    '/cities',
    '/themes/{cities.theme_id}'
]), () => {}};

This is fairly reasonable if you know the relationships, but not ideal or consistent, especially since many-to-many relationships can be figured out just fine.

Ideally, this could also be done thusly:

API.query([
    '/cities',
    '/cities/{cities.id}/themes'
]), () => {}};

The resulting query should be the same.

Metadata

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