-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure reserved words are escaped in generated inputs (#604)
* Ensure reserved words are escaped in generated inputs * Address linting
- Loading branch information
1 parent
f967747
commit 81b7cc7
Showing
5 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.../kotlin/com/netflix/graphql/dgs/codegen/cases/inputWithReservedWord/expected/DgsClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.netflix.graphql.dgs.codegen.cases.inputWithReservedWord.expected | ||
|
||
public object DgsClient |
11 changes: 11 additions & 0 deletions
11
...tlin/com/netflix/graphql/dgs/codegen/cases/inputWithReservedWord/expected/DgsConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.netflix.graphql.dgs.codegen.cases.inputWithReservedWord.expected | ||
|
||
import kotlin.String | ||
|
||
public object DgsConstants { | ||
public object SAMPLEINPUT { | ||
public const val TYPE_NAME: String = "SampleInput" | ||
|
||
public const val Return: String = "return" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...com/netflix/graphql/dgs/codegen/cases/inputWithReservedWord/expected/types/SampleInput.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.netflix.graphql.dgs.codegen.cases.inputWithReservedWord.expected.types | ||
|
||
import com.netflix.graphql.dgs.codegen.GraphQLInput | ||
import kotlin.Any | ||
import kotlin.Pair | ||
import kotlin.String | ||
import kotlin.collections.List | ||
|
||
public class SampleInput( | ||
public val `return`: String, | ||
) : GraphQLInput() { | ||
public override fun fields(): List<Pair<String, Any?>> = listOf("return" to `return`) | ||
} |
3 changes: 3 additions & 0 deletions
3
...tegTest/kotlin/com/netflix/graphql/dgs/codegen/cases/inputWithReservedWord/schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
input SampleInput { | ||
return: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters