-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ApolloCompilerPlugin.schemaDocumentListener() (#6165)
* Add ApolloCompilerPlugin.schemaDocumentListener() * fix integration tests
- Loading branch information
1 parent
df6ab99
commit 16fa109
Showing
23 changed files
with
382 additions
and
56 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo/ast/ForeignSchema.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,21 @@ | ||
package com.apollographql.apollo.ast | ||
|
||
import com.apollographql.apollo.annotations.ApolloExperimental | ||
|
||
/** | ||
* A known foreign schema | ||
* | ||
* @param name the name of the foreign schema as in https://specs.apollo.dev/link/v1.0/#@link.url | ||
* @param version the version of the foreign schema as in https://specs.apollo.dev/link/v1.0/#@link.url | ||
* @param definitions the definitions in the foreign schema | ||
* @param directivesToStrip the name of directives that must be stripped before being sent to the server | ||
* without the leading '@'. | ||
* For an example: `"catch"` | ||
*/ | ||
@ApolloExperimental | ||
class ForeignSchema( | ||
val name: String, | ||
val version: String, | ||
val definitions: List<GQLDefinition>, | ||
val directivesToStrip: List<String> = definitions.filterIsInstance<GQLDirective>().map { it.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
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
6 changes: 1 addition & 5 deletions
6
.../apollo-ast/src/commonTest/kotlin/com/apollographql/apollo/graphql/ast/test/SchemaTest.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
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
Oops, something went wrong.