Skip to content

Allow to use other types of global identifier for Relay #1276

Closed
@tcleonard

Description

@tcleonard

Is your feature request related to a problem? Please describe.
As far as I can see in the Relay standard documentation, the solution that was chosen in the Python Relay implementation (to make the node id the base64 version of "type: id" of the object) is just an example and not a requirement.

Describe the solution you'd like
We could allow other type of unique identifier... for example the user could choose to use UUIDs.
This could either be selected via various implementation in graphene (with a setting variable) or we could even let the user specify its own type of ID with validators.
It can be particularly useful when the database primary keys of the objects served by the GraphQL API already are global identifiers and don't need any particular tweaks that make them opaque for no reason.

Additional context
I have decided to post the issue on this repository but it is valid for both graphql_relay and graphene as they have both been implemented in such a way and act in concert...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions