René's URL Explorer Experiment


Title: Use `records` for joined resources · Issue #1308 · JSONAPI-Resources/jsonapi-resources · GitHub

Open Graph Title: Use `records` for joined resources · Issue #1308 · JSONAPI-Resources/jsonapi-resources

X Title: Use `records` for joined resources · Issue #1308 · JSONAPI-Resources/jsonapi-resources

Description: This issue is a (choose one): Problem/bug report. Feature request. Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead. Checklist before submitting: I've searched for an existing issu...

Open Graph Description: This issue is a (choose one): Problem/bug report. Feature request. Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead. Checklist before submit...

X Description: This issue is a (choose one): Problem/bug report. Feature request. Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead. Checklist before submit...

Opengraph URL: https://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use `records` for joined resources","articleBody":"## This issue is a (choose one):\r\n\r\n- [ ] Problem/bug report.\r\n- [x] Feature request.\r\n- [ ] Request for support. **Note: Please try to avoid submitting issues for support requests. Use [Gitter](https://gitter.im/cerebris/jsonapi-resources) instead.** \r\n\r\n## Checklist before submitting:\r\n\r\n- [ ] I've searched for an existing issue.\r\n- [ ] I've asked my question on [Gitter](https://gitter.im/cerebris/jsonapi-resources) and have not received a satisfactory answer.\r\n- [ ] I've included a complete [bug report template](https://github.com/cerebris/jsonapi-resources/blob/master/lib/bug_report_templates/rails_5_master.rb). This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.\r\n- [X] The feature I'm asking for is compliant with the [JSON:API](http://jsonapi.org/) spec.\r\n\r\n## Description\r\n\r\n**Current:**\r\n\r\nIn version 0.9 and earlier JR relied on the Rails eager loading using the ActiveRecord `includes`. In a typical Rails app this feature works great, but we ran into a lot of edge cases and performance compromises when auto generating the queries JR needs for complex requests - especially ones with complex includes. In addition the complexity grew with caching.\r\n\r\nWith this approach we recommended that related resources be controlled using `relation_name` on the relationship. This relation was used in the includes and provides a way to control the related resources.\r\n\r\nWith version 0.10 the approach was changed and we no longer use rails eager loading. The `relation_name` on the relationship can still be used for relationship filtering.\r\n\r\nThere is also the option of using the `apply_join` callable on the relationship.\r\n\r\nBoth of the above options however require explicitly wiring up the appropriate code on each relationship.\r\n\r\n**Proposed change:**\r\n\r\nWhen joining related records in `ActiveRelationResource.apply_join` we have to opportunity to use ActiveRecord's `merge` method to apply the related resource's `records` logic. The implication of this is all accesses to a Resource will use the same `records` applied logic whether coming to the resource as the primary resource in a request, as an included resource, or through the `related` link of the parent resource.\r\n\r\nI believe this one change should drastically simplify resource authentication and opens up some further opportunities to further simplify most resources.\r\n","author":{"url":"https://github.com/lgebhardt","@type":"Person","name":"lgebhardt"},"datePublished":"2020-02-10T13:10:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1308/jsonapi-resources/issues/1308"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a7a4927b-b461-9f5e-e651-0261fde89104
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE99C:47EDE:1C0D0D9:281E34C:6A4F7F10
html-safe-noncea1be5dc0aebde2f624ec0792099ea2a8ee8a6a0cc1194db8d421c4fe42265f1e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTlDOjQ3RURFOjFDMEQwRDk6MjgxRTM0Qzo2QTRGN0YxMCIsInZpc2l0b3JfaWQiOiI1NDQ5OTA1NjE1OTUzNDI4MjQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfad7cd7d9c0acd794fe89864bca5ee2538f01489a7e38ad44baf4b7991807907
hovercard-subject-tagissue:562550275
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPI-Resources/jsonapi-resources/1308/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d3aa2629de07ee5031af379a9b99592fb879266989eedfdeaf8dbf87300bc3ee/JSONAPI-Resources/jsonapi-resources/issues/1308
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d3aa2629de07ee5031af379a9b99592fb879266989eedfdeaf8dbf87300bc3ee/JSONAPI-Resources/jsonapi-resources/issues/1308
og:image:altThis issue is a (choose one): Problem/bug report. Feature request. Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead. Checklist before submit...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelgebhardt
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/JSONAPI-Resources/jsonapi-resources git https://github.com/JSONAPI-Resources/jsonapi-resources.git
octolytics-dimension-user_id262422067
octolytics-dimension-user_loginJSONAPI-Resources
octolytics-dimension-repository_id18248068
octolytics-dimension-repository_nwoJSONAPI-Resources/jsonapi-resources
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id18248068
octolytics-dimension-repository_network_root_nwoJSONAPI-Resources/jsonapi-resources
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPI-Resources%2Fjsonapi-resources%2Fissues%2F1308
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPI-Resources%2Fjsonapi-resources%2Fissues%2F1308
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONAPI-Resources%2Fjsonapi-resources
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308
Reloadhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308
Please reload this pagehttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308
JSONAPI-Resources https://github.com/JSONAPI-Resources
jsonapi-resourceshttps://github.com/JSONAPI-Resources/jsonapi-resources
Notifications https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Fork 543 https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Star 2.3k https://github.com/login?return_to=%2FJSONAPI-Resources%2Fjsonapi-resources
Code https://github.com/JSONAPI-Resources/jsonapi-resources
Issues 208 https://github.com/JSONAPI-Resources/jsonapi-resources/issues
Pull requests 52 https://github.com/JSONAPI-Resources/jsonapi-resources/pulls
Discussions https://github.com/JSONAPI-Resources/jsonapi-resources/discussions
Actions https://github.com/JSONAPI-Resources/jsonapi-resources/actions
Projects https://github.com/JSONAPI-Resources/jsonapi-resources/projects
Wiki https://github.com/JSONAPI-Resources/jsonapi-resources/wiki
Security and quality 0 https://github.com/JSONAPI-Resources/jsonapi-resources/security
Insights https://github.com/JSONAPI-Resources/jsonapi-resources/pulse
Code https://github.com/JSONAPI-Resources/jsonapi-resources
Issues https://github.com/JSONAPI-Resources/jsonapi-resources/issues
Pull requests https://github.com/JSONAPI-Resources/jsonapi-resources/pulls
Discussions https://github.com/JSONAPI-Resources/jsonapi-resources/discussions
Actions https://github.com/JSONAPI-Resources/jsonapi-resources/actions
Projects https://github.com/JSONAPI-Resources/jsonapi-resources/projects
Wiki https://github.com/JSONAPI-Resources/jsonapi-resources/wiki
Security and quality https://github.com/JSONAPI-Resources/jsonapi-resources/security
Insights https://github.com/JSONAPI-Resources/jsonapi-resources/pulse
#1307https://github.com/JSONAPI-Resources/jsonapi-resources/pull/1307
Use records for joined resourceshttps://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308#top
#1307https://github.com/JSONAPI-Resources/jsonapi-resources/pull/1307
https://github.com/lgebhardt
Type: Enhancementhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues?q=state%3Aopen%20label%3A%22Type%3A%20Enhancement%22
https://github.com/lgebhardt
lgebhardthttps://github.com/lgebhardt
on Feb 10, 2020https://github.com/JSONAPI-Resources/jsonapi-resources/issues/1308#issue-562550275
Gitterhttps://gitter.im/cerebris/jsonapi-resources
Gitterhttps://gitter.im/cerebris/jsonapi-resources
bug report templatehttps://github.com/cerebris/jsonapi-resources/blob/master/lib/bug_report_templates/rails_5_master.rb
JSON:APIhttp://jsonapi.org/
lgebhardthttps://github.com/lgebhardt
Type: Enhancementhttps://github.com/JSONAPI-Resources/jsonapi-resources/issues?q=state%3Aopen%20label%3A%22Type%3A%20Enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.