-
Notifications
You must be signed in to change notification settings - Fork 228
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
What's the point of base64 encoded IDs and how to revert this behavior? #126
Comments
You can implement your own custom Node which should solve your problem. |
Agree with @paunovic on this one. Would be nice if there was an easy way to disable this behavior. Or better yet, have it disabled by default. Seems like this is adding complexity for the sake of complexity. |
https://relay.dev/docs/guides/graphql-server-specification/ This is a quote from the relay GQL Server spec. Since our repo follows that implementation, I think we should stick to Spec, but enable users to customize this behavior without having to implement custom nodes. I'm open to suggestions on how to achieve that or further discussion. |
This was solved by the customizable You can add a GlobalIDType that doesn't convert the IDs to Base64 and doesn't add any Type Info to the ID, or use |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue. |
Library returns B64 encoded ID fields instead normal int IDs as they are defined in my models. Right now I am using workaround where I define custom
row_id
field and resolver for each model:Can I globally disable B64 IDs? This is similar question as the issue #102.
I tried putting following code in my
graphql/models.py
file to try to revert this behavior:...but no dice. Graphene still converts
id
fields to B64 encoded pairs.Any insight would be appreciated.
The text was updated successfully, but these errors were encountered: