As a follow up, managed to make it work. Changed the query engine to Comunica, and set up the context in the following way:
const context: Context = {
sources: [
{
type: "sparql",
value: "https://sd-xxxxx.stardog.cloud:5820/databasename/query",
},
],
httpAuth:
"user:password",
};
Can confirm it works for reading, writing, updating and deleting. I cannot express how much this helps our codebase and development. Highly recommended!