Skip to content

Remove IDs from GraphQL API #47

@alancleary

Description

@alancleary

By the time I'm done with #43 I will have queried every single field and subfield in our GraphQL API. What I've found while doing this is that many top-level, or "entrypoint", fields that get a single element by ID are expecting the Intermine "id" as the parameter instead of the Intermine "identifier". This is because Intermine uses the "id" as the foreign key for relationships so we need to use this internally to compute subfields. However, we want users of the GraphQL API to use the Intermine identifier when requesting specific objects because this key has meaning outside of Intermine.

The technical solution is that we need to update the Intermine data source to allow getting specific elements by their id or identifier. Then internally we can get subfields by id and externally we'll get elements by identifier. Once this is in place, I think we should completely remove the id field from all types in the GraphQL API to avoid confusing the user, i.e. identifiers will be the only externally visible IDs and ids will be an internal implementation detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions