message: Added numeric input support for DateTime
diff: @@ -42,20 +42,20 @@ export default new GraphQLScalarType({
  },
  parseLiteral(ast) {
  - if (ast.kind !== Kind.STRING) {
  + if (ast.kind !== Kind.STRING && ast.kind !== Kind.INT) {
  throw new GraphQLError(
  - `Can only parse strings to dates but got a: ${ast.kind}`,
  + `Can only parse strings & integers to dates but got a: ${ast.kind}`,
  );
  }
  - const result = new Date(ast.value);
  + const result = new Date(ast.kind === Kind.INT ? Number(ast.value) : ast.value);
  // eslint-disable-next-line no-restricted-globals
  if (Number.isNaN(result.getTime())) {
  throw new GraphQLError(`Value is not a valid Date: ${ast.value}`);
  }
  - if (ast.value !== result.toJSON()) {
  + if (ast.kind === Kind.STRING && ast.value !== result.toJSON()) {
  throw new GraphQLError(
  `Value is not a valid Date format (YYYY-MM-DDTHH:MM:SS.SSSZ): ${
  ast.value
  