New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(types): Allow user.id
to be a number
#8330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update session did as well
@@ -6,7 +6,7 @@ export interface RequestSession { | |||
|
|||
export interface Session { | |||
sid: string; | |||
did?: string; | |||
did?: string | number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did
should be string - we should only be changing user.id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -1,7 +1,7 @@ | |||
/** JSDoc */ | |||
export interface User { | |||
[key: string]: any; | |||
id?: string; | |||
id?: string | number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.