Skip to content

fix: default list of scalars to emptyList() #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 4 additions & 2 deletions test/unit/should_support_custom_scalars/expected.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import com.expediagroup.graphql.generator.annotations.*
data class MyScalarType(
val idField: com.expediagroup.graphql.generator.scalars.ID? = null,
val field: java.net.URL? = null,
val field2: java.net.URL
val field2: java.net.URL,
val field3: List<java.net.URL> = emptyList()
)

@GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations.Locations.OBJECT])
data class MyCustomScalarType(
val field: String? = null,
val field2: String
val field2: String,
val field3: List<String> = emptyList()
)
2 changes: 2 additions & 0 deletions test/unit/should_support_custom_scalars/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ type MyScalarType {
idField: ID
field: URL
field2: URL!
field3: [URL!]
}

scalar CustomScalar

type MyCustomScalarType {
field: CustomScalar
field2: CustomScalar!
field3: [CustomScalar!]
}
Loading