graphql-compiler
graphql-compiler copied to clipboard
Standardize return format of dates and datetimes for SQL
We are not guaranteed that datetimes/dates will always be returned in the expected format of GraphQLDate/GraphQLDateTime. We can add CONVERTs to the SQL queries to ensure that the dates and datetimes are always formatted the same way.
https://www.mssqltips.com/sqlservertip/1145/date-and-time-conversions-using-sql-server/
Maybe we can make the requirement that the used DB-API, e.g. pydobc, has to return a python datetime object. This requirement is consistent with the python DB-API implementation hints https://www.python.org/dev/peps/pep-0249/#implementation-hints-for-module-authors and all of the DB-APIs that I've seen follow this standard.