-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4986 from apollographql/release-3.8.2
Release 3.8.2
- Loading branch information
Showing
45 changed files
with
970 additions
and
104 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
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
27 changes: 27 additions & 0 deletions
27
...t/kotlin/com/apollographql/apollo3/graphql/ast/test/validation/OperationValidationTest.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,27 @@ | ||
package com.apollographql.apollo3.graphql.ast.test.validation | ||
|
||
import com.apollographql.apollo3.ast.SourceLocation | ||
import com.apollographql.apollo3.ast.introspection.toSchema | ||
import com.apollographql.apollo3.ast.parseAsGQLDocument | ||
import com.apollographql.apollo3.ast.validateAsExecutable | ||
import okio.buffer | ||
import okio.source | ||
import org.junit.Test | ||
import java.io.File | ||
import kotlin.test.assertEquals | ||
|
||
class OperationValidationTest { | ||
@Test | ||
fun testAddRequiredFields() { | ||
val schema = File("src/test/kotlin/com/apollographql/apollo3/graphql/ast/test/validation/inputTypeDeprecatedField.graphqls").toSchema() | ||
val operations = File("src/test/kotlin/com/apollographql/apollo3/graphql/ast/test/validation/inputTypeDeprecatedField.graphql") | ||
.source() | ||
.buffer() | ||
.parseAsGQLDocument() | ||
.valueAssertNoErrors() | ||
val operationIssues = operations.validateAsExecutable(schema).issues | ||
assertEquals(1, operationIssues.size) | ||
assertEquals("Use of deprecated input field `deprecatedParameter`", operationIssues[0].message) | ||
assertEquals(SourceLocation(12, 17, null).pretty(), operationIssues[0].sourceLocation.pretty()) | ||
} | ||
} |
Oops, something went wrong.