-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a constant for JvmOverloads to avoid a crash due to relocation (#…
…4008) * Use a constant for JvmOverloads to avoid a crash due to relocation * Move test to own subproject * Add a note about `@JvmOverloads` being legal only in common or JVM targets
- Loading branch information
1 parent
3e0dbe6
commit 1534372
Showing
11 changed files
with
58 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -12,4 +12,4 @@ query LaunchDetails($id:ID!) { | |
} | ||
isBooked | ||
} | ||
} | ||
} |
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,15 @@ | ||
plugins { | ||
id("org.jetbrains.kotlin.jvm") | ||
id("com.apollographql.apollo3") | ||
} | ||
|
||
dependencies { | ||
implementation("com.apollographql.apollo3:apollo-runtime") | ||
testImplementation(groovy.util.Eval.x(project, "x.dep.kotlinJunit")) | ||
testImplementation(groovy.util.Eval.x(project, "x.dep.junit")) | ||
} | ||
|
||
apollo { | ||
packageName.set("jvmoverloads") | ||
addJvmOverloads.set(true) | ||
} |
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,6 @@ | ||
query GetPerson($id: ID = "0") { | ||
person(id: $id) { | ||
id | ||
name | ||
} | ||
} |
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,8 @@ | ||
type Query { | ||
person(id: ID!): Person | ||
} | ||
|
||
type Person { | ||
id: ID! | ||
name: String! | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/jvmoverloads/src/test/java/test/JvmOverloadsTest.java
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 test; | ||
|
||
import com.apollographql.apollo3.api.Optional; | ||
import jvmoverloads.GetPersonQuery; | ||
import org.junit.Test; | ||
|
||
public class JvmOverloadsTest { | ||
@Test | ||
public void jvmOverloads() { | ||
new GetPersonQuery(); | ||
new GetPersonQuery(new Optional.Present<>("1")); | ||
} | ||
} |