Extending a spark extension?
I'm working with ash_graphql. The codebase I'm working in has a bunch of old non-ash JSON:API routes. There's a part of the application that decides whether or not to send requests to the DB read replica or the writer, which for the old JSON:API stuff was wired up to go to the writer if it was a POST request, or also if it was in a list of ignored routes.
For graphql this breaks down since everything comes through a POST, so I'm reworking how it decides to use the reader when it's an ash_graphql request. In general I can anchor on whether it's a query or mutation, however some queries will end up doing writes as well. So, I'm hoping to be able to have a simple way to just tack on an extra config to any query in the
tl;dr, I'd like a way to add a new piece of config to the various
For graphql this breaks down since everything comes through a POST, so I'm reworking how it decides to use the reader when it's an ash_graphql request. In general I can anchor on whether it's a query or mutation, however some queries will end up doing writes as well. So, I'm hoping to be able to have a simple way to just tack on an extra config to any query in the
graphql queries block that allows marking that query as intended to use the writer.tl;dr, I'd like a way to add a new piece of config to the various
queries config objects that some custom plug would be able to hook into. I swear I've seen some way to do this in docs somewhere but it's eluding me now 