Skip to content

API: Joins / Relations refactor #5615

@ErisDS

Description

@ErisDS

This issue is a little bit of a mixed bag, I needed to brain dump all of the small join / relation related tasks that need to be done to ensure we get consistent behaviour across the API.

Joins / Relation handling

  • Move all the handling of joins / relations into one place:
    • Posts: tags, author
    • Tags: posts
    • Users: posts, roles
  • Make it possible to use joins in fields

Count handling

  • Change post_count include on Tag endpoint to be posts.count
  • Add tags.count to Posts endpoint and posts.count to Users endpoint

Perms & Cleanup

Provide access to more joins / relations:

  • Users by role

Maybe:

  • Allow for include of Posts from Tag or User endpoints
  • Consider adding support for relations between users and tags through posts, e.g. listing tags for an author, or listing authors for a tag - although this is probably something for a later version.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions