question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deeply Nested Relationship Inclusion

See original GitHub issue
GET /articles/1?include=comments.author HTTP/1.1
Accept: application/vnd.api+json

Note: Because compound documents require full linkage (except when relationship linkage is excluded by sparse fieldsets), intermediate resources in a multi-part path must be returned along with the leaf nodes. For example, a response to a request for comments.author should include comments as well as the author of each of those comments.

Note: A server may choose to expose a deeply nested relationship such as comments.author as a direct relationship with an alias such as comment-authors. This would allow a client to request /articles/1?include=comment-authors instead of /articles/1?include=comments.author. By abstracting the nested relationship with an alias, the server can still provide full linkage in compound documents without including potentially unwanted intermediate resources.

Will also need to include support for Sparse Fieldsets of included relationships

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
jaredcnancecommented, Jul 23, 2018

There is definitely enough demand and motivation to begin work on this feature. Unless someone else gets to it first, I will likely begin working on it after some in-flight work is completed (#326, #340, #344). If someone else wants to begin work on this, feel free to ping me on the Gitter channel and I’ll be available to answer any questions.

1reaction
NullVoxPopulicommented, Jul 2, 2018

I’d say this is an essential feature of jsonapi and is one of the biggest things that allows jsonapi to “compete” with features of graphql / custom-solutions.

nested includes is a must have for any generic jsonapi implementation (unless you’re netflix, apparently)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep Nested Relationship - Power Platform Community
Deep Nested Relationship ... For each teacher, there can be multiple feedback ... This update underscores our commitment to inclusivity.
Read more >
Deeply nested relationships
Hello everyone, Recently I faced problem accessing and filtering deeply nested relationship, so I decided to seek for a help. So, I have...
Read more >
Laravel Eloquent: eager loading of multiple nested ...
When eager load nested relationships and we want to select just some columns and not all using relationship:id,name , always include the ...
Read more >
Nested relation based database knowledge representation
inclusion and ungrouping, for provid- ing a canonical formal framework of nested relation based knowledge representation. 1. Introduction. Knowledge.
Read more >
Filter on (nested) relationship attribute?
Another I'm wondering is how to filter on nested relationships. Image the author has a nationality relationship with a alpha2-code attribute ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found