Closed IlyaKhalizov closed 3 years ago
In JSON:API relationships contain relationship identifiers - i.e. only the type/id of the related resource. To get the attributes, you have to use the include
query parameter, which will add the full resource to the included
top-level member of the JSON document.
I think that answers your question. If not, please re-open the issue and provide more detail about what you're asking!
PS: This issue is in the wrong repository - if you do need to re-open the issue, please open it in laravel-json-api/laravel
.
@lindyhopchris Sorry, maybe I was miss understood, I do not get "included" section when my query is like via /api/v1/categories?include=parent, do we speak about same things?
Oh right sorry, I was confused by the formatting in the issue description.
What you're trying to do is fully unit tested, so isn't a bug with this package. Is there a scenario where the parent relationship could have a relationship value but the inverse model doesn't exist?
This will be pretty hard for me to debug in your application so you're probably going to need to debug it yourself. If you have more information to give, please can you open an issue in the correct repository?
Thank you, we will try to debug and if find unresolvable situation let you know.
Hi!
Schema: