Skip to content

Commit 4687936

Browse files
authored
Merge pull request #9 from graphql-java/extended-scalar-blog
Added extended scalar blog entry
2 parents 32020e7 + 44ed8e6 commit 4687936

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
+++
2+
title = "Introducing graphql-java-extended-scalars"
3+
author = "Brad Baker"
4+
tags = []
5+
categories = []
6+
date = 2018-11-24T01:00:00+10:00
7+
+++
8+
9+
One of the most common questions we get in GraphQL Java land is "can we have a datetime scalar".
10+
11+
This is not defined by the graphql specification per se so we are reluctant to add it to the core library and then have it turn
12+
up later as an officially specified type.
13+
14+
But it really is a badly needed type in your GraphQL arsenal and hence `graphql-java-extended-scalars` was born
15+
16+
https://github.com/graphql-java/graphql-java-extended-scalars
17+
18+
This will be a place where we can add non standard but useful extensions to GraphQL Java.
19+
20+
The major scalars we have added on day one are
21+
22+
* The aforementioned DateTime scalar as well as a Date and Time scalar
23+
* A Object scalar or sometimes know as a JSON scalar that allows a map of values to be returned as a scalar value
24+
* Some numeric scalars that constrain the values allowed such as `PositiveInt`
25+
* A Regex scalar that allows a string to fit a regular expression
26+
* A Url scalar that produces `java.net.URL` objects at runtime
27+
* And finally an aliasing technique that allows you to create more meaningfully named scalar values
28+
29+
We hope you find them useful.
30+
31+
32+
Cheers,<br>
33+
Brad

0 commit comments

Comments
 (0)