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

Update type fields to use union types / interfaces #154

Open
9 tasks
alancleary opened this issue Mar 26, 2024 · 0 comments
Open
9 tasks

Update type fields to use union types / interfaces #154

alancleary opened this issue Mar 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@alancleary
Copy link
Contributor

alancleary commented Mar 26, 2024

Currently the GraphQL types are basically a verbatim implementation of the InterMine types. This means certain types contain fields that are mutually exclusive. For example, the Trait type can have a value for its qtlStudy field or its gwas field, but not both. The canonical way to handle this in GraphQL is to use a single field with a union or interface as its type. This will make the semantics of our GraphQL API more obvious and simplify client code that uses these types while enabling canonical functionality, e.g. filtering queries/results by type.

<edit>
Commit 24e8445 adds the necessary resolver support.
</edit>

The following types should be updated to use this approach:

  • Location: chromsome/supercontig -> locatedOn
  • Trait: qtlStudy/gwas -> study; remove qlts and gwasResults since they can be accessed via study
  • DataSet: bioEntities; already generalized to type [BioEntity!]! but not implemented correctly
  • SequenceFeature:
    • childFeatures and overlappingFeatures; both fields are already generalized to type [SequenceFeature!]! but are not implemented correctly
    • chromsomeLocation/supercontigLocation -> location
    • chromsome and supercontig can be removed because they will be accessible via location.locatedOn
  • ExpressionValue: feature; already generalized to type SequenceFeature but not implemented correctly
  • PanGeneSets: transcripts; already generalized to type [Transcript!]! but not implemented correctly
@alancleary alancleary added the enhancement New feature or request label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant