Skip to content

Instantly share code, notes, and snippets.

@ghiculescu
Created April 28, 2025 06:42
Show Gist options
  • Select an option

  • Save ghiculescu/fa28b988c64e4ca9bc442dbd1d976858 to your computer and use it in GitHub Desktop.

Select an option

Save ghiculescu/fa28b988c64e4ca9bc442dbd1d976858 to your computer and use it in GitHub Desktop.
G'day Claude. I am trying to remove all use of Graphql from the codebase. To do that I need to rebuild some pages that are currently built in React with a Graphql backend. I would like to build them in our stack that uses Hotwire + Rails + HAML, this is more common throughout the product and is our preferred stack.
We will start with pay groups. There's 3 mutations, see Mutations::UpdatePayGroup, Mutations::CreatePayGroup, Mutations::DestroyPayGroup. All the current UI & functionality lives in <path>. The model is PayGroup. Do not make any changes to the model.
So we need a controller that supports seeing a list of pay groups, creating a new one, viewing/editing an existing one, and deleting one. Full CRUD. And then we need views for that. The views can be very simple.
A good set of views & controllers to base this off would be those for Payroll accounts. They all live in <path> and the controller is at Payroll::AccountsController. The model is Payroll::Account.
Please create a new controller & new views, that are wired up and work correctly.
Do not commit any code.
If you are not sure about something ask me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment