Skip to content

Commit b7a2dd8

Browse files
committed
Doco for Locale scalar
1 parent 490fd97 commit b7a2dd8

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def getDevelopmentVersion() {
2929
}
3030

3131

32-
def releaseVersion = System.env.RELEASE_VERSION
32+
def releaseVersion = System.getProperty("RELEASE_VERSION")
3333
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
3434
group = 'com.graphql-java'
3535

readme.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,34 @@ For example, imagine a `phoneNumber` scalar like this :
202202

203203
```
204204

205+
## Locale Scalar
206+
207+
The Locale scalar handles [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tags via the JDK method [Locale.forLanguageTag](https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#forLanguageTag(java.lang.String)
208+
209+
```graphql
210+
211+
type Customer {
212+
name : String
213+
locale : Locale
214+
}
215+
216+
type Query {
217+
customers(inLocale : Locale) : [Customers]
218+
}
219+
```
220+
221+
An example query to look for customers in the Romanian locale might look like:
222+
223+
```graphql
224+
225+
query {
226+
customers(inLocale : "ro-RO") {
227+
name
228+
locale
229+
}
230+
}
231+
232+
```
205233

206234
## Alias Scalars
207235

0 commit comments

Comments
 (0)