-
Notifications
You must be signed in to change notification settings - Fork 181
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
toGlobalId expects ID as a string #218
Comments
intellix
added a commit
to intellix/graphql-relay-js
that referenced
this issue
Nov 12, 2018
intellix
added a commit
to intellix/DefinitelyTyped
that referenced
this issue
Nov 12, 2018
Related issue: graphql/graphql-relay-js#218 Related pull: graphql/graphql-relay-js#219
9 tasks
IvanGoncharov
added a commit
to IvanGoncharov/graphql-relay-js
that referenced
this issue
Jun 22, 2021
IvanGoncharov
added a commit
that referenced
this issue
Jun 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was debugging an issue where TypeScript complains that I'm passing a number into
toGlobalId
and that it should be a string: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/graphql-relay/index.d.ts#L293Decided to look upstream to this library and found that the same thing exists here:
graphql-relay-js/src/node/node.js
Lines 113 to 115 in da2801a
The ID parameter is very likely going to be a number, especially with it being extremely common to use autoincrement integers in database rows.
Should the type be:
string | number
? If so, I can make the PRThe text was updated successfully, but these errors were encountered: