-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
What is the best practice for registering graphql APIs? This is a different framework than OpenAPI (see any number of blog posts). There are converters, but there is a big impedance mismatch between the frameworks meaning any automated conversion will likely be unsatisfactory.
For example, using https://github.com/yarax/swagger-to-graphql on MyChem.info
$ curl http://smart-api.info/api/metadata/8f08d1446e0bb9c2b323713ce83e2bd3 > mychem.json
$ swagger-to-graphql --swagger mychem.json
type get_drug_drugid {
# default field
empty: String
}
type get_query {
# default field
empty: String
}
# DrugBank ID, InCHIKey, CHEBI ID, CHEMBL ID
input param_get_drug_drugid_drugid {
# default field
empty: String
}
# Query string. Examples "Fludara", "CHEMBI:63599", "DB01073".
input param_get_query_q {
# default field
empty: String
}
type Query {
viewer: viewer
}
type viewer {
get_query(q: param_get_query_q): get_query
get_drug_drugid(drugid: param_get_drug_drugid_drugid): get_drug_drugid
}
it's not clear what the best practice should be. Should we create a stub entry for the main graphql path? What is the best way of pointing to the garphql schema?
Metadata
Metadata
Assignees
Labels
No labels