Skip to content
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

Allow for composite identifiers delimited by / #163

Merged
merged 1 commit into from
Aug 30, 2023

Commits on Aug 28, 2023

  1. Allow for composite identifiers delimited by /

    This commit extends global id to allow representing models with composite
    identifiers. The value will be joined by `/`. For example:
    
    Given a `TravelRoute` model with `origin` and `destination` as the
    compsoite primary key, the global id will be represented as:
    
    ```
    TravelRoute.new(origin: "Ottawa", destination: "New York").to_global_id
    => gid://app/TravelRoute/Ottawa/New%20York
    ```
    
    Co-authored-by: Adrianna Chang <[email protected]>
    Co-authored-by: Nikita Vasilevsky <[email protected]>
    adrianna-chang-shopify and nvasilevski committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    5ce154c View commit details
    Browse the repository at this point in the history