-
Notifications
You must be signed in to change notification settings - Fork 100
Plain object type ? #205
Comments
+1 |
Seems like there is one pull request adding Customs obj types. |
@ostrebler I was able to pass object as variable to mutation in this example
In this mutation, user is an object and it can have any number of properties and properties can be of any type. User type is not defined anywhere. so type checking for user will not be done. |
|
Anyway is there any serious plan in near future to store in @client any arbitrary data type? Like React component, any JSON data structure, function, etc...? Without this there is no way get rid of Redux which is capable to store really anything... My intention is to have only one state manager, I like redux, but if we have Apollo I prefer make everything in Apollo ;)! |
+1 on an arbitrary data type, for example a JSON dump of translations, which we don’t need to stringify and parse each time |
+1 |
1 similar comment
+1 |
+10000 |
+20181031 |
@hwillson Hello!
Do you have a plan to integrate plain objects in the local storage? |
This is something that would be incredibly useful. I'm implementing redux which seems like a lot of overhead for this one feature. |
@hwillson has this been added to AC 2.5? thanks |
I ended up storing the object as a JSON string. Seems a bit unnecessary and I wonder how sustainable that would be with large amounts of data but it's working fine for my current use case. |
Hi,
I'm wondering if there is anything like an Object type for plain objects, just like you have Int, String, Boolean ?
I'm storing a "session" field in my local apollo state, containing a
loggedIn
boolean and acurrentUser
object :I wanna mutate this state just after login :
Look at the mutation type def for
$currentUser
: what type should I write ?I found out that it works with any type, but I'm afraid that this behaviour will break in future release since there's nothing in the doc about this (or, is there ?)
Thanks a lot for your insight.
Olivier
The text was updated successfully, but these errors were encountered: