Options property can't be re-assigned
See original GitHub issueContext
Quoting the following lines of code:
Seems like you wouldn’t be able to re-assign properties once the client is initially instantiated. What if someone wanted to parametise some of those constructor settings based on a CP? Like for example:
options: computed('session.isAuthenticated', function() {
if (session.get('isAuthenticated')) {
return {
apiURL: config.tceuFrontend.apiURL
};
} else {
return {};
}
}),
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Strange "Val cannot be reassigned" error when setting a ...
What the error message means is that since the types do not match, only the getter is considered as a property. So from...
Read more >Gradle 5.0 causes error Val cannot be reassigned when using ...
Looking into the class JacocoReportBase I can see that the class property classDirectories is not final and a valid setter has been provided....
Read more >False positive `Val cannot be reassigned` in `build.gradle.kts`
After reloading, the args assignment will be underlined, because "Val cannot be reassigned". Val cannot be reassigned. However, gradle doSomething compiles ...
Read more >Managing owners, users, and permissions - Search Console ...
Choose a property in Search Console. · Click the Settings icon Settings in the navigation pane. · Click Users & permissions. · Click...
Read more >Delegated properties | Kotlin Documentation
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: String) { println("$value has been assigned to '${property.name}' in $thisRef.") } }.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@josemarluedke @buschtoens
We ended up doing that for the project, basically separate services for separate APIs and whatnot. Can’t say I agree with apollo’s approach to state management and network interaction strategies 😄 maybe I’ll write a graphQL client myself someday
I agree with @buschtoens here.
Apollo does not allow to change config after initialized. I would actually create a new service extending from ember-apollo-client for the case where your users are authenticated.