legumeinfo / graphql-server

A GraphQL server that supports the Legume Information System and related biodata websites
Apache License 2.0
2 stars 3 forks source link

Add descriptors to API entrypoints #161

Open alancleary opened 1 month ago

alancleary commented 1 month ago

Currently the API only uses the singular and plural form of type names, e.g. gene and genes. The singular always gets a type by identifier and throws an error if it's not found. The plural, however, may be a search for the type or an endpoint that retrieves more than one element of the type. This is ambiguous and is becoming an issue both for end users and when interpreting the code. For this reason, a descriptor should be added to each endpoint that describes what it's doing, e.g. getGene, getGenes, and searchGenes. This will also be useful as we start to add endpoints for analyses, e.g. findOverlaps.