Hi there! I’m trying to convert the TypeSense API ...
# community-help
p
Hi there! I’m trying to convert the TypeSense API to GraphQL with GraphQL Mesh and that seems to be going well. However the spec https://github.com/typesense/typesense-api-spec/blob/master/openapi.yml isn’t ‘live’, as in: It doesn’t describe the fields, etc. of the documents. Might it be possible to get a ‘live’ endpoint that also describes all possible schema’s? The way it works, is that the GraphQL Mesh openapi handler will automatically convert any written openapi specification to a fully compatible GraphQL schema. If the Openapi schema is describing the current API sufficiently enough it will expose everything to GraphQL. Is that something you guys might be interested in?
k
Hi Paul, can you please elaborate what you mean by "doesn't describe the fields"?
p
It would specifically be amazing if this could be more detailed: https://github.com/typesense/typesense-api-spec/blob/master/openapi.yml#L1440 So the type of actual possible documents are exposed.
j
Documents are fully user-defined key-value pairs… since users can store any JSON objects in Typesense
p
Yeah I understand that but ‘user defined’ usually means ‘backend developer defined’, woud be nice if a ‘frontend developer’ could get the expected document structure, wouldn’t it?
j
I see… You’d essentially have to fork that openapi spec and add your documents’ structure to it
p
Yeah, that is the plan right now. But if it was exposed from a typesense instance it could do that automatically