Chris Carnell


20 Experience
0 Lessons Completed
0 Questions Solved


Posted in Episode on GraphQL

Seconding this request. It's a hot topic and I'd like to indulge my front-end devs by providing them with a GraphQL API for them to work against.

Curious as to why you couldn't keep the logic in the ERB and cache the list scoped to the role, rather than the user?

Your role counts are going to be very limited, whereas your user count is not. With roles, you'll have a few caches, but not a ton, and you benefit from keeping that logic on the server.

Am I missing something with this approach?

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.