From 192cec2a99899b4d8935a92a1b434c7a1e8b6f03 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 23 Aug 2022 18:56:25 +0200 Subject: [PATCH] Added youtube links to documentation --- .../hotchocolate/defining-a-schema/scalars.md | 23 ++++++++++++++++++- .../performance/persisted-queries.md | 4 ++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/website/src/docs/hotchocolate/defining-a-schema/scalars.md b/website/src/docs/hotchocolate/defining-a-schema/scalars.md index 08b9fef916d..092e83ec468 100644 --- a/website/src/docs/hotchocolate/defining-a-schema/scalars.md +++ b/website/src/docs/hotchocolate/defining-a-schema/scalars.md @@ -174,6 +174,28 @@ public class Startup Notice how our code uses `int` for the `Id`, but in a request / response it would be serialized as a `string`. This allows us to switch the CLR type of our `Id`, without affecting the schema and our clients. +# GraphQL Community Scalars + +The website https://www.graphql-scalars.com/ hosts specifications for GraphQL scalars defined by the community. The community scalars use the `@specifiedBy` directive to point to the spec that is implemented. + +```graphql +scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122") +``` + +## DateTime Type + +A custom GraphQL scalar which represents an exact point in time. This point in time is specified by having an offset to UTC and does not use time zone. + +The DateTime scalar is based RFC3339. + +```SDL +scalar DateTime @specifiedBy(url: "https://www.graphql-scalars.com/date-time/") +``` + + + # .NET Scalars In addition to the scalars defined by the specification, Hot Chocolate also supports the following set of scalar types: @@ -186,7 +208,6 @@ In addition to the scalars defined by the specification, Hot Chocolate also supp | `Long` | Signed 64-bit numeric non-fractional value | | `Decimal` | .NET Floating Point Type | | `Url` | Url | -| `DateTime` | ISO-8601 date time | | `Date` | ISO-8601 date | | `TimeSpan` | ISO-8601 duration | | `Uuid` | GUID | diff --git a/website/src/docs/hotchocolate/performance/persisted-queries.md b/website/src/docs/hotchocolate/performance/persisted-queries.md index 32d0a9c6573..d924cb6d996 100644 --- a/website/src/docs/hotchocolate/performance/persisted-queries.md +++ b/website/src/docs/hotchocolate/performance/persisted-queries.md @@ -8,6 +8,10 @@ Extracting queries is supported by client libraries like [Relay](https://relay.d > Note: While this feature is called persisted _queries_ it works for all other GraphQL operations as well. + + # How it works - All queries our client(s) will execute are extracted during their build process. Individual queries are hashed to generate a unique identifier for each query.