Skip to content

Commit

Permalink
feat(types): change dates to graphql-iso-date
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Sep 11, 2018
1 parent 5857bf1 commit 0dcc253
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 6 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"url": "https://github.com/lgaticaq/sequelize-graphql-tools/issues"
},
"homepage": "https://github.com/lgaticaq/sequelize-graphql-tools#readme",
"dependencies": {},
"dependencies": {
"graphql-iso-date": "3.5.0"
},
"devDependencies": {
"chai": "4.1.2",
"eslint": "4.19.1",
Expand Down
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ const {
GraphQLObjectType,
GraphQLString
} = require('graphql/type')
const {
TypeComposer,
InputTypeComposer,
GraphQLDate
} = require('graphql-compose')
const { TypeComposer, InputTypeComposer } = require('graphql-compose')
const { GraphQLDate, GraphQLDateTime } = require('graphql-iso-date')
const graphqlFields = require('graphql-fields')
const sequelize = require('sequelize')

Expand Down Expand Up @@ -351,7 +348,7 @@ const sequelizeTypeToGraphQLType = type => {
STRING: GraphQLString,
TEXT: GraphQLString,
UUID: GraphQLString,
DATE: GraphQLDate,
DATE: GraphQLDateTime,
DATEONLY: GraphQLDate,
TIME: GraphQLString,
BIGINT: GraphQLString,
Expand Down

0 comments on commit 0dcc253

Please sign in to comment.