# graphql-edtf

> Graphql Edtf Date Type

Latest version **2.0.0** (published 2023-03-01) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install graphql-edtf
pnpm add graphql-edtf
yarn add graphql-edtf
bun add graphql-edtf
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-03-01 |
| First published | 2020-06-07 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cherese Eriepa |
| Maintainers | luandro, mixmix, staltz, chereseeriepa, christianbundy, ben-tai |
| Keywords | ahau, graphql, date, edtf |

## Links

- npm: https://www.npmjs.com/package/graphql-edtf
- Repository: https://gitlab.com/ahau/graphql-edtf
- Homepage: https://gitlab.com/ahau/graphql-edtf#readme
- Issues: https://gitlab.com/ahau/graphql-edtf/issues
- npm.io page: https://npm.io/package/graphql-edtf

## Dependencies (3)

- [edtf](https://npm.io/package/edtf.md) ^2.8.0
- [graphql-date](https://npm.io/package/graphql-date.md) ^1.0.3
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.5.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-03-01
- 1.0.0 — 2020-06-07

## README

# graphql-edtf

Graphql Edtf Date Type

## Installation

```
npm i --save graphql-edtf
```

## Usage

Resolvers
```js
const { Date, EdtfDate, EdtfInterval } = require('graphql-edtf')

const resolvers = {
  Date,
  EdtfDate,
  EdtfInterval
}

```

TypeDefs
```js
const { gql } = require('apollo-server')

module.exports = gql`
  # Define scalar types for each
  scalar Date
  scalar EdtfDate
  scalar EdtfInterval

  type Person {
    id: ID!
    name: String
    aliveInterval: EdtfInterval
  }

  type Record {
    id: ID!
    name: String
    recordStartDate: EdtfDate # allows for fuzzy dates e.g. 1995? (i think the year is 1995)
  }

  type Tombstone {
    date: Date # graphql-date
  }

  type Query {
    person(id: String!): Person
    record(id: String!): Record
  }
`
```

---
_Source: https://npm.io/package/graphql-edtf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
