Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Joins / Relations refactor #5615

Closed
1 of 11 tasks
ErisDS opened this issue Jul 29, 2015 · 0 comments
Closed
1 of 11 tasks

API: Joins / Relations refactor #5615

ErisDS opened this issue Jul 29, 2015 · 0 comments
Assignees
Labels
affects:api Affects the Ghost API

Comments

@ErisDS
Copy link
Member

ErisDS commented Jul 29, 2015

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.
@ErisDS ErisDS added the affects:api Affects the Ghost API label Jul 29, 2015
@ErisDS ErisDS added this to the Current Backlog milestone Jul 29, 2015
@ErisDS ErisDS mentioned this issue Oct 6, 2015
31 tasks
@ErisDS ErisDS modified the milestone: Current Backlog Oct 9, 2015
@ErisDS ErisDS self-assigned this Oct 13, 2015
@ErisDS ErisDS modified the milestone: Public API v1 Oct 13, 2015
@ErisDS
Copy link
Member Author

ErisDS commented Oct 18, 2015

I've moved this comment to #6009, #6008 is also related.

@ErisDS ErisDS changed the title API: Joins / Relations overhaul API: Joins / Relations refactor Oct 26, 2015
ErisDS added a commit to ErisDS/Ghost that referenced this issue Nov 3, 2015
refs TryGhost#6009, TryGhost#5615

- minimal refactor to remove the addition of count from pagination and other various points
- create a include count plugin that overrides fetch and fetchAll
- this ensures that counts get added at the right points
@ErisDS ErisDS modified the milestone: Public API v1 Dec 3, 2015
@ErisDS ErisDS added the later [triage] Things we intend to work but are not immediate priority label Sep 20, 2016
@ErisDS
Copy link
Member Author

ErisDS commented Sep 20, 2016

I'm closing most API issues temporarily with the later label.

JSON API Overhaul & OAuth access are currently scheduled next on the roadmap

@ErisDS ErisDS closed this as completed Sep 20, 2016
@ErisDS ErisDS removed the later [triage] Things we intend to work but are not immediate priority label Jan 23, 2019
@ErisDS ErisDS removed the later [triage] Things we intend to work but are not immediate priority label Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

No branches or pull requests

1 participant