Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kkatelia committed Mar 21, 2024
1 parent 0ccf925 commit cd71b3a
Show file tree
Hide file tree
Showing 345 changed files with 4,713 additions and 4,977 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import graphql.language.OperationDefinition
import kotlin.String

public object DgsClient {
public fun buildQuery(_projection: QueryProjection.() -> QueryProjection): String =
GraphQLProjection.asQuery(OperationDefinition.Operation.QUERY, QueryProjection(), _projection)
public fun buildQuery(_projection: QueryProjection.() -> QueryProjection): String =
GraphQLProjection.asQuery(OperationDefinition.Operation.QUERY, QueryProjection(), _projection)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ package com.netflix.graphql.dgs.codegen.cases.constantsForInputTypes.expected
import kotlin.String

public object DgsConstants {
public const val QUERY_TYPE: String = "Query"
public const val QUERY_TYPE: String = "Query"

public object QUERY {
public const val TYPE_NAME: String = "Query"
public object QUERY {
public const val TYPE_NAME: String = "Query"

public const val People: String = "people"
public const val People: String = "people"

public object PEOPLE_INPUT_ARGUMENT {
public const val Filter: String = "filter"
public object PEOPLE_INPUT_ARGUMENT {
public const val Filter: String = "filter"
}
}
}

public object PERSON {
public const val TYPE_NAME: String = "Person"
public object PERSON {
public const val TYPE_NAME: String = "Person"

public const val Firstname: String = "firstname"
public const val Firstname: String = "firstname"

public const val Lastname: String = "lastname"
}
public const val Lastname: String = "lastname"
}

public object PERSONFILTER {
public const val TYPE_NAME: String = "PersonFilter"
public object PERSONFILTER {
public const val TYPE_NAME: String = "PersonFilter"

public const val Email: String = "email"
}
public const val Email: String = "email"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package com.netflix.graphql.dgs.codegen.cases.constantsForInputTypes.expected.cl
import com.netflix.graphql.dgs.codegen.GraphQLProjection

public class PersonProjection : GraphQLProjection() {
public val firstname: PersonProjection
get() {
field("firstname")
return this
}
public val firstname: PersonProjection
get() {
field("firstname")
return this
}

public val lastname: PersonProjection
get() {
field("lastname")
return this
}
public val lastname: PersonProjection
get() {
field("lastname")
return this
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import com.netflix.graphql.dgs.codegen.GraphQLProjection
import com.netflix.graphql.dgs.codegen.cases.constantsForInputTypes.expected.types.PersonFilter

public class QueryProjection : GraphQLProjection() {
public fun people(filter: PersonFilter? = default<QueryProjection, PersonFilter?>("filter"),
_projection: PersonProjection.() -> PersonProjection): QueryProjection {
field("people", PersonProjection(), _projection, "filter" to filter)
return this
}
public fun people(
filter: PersonFilter? = default<QueryProjection, PersonFilter?>("filter"),
_projection: PersonProjection.() -> PersonProjection
): QueryProjection {
field("people", PersonProjection(), _projection, "filter" to filter)
return this
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,47 @@ import kotlin.jvm.JvmName
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(builder = Person.Builder::class)
public class Person(
firstname: () -> String? = firstnameDefault,
lastname: () -> String? = lastnameDefault,
firstname: () -> String? = firstnameDefault,
lastname: () -> String? = lastnameDefault
) {
private val _firstname: () -> String? = firstname
private val _firstname: () -> String? = firstname

private val _lastname: () -> String? = lastname
private val _lastname: () -> String? = lastname

@get:JvmName("getFirstname")
public val firstname: String?
get() = _firstname.invoke()
@get:JvmName("getFirstname")
public val firstname: String?
get() = _firstname.invoke()

@get:JvmName("getLastname")
public val lastname: String?
get() = _lastname.invoke()
@get:JvmName("getLastname")
public val lastname: String?
get() = _lastname.invoke()

public companion object {
private val firstnameDefault: () -> String? =
{ throw IllegalStateException("Field `firstname` was not requested") }
public companion object {
private val firstnameDefault: () -> String? = { throw IllegalStateException("Field `firstname` was not requested") }

private val lastnameDefault: () -> String? = { throw IllegalStateException("Field `lastname` was not requested") }
}

private val lastnameDefault: () -> String? =
{ throw IllegalStateException("Field `lastname` was not requested") }

}
@JsonPOJOBuilder
@JsonIgnoreProperties("__typename")
public class Builder {
private var firstname: () -> String? = firstnameDefault

@JsonPOJOBuilder
@JsonIgnoreProperties("__typename")
public class Builder {
private var firstname: () -> String? = firstnameDefault
private var lastname: () -> String? = lastnameDefault

private var lastname: () -> String? = lastnameDefault
@JsonProperty("firstname")
public fun withFirstname(firstname: String?): Builder = this.apply {
this.firstname = { firstname }
}

@JsonProperty("firstname")
public fun withFirstname(firstname: String?): Builder = this.apply {
this.firstname = { firstname }
}
@JsonProperty("lastname")
public fun withLastname(lastname: String?): Builder = this.apply {
this.lastname = { lastname }
}

@JsonProperty("lastname")
public fun withLastname(lastname: String?): Builder = this.apply {
this.lastname = { lastname }
public fun build(): Person = Person(
firstname = firstname,
lastname = lastname
)
}

public fun build(): Person = Person(
firstname = firstname,
lastname = lastname,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import kotlin.String
import kotlin.collections.List

public class PersonFilter(
public val email: String? = default<PersonFilter, String?>("email"),
public val email: String? = default<PersonFilter, String?>("email")
) : GraphQLInput() {
override fun fields(): List<Pair<String, Any?>> = listOf("email" to email)
override fun fields(): List<Pair<String, Any?>> = listOf("email" to email)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,30 @@ import kotlin.jvm.JvmName
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@JsonDeserialize(builder = Query.Builder::class)
public class Query(
people: () -> List<Person?>? = peopleDefault,
people: () -> List<Person?>? = peopleDefault
) {
private val _people: () -> List<Person?>? = people
private val _people: () -> List<Person?>? = people

@get:JvmName("getPeople")
public val people: List<Person?>?
get() = _people.invoke()
@get:JvmName("getPeople")
public val people: List<Person?>?
get() = _people.invoke()

public companion object {
private val peopleDefault: () -> List<Person?>? =
{ throw IllegalStateException("Field `people` was not requested") }
public companion object {
private val peopleDefault: () -> List<Person?>? = { throw IllegalStateException("Field `people` was not requested") }
}

}
@JsonPOJOBuilder
@JsonIgnoreProperties("__typename")
public class Builder {
private var people: () -> List<Person?>? = peopleDefault

@JsonPOJOBuilder
@JsonIgnoreProperties("__typename")
public class Builder {
private var people: () -> List<Person?>? = peopleDefault
@JsonProperty("people")
public fun withPeople(people: List<Person?>?): Builder = this.apply {
this.people = { people }
}

@JsonProperty("people")
public fun withPeople(people: List<Person?>?): Builder = this.apply {
this.people = { people }
public fun build(): Query = Query(
people = people
)
}

public fun build(): Query = Query(
people = people,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import graphql.language.OperationDefinition
import kotlin.String

public object DgsClient {
public fun buildQuery(_projection: QueryProjection.() -> QueryProjection): String =
GraphQLProjection.asQuery(OperationDefinition.Operation.QUERY, QueryProjection(), _projection)
public fun buildQuery(_projection: QueryProjection.() -> QueryProjection): String =
GraphQLProjection.asQuery(OperationDefinition.Operation.QUERY, QueryProjection(), _projection)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ package com.netflix.graphql.dgs.codegen.cases.constantsWithExtendedInputTypes.ex
import kotlin.String

public object DgsConstants {
public const val QUERY_TYPE: String = "Query"
public const val QUERY_TYPE: String = "Query"

public object QUERY {
public const val TYPE_NAME: String = "Query"
public object QUERY {
public const val TYPE_NAME: String = "Query"

public const val People: String = "people"
public const val People: String = "people"

public object PEOPLE_INPUT_ARGUMENT {
public const val Filter: String = "filter"
public object PEOPLE_INPUT_ARGUMENT {
public const val Filter: String = "filter"
}
}
}

public object PERSON {
public const val TYPE_NAME: String = "Person"
public object PERSON {
public const val TYPE_NAME: String = "Person"

public const val Firstname: String = "firstname"
public const val Firstname: String = "firstname"

public const val Lastname: String = "lastname"
}
public const val Lastname: String = "lastname"
}

public object PERSONFILTER {
public const val TYPE_NAME: String = "PersonFilter"
public object PERSONFILTER {
public const val TYPE_NAME: String = "PersonFilter"

public const val Email: String = "email"
public const val Email: String = "email"

public const val BirthYear: String = "birthYear"
}
public const val BirthYear: String = "birthYear"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package com.netflix.graphql.dgs.codegen.cases.constantsWithExtendedInputTypes.ex
import com.netflix.graphql.dgs.codegen.GraphQLProjection

public class PersonProjection : GraphQLProjection() {
public val firstname: PersonProjection
get() {
field("firstname")
return this
}
public val firstname: PersonProjection
get() {
field("firstname")
return this
}

public val lastname: PersonProjection
get() {
field("lastname")
return this
}
public val lastname: PersonProjection
get() {
field("lastname")
return this
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import com.netflix.graphql.dgs.codegen.GraphQLProjection
import com.netflix.graphql.dgs.codegen.cases.constantsWithExtendedInputTypes.expected.types.PersonFilter

public class QueryProjection : GraphQLProjection() {
public fun people(filter: PersonFilter? = default<QueryProjection, PersonFilter?>("filter"),
_projection: PersonProjection.() -> PersonProjection): QueryProjection {
field("people", PersonProjection(), _projection, "filter" to filter)
return this
}
public fun people(
filter: PersonFilter? = default<QueryProjection, PersonFilter?>("filter"),
_projection: PersonProjection.() -> PersonProjection
): QueryProjection {
field("people", PersonProjection(), _projection, "filter" to filter)
return this
}
}
Loading

0 comments on commit cd71b3a

Please sign in to comment.