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.
<edits>
- Commit 24e8445 adds the necessary resolver support
- Commit 103f5c8 adds support for
format=jsonobjects queries, which is required to recover model class information from query responses
</edits>
The following types should be updated to use this approach:
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
Traittype can have a value for itsqtlStudyfield or itsgwasfield, 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.<edits>
format=jsonobjectsqueries, which is required to recover model class information from query responses</edits>
The following types should be updated to use this approach:
chromsome/supercontig->locatedOnCommits e65b104 and bcc8c50featureCommit 4c41818qtlStudy/gwas->study; removeqltsandgwasResultssince they can be accessed viastudybioEntities; already generalized to type[BioEntity!]!but not implemented correctlychildFeaturesandoverlappingFeatures; both fields are already generalized to type[SequenceFeature!]!but are not implemented correctlychromsomeLocation/supercontigLocation->locationchromsomeandsupercontigcan be removed because they will be accessible vialocation.locatedOnfeature; already generalized to typeSequenceFeaturebut not implemented correctlytranscripts; already generalized to type[Transcript!]!but not implemented correctly