Open RubenVerborgh opened 3 years ago
Actually, something like this may already work (untested):
{
"@id": "ex:myComponentInstance",
"ex:param": { "@id": "ex:myVariable" }
}
{
"@id": "ex:myVariable",
"value": "123"
}
They can act as a default that can be overwritten by configuration. (On that note… can we overwrite any component? 😛)
On that note… can we overwrite any component?
You can only overwrite default values in parameters. If you actually instantiate a param's value, you can only append values, not overwrite them.
value
conformed working (for variables); I love it.
Mmm, was too soon. Seems like variables with a configured value
cannot be overridden.
Actually, something like this may already work (untested):
{ "@id": "ex:myComponentInstance", "ex:param": { "@id": "ex:myVariable" } }
{ "@id": "ex:myVariable", "value": "123" }
Actually, only the first one works; the second one does not.
Variables have been added to Components.js in v3.6.0. We can set them programmatically: https://github.com/solid/community-server/blob/e1533a0869071bbeabf0edfdfd05ccf57883cdaa/src/init/CliRunner.ts#L42-L46
However, could I also give them a value inside the Components.js config? https://github.com/solid/community-server/commit/1dd140ab61845ae8df67c16883136736146549dd#diff-fec64cbd09e800f0351eb81eaaef521a1b9fecef9f81a3584d513e4f1266b6c0R4-R15 That might be handy to propagate string/number values around.