Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helpers/build-type-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function buildListType(typeNode: TypeNode, typeName: string) {
export const KOTLIN_SCALARS = [
{
scalarName: "ID",
kotlinType: "String",
kotlinType: "com.expediagroup.graphql.generator.scalars.ID",
},
{
scalarName: "String",
Expand Down
1 change: 1 addition & 0 deletions test/unit/should_support_custom_scalars/expected.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.kotlin.generated
import com.expediagroup.graphql.generator.annotations.*

data class MyScalarType(
val idField: com.expediagroup.graphql.generator.scalars.ID? = null,
val field: URL? = null,
val field2: URL
)
Expand Down
1 change: 1 addition & 0 deletions test/unit/should_support_custom_scalars/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
scalar URL

type MyScalarType {
idField: ID
field: URL
field2: URL!
}
Expand Down