Skip to content

Commit

Permalink
Added youtube links to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Aug 23, 2022
1 parent 0576961 commit 192cec2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 22 additions & 1 deletion website/src/docs/hotchocolate/defining-a-schema/scalars.md
Expand Up @@ -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/")
```

<iframe width="560" height="315"
src="https://www.youtube.com/embed/gO3bNKBmXZM"frameborder="0"
allowfullscreen></iframe>

# .NET Scalars

In addition to the scalars defined by the specification, Hot Chocolate also supports the following set of scalar types:
Expand All @@ -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 |
Expand Down
Expand Up @@ -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.
<iframe width="560" height="315"
src="https://www.youtube.com/embed/ZZ5PF3_P_r4"frameborder="0"
allowfullscreen></iframe>

# 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.
Expand Down

0 comments on commit 192cec2

Please sign in to comment.