feat(types): Allow user.id to be a number#8330
Conversation
HazAT
left a comment
There was a problem hiding this comment.
Update session did as well
| export interface Session { | ||
| sid: string; | ||
| did?: string; | ||
| did?: string | number; |
There was a problem hiding this comment.
https://develop.sentry.dev/sdk/sessions/#session-update-payload
did is typed as string in Relay. If we wanna allow number here we have to stringify it before sending.
There was a problem hiding this comment.
did should be string - we should only be changing user.id
There was a problem hiding this comment.
We can change what we allow here but we should only send the stringified version. Which we already do - I think Daniel found that out.
| export interface User { | ||
| [key: string]: any; | ||
| id?: string; | ||
| id?: string | number; |
There was a problem hiding this comment.
Looks like relay theoretically allows numbers here:
LenientString is like python's str(). We should still double check this.
There was a problem hiding this comment.
LenientString allows any json type
user.id to be number
user.id to be numberuser.id to be a number
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
No description provided.