api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.45k stars 878 forks source link

fix(laravel) graphQl Relationship loading #6792

Closed toitzi closed 1 week ago

toitzi commented 1 week ago
Q A
Branch? 4.0
Tickets https://github.com/api-platform/api-platform/discussions/2795, #6791
License MIT
Doc PR -

This is still work in progress and needs feedback

toitzi commented 1 week ago

@soyuka Drafting this for now since there probably is some cleanup to do. Also not sure yet if this is the way this should be implemented (see my comments in https://github.com/api-platform/api-platform/discussions/2795).

soyuka commented 1 week ago

Thanks so much for this, I should've pointed you to linkClass and linkProperty completely forgot about them...

toitzi commented 1 week ago

@soyuka I think it is fine now. PR is done, switched to dependency injection and made a funtion for duplicated code

Should be ready to merge now!

Edit: And no worries about the linkClass i like debugging and digging deeper into the codebase, helps me understand it a bit better, which is great for the future. Thanks for you feedback i really appriciate it!

soyuka commented 1 week ago

Thanks for the fix!