Skip to content

Commit d7ebb8c

Browse files
authored
Update scalar docs (#1265)
* Update scalar docs * Update scalars.md
1 parent 28b1cb4 commit d7ebb8c

File tree

2 files changed

+20
-10
lines changed
  • website
    • docs/schema-generator/writing-schemas
    • versioned_docs/version-4.x.x/schema-generator/writing-schemas

2 files changed

+20
-10
lines changed

website/docs/schema-generator/writing-schemas/scalars.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ extended scalar types provided by `graphql-java`.
99

1010
| Kotlin Type | GraphQL Type |
1111
| ----------------------- | ---------------- |
12-
| `kotlin.Int` | `Int` |
13-
| `kotlin.Float` | `Float` |
14-
| `kotlin.String` | `String` |
15-
| `kotlin.Boolean` | `Boolean` |
12+
| `kotlin.String` | `String` |
13+
| `kotlin.Boolean` | `Boolean` |
14+
| `kotlin.Int` | `Int` |
15+
| `kotlin.Double` | `Float` |
16+
| `kotlin.Float` | `Float` |
17+
18+
:::note
19+
The GraphQL spec uses the term `Float` for signed double‐precision fractional values. `graphql-java` maps this to a `java.lang.Double` for the execution. The generator will map both `kotlin.Double` and `kotlin.Float` to GraphQL `Float` but we reccomend you use `kotlin.Double`
20+
:::
1621

1722
:::caution
1823
Extended GraphQL scalar types provided by `graphql-java` were [deprecated in v15](https://github.com/graphql-java/graphql-java/releases/tag/v15.0).
19-
This includes the following types: `Double`, `Long`, `Short`, `Float`, `BigInteger`, `BigDecimal`, and `Char`. If you are currently
24+
This includes the following types: `Long`, `Short`, `BigInteger`, `BigDecimal`, and `Char`. If you are currently
2025
using these types, they will be removed in future `graphql-java` releases.
2126

2227
See the [graphql-java-extended-scalars](https://github.com/graphql-java/graphql-java-extended-scalars) project if you need continued support.

website/versioned_docs/version-4.x.x/schema-generator/writing-schemas/scalars.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ extended scalar types provided by `graphql-java`.
99

1010
| Kotlin Type | GraphQL Type |
1111
| ----------------------- | ---------------- |
12-
| `kotlin.Int` | `Int` |
13-
| `kotlin.Float` | `Float` |
14-
| `kotlin.String` | `String` |
15-
| `kotlin.Boolean` | `Boolean` |
12+
| `kotlin.String` | `String` |
13+
| `kotlin.Boolean` | `Boolean` |
14+
| `kotlin.Int` | `Int` |
15+
| `kotlin.Double` | `Float` |
16+
| `kotlin.Float` | `Float` |
17+
18+
:::note
19+
The GraphQL spec uses the term `Float` for signed double‐precision fractional values. `graphql-java` maps this to a `java.lang.Double` for the execution. The generator will map both `kotlin.Double` and `kotlin.Float` to GraphQL `Float` but we reccomend you use `kotlin.Double`
20+
:::
1621

1722
:::caution
1823
Extended GraphQL scalar types provided by `graphql-java` were [deprecated in v15](https://github.com/graphql-java/graphql-java/releases/tag/v15.0).
19-
This includes the following types: `Double`, `Long`, `Short`, `Float`, `BigInteger`, `BigDecimal`, and `Char`. If you are currently
24+
This includes the following types: `Long`, `Short`, `BigInteger`, `BigDecimal`, and `Char`. If you are currently
2025
using these types, they will be removed in future `graphql-java` releases.
2126

2227
See the [graphql-java-extended-scalars](https://github.com/graphql-java/graphql-java-extended-scalars) project if you need continued support.

0 commit comments

Comments
 (0)