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

Use json:api’s /type/id/field_name URLs for fetching relationships #9

Open
agarzola opened this issue Jun 16, 2018 · 0 comments
Open
Labels
help wanted Extra attention is needed

Comments

@agarzola
Copy link
Member

agarzola commented Jun 16, 2018

Currently, we’re using the ?include=field_name query string parameter format which is optional (currently available in Drupal’s JSON API module’s implementation), but not necessarily supported by all json:api implementations. Requests to /type/id/field_name and /type/id/relationships/field_name should be made in parallel to the main request.

  • /type/id/field_name fetches the related object(s)
  • /type/id/relationships/field_name fetches the relationship itself (which might include metadata)

This method should probably be the default, with the query string parameter method being an opt-in configuration parameter.

@agarzola agarzola added the help wanted Extra attention is needed label Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant