IBM / openapi-to-graphql

Translate APIs described by OpenAPI Specifications (OAS) into GraphQL
https://developer.ibm.com/open/projects/openapi-to-graphql/
MIT License
1.61k stars 211 forks source link

Support the conversion of date & datetime format to GraphQL type #500

Open tian-sheng-low opened 11 months ago

tian-sheng-low commented 11 months ago

Just wondering if OtG has any plan to support the conversion of date/datetime format schema into graphql-scalar date types etc.

I read this issue and it seems like date/datetime type is out of the support scope, I just want to make sure that if I understand it correctly. https://github.com/IBM/openapi-to-graphql/issues/244#issuecomment-529564815

The way I see is that for the complex use cases can be handled by people saving schema and making some manual tweaks like: Adding scalars ( like Date or https://github.com/Urigo/graphql-scalars) Adding directives Adding interfaces etc. For some of those people might need to drop some extra code in the form of custom resolver but this will be much simple rather than trying to cover all those in the generic engine cases.

If that is not the case(support for date/datetime type is fine with the scope), then I am happy to send a PR for that.