Right now our actions are called stuff like QUERY_RESULT, etc. That might result in a collision with actions someone might already have in their app. We might want to namespace our actions with a prefix that contains the name APOLLO, which will make collisions basically impossible.
We might want to loop this in with a different breaking change since it doesn't seem to be worth a minor version bump on its own.
I totally agree. We should namespace.
APOLLO_* sounds good?
Guess we're going with APOLLO_!
ALRIGHT, assign to me? I got you
Is a global APOLLO with things like APOLLO.* worth consideration?
I thought if you import apollo it's done this way for you.
Sorry and disregard if junior question.
These action types aren't really for consumers. They're part of the internal api for the client.
@MasterJames this is about namespacing Redux action types, which are just strings, and don't have a standard namespacing schemes.
@abhiaiyer91 do you think we should consider this a breaking change? We didn't really document the action names before, so maybe it isn't? Hard to say.
Its not breaking to any users. Unless people are relying on these action types in their apps? @jbaxleyiii do you guys?
Yeah if they don't then it's probably fine
@stubailo @abhiaiyer91 we don't!
Alright abhi go for it!
Food for thought but probably not related enough to reconsider dotting at least.
https://github.com/reactjs/redux/issues/786
Call me old fashioned but I would just use a dictionary in an apollo global namespace for action strings if not the vales themselves directly. Maybe if it was a subscription the server could provide the variation desired and discussed in the thread. Object merge overwriting raw js is also is a kind of hotcode logic I've been exploring lately but I guess it's not directly related here either.
Thanks for listening between the lines and thinking beyond the limits of convention.
Done!
Thanks @abhiaiyer91! Great work.
Most helpful comment
APOLLO_*sounds good?