Skip to content

Commit 7a0fc43

Browse files
committed
Improve document of special case scalar types
1 parent 5ab1a1c commit 7a0fc43

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
99
### Added
1010

1111
- Support customizing the name of the context type. [#66](https://github.com/davidpdrsn/juniper-from-schema/pull/66)
12+
- Improve documentation of special case scalar types.
1213

1314
### Changed
1415

juniper-from-schema/src/lib.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//! - [GraphQL features](#graphql-features)
1414
//! - [The `ID` type](#the-id-type)
1515
//! - [Custom scalar types](#custom-scalar-types)
16+
//! - [Special case scalars](#special-case-scalars)
1617
//! - [Interfaces](#interfaces)
1718
//! - [Union types](#union-types)
1819
//! - [Input objects](#input-objects)
@@ -260,10 +261,22 @@
260261
//! pub struct Cursor(pub String);
261262
//! ```
262263
//!
263-
//! `Date` and `DateTime` are the two exceptions to this. `Date` gets converted into
264-
//! [`chrono::naive::NaiveDate`](https://docs.rs/chrono/0.4.6/chrono/naive/struct.NaiveDate.html)
265-
//! and `DateTime` into
264+
//! ## Special case scalars
265+
//!
266+
//! A couple of scalar names have special meaning. Those are:
267+
//!
268+
//! - `Url` becomes
269+
//! [`url::Url`](https://docs.rs/url/2.1.0/url/struct.Url.html).
270+
//! - `Uuid` becomes
271+
//! [`uuid::Uuid`](https://docs.rs/uuid/0.7.4/uuid/struct.Uuid.html).
272+
//! - `DateTime` becomes
266273
//! [`chrono::DateTime<chrono::offset::Utc>`](https://docs.rs/chrono/0.4.6/chrono/struct.DateTime.html).
274+
//! - `Date` becomes
275+
//! [`chrono::naive::NaiveDate`](https://docs.rs/chrono/0.4.6/chrono/naive/struct.NaiveDate.html).
276+
//!
277+
//! Juniper doesn't support [`chrono::Date`](https://docs.rs/chrono/0.4.9/chrono/struct.Date.html)
278+
//! so therefore this library cannot support that either. You can read about Juniper's supported
279+
//! integrations [here](https://docs.rs/juniper/0.13.1/juniper/integrations/index.html).
267280
//!
268281
//! ## Interfaces
269282
//!

0 commit comments

Comments
 (0)