-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISO date format support #621
Conversation
@@ -1,11 +1,13 @@ | |||
import { | |||
GraphQLInt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor cleaned up the off by one space and invalid indentation within this import. Nothing else changed within these braces
Codecov Report
@@ Coverage Diff @@
## master #621 +/- ##
=========================================
- Coverage 94.17% 91.7% -2.47%
=========================================
Files 12 13 +1
Lines 395 410 +15
=========================================
+ Hits 372 376 +4
- Misses 23 34 +11
Continue to review full report at Codecov.
|
This will likely have to be considered a breaking change right? |
I'd definitely consider this a breaking change. Sorry about the yarn.lock, new PR coming. |
src/typeMapper.js
Outdated
@@ -68,12 +69,15 @@ export function toGraphQL(sequelizeType, sequelizeTypes) { | |||
if (sequelizeType instanceof FLOAT || | |||
sequelizeType instanceof DOUBLE) return GraphQLFloat; | |||
|
|||
if (sequelizeType instanceof DATE || | |||
sequelizeType instanceof DATEONLY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is DATEONLY parsed as a date objecti n Sequelize? Isn't it just a date string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on the version and the latest is String. See sequelize/sequelize#4858 I'll switch it back String to be on the safe side.
The new DateType should be exported via src/index |
Thanks for the review and quick merge! |
The import is bad, the file name is "dateType" not DateType. I installed the module today and it failed because of that. Error: Cannot find module './types/DateType' |
PR is in the queue. #622 |
Hopefully @mickhansen will merge it quickly. |
ISO date format based off the code from #166