USCbiostats / annoq-site

0 stars 2 forks source link

If possible add swagger UI to API V2 #52

Open mugitty opened 1 month ago

mugitty commented 1 month ago

API V2 has uses Graphql. Add Swagger if possible

tmushayahama commented 3 weeks ago

@mugitty just to comment on this, api v2 is not a REST api, therefore swagger cannot do. Better find other tools suitable for the it and its schema

mugitty commented 3 weeks ago

@tmushayahama , we have to find something that can translate Graphql into something that looks like swagger

tmushayahama commented 3 weeks ago

@mugitty As I mentioned earlier, it is impossible to use Swagger or OpenAPI for our GraphQL API because Swagger is designed exclusively for REST APIs which operate quite differently. GraphQL, uses a single endpoint and allows clients to make dynamic queries to fetch exactly what they need, which differs significantly from the fixed and multiple endpoint structure of REST APIs. AnnoQ has dynamic queries as it has many columns and combinations and result format

For more detailed information on GraphQL and its distinct architecture, please refer to the official documentation: GraphQL.org. I would recommend exploring tools specifically designed for GraphQL, such as:

Apollo Studio: Offers a powerful platform for composing, validating, and testing GraphQL queries, as well as monitoring API usage and performance. You can see it in action with the SpaceX API here: Apollo Studio - SpaceX API These tools align better with the capabilities and needs of GraphQL and will help ensure v2 API is documented and managed effectively.