Skip to content

Commit 5ff2635

Browse files
authored
[IJ Plugin] Include subfolders when contributing GraphQL config (#5871)
1 parent e7d70c5 commit 5ff2635

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

intellij-plugin/src/main/kotlin/com/apollographql/ijplugin/graphql/ApolloGraphQLConfigContributor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ApolloGraphQLConfigContributor : GraphQLConfigContributor {
3636

3737
private fun ApolloKotlinService.toGraphQLRawProjectConfig() = GraphQLRawProjectConfig(
3838
schema = schemaPaths.map { GraphQLRawSchemaPointer(it) },
39-
include = operationPaths.map { "$it/*.graphql" },
39+
include = operationPaths.map { "$it/**/*.graphql" },
4040
extensions = endpointUrl?.let {
4141
mapOf(
4242
GraphQLConfigKeys.EXTENSION_ENDPOINTS to mapOf(

intellij-plugin/src/test/kotlin/com/apollographql/ijplugin/navigation/GraphQLCustomUsageSearcherTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class GraphQLCustomUsageSearcherTest : ApolloTestCase() {
5454

5555
@Test
5656
fun fragment() = testFindUsages(
57-
fromFile = "src/main/graphql/ComputerFields.graphql",
57+
fromFile = "src/main/graphql/fragments/ComputerFields.graphql",
5858
moveCaret = { moveCaret("computerFields") },
5959
expected = listOf(
6060
"ComputersQuery.graphql" to "...computerFields",

intellij-plugin/src/test/kotlin/com/apollographql/ijplugin/navigation/GraphQLGotoDeclarationHandlerTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class GraphQLGotoDeclarationHandlerTest : ApolloTestCase() {
6767

6868
@Test
6969
fun goToFragmentClass() = testNavigation(
70-
fromFile = "src/main/graphql/ComputerFields.graphql",
70+
fromFile = "src/main/graphql/fragments/ComputerFields.graphql",
7171
fromElement = { elementAt<PsiElement>("computerFields")!! },
7272
toFile = "build/generated/source/apollo/main/com/example/generated/fragment/ComputerFields.kt",
7373
toElement = { elementAt<KtClass>("class ComputerFields")!! },
@@ -77,7 +77,7 @@ class GraphQLGotoDeclarationHandlerTest : ApolloTestCase() {
7777

7878
@Test
7979
fun goToField() = testNavigation(
80-
fromFile = "src/main/graphql/ComputerFields.graphql",
80+
fromFile = "src/main/graphql/fragments/ComputerFields.graphql",
8181
fromElement = { elementAt<PsiElement>("resolution")!! },
8282
toFile = "build/generated/source/apollo/main/com/example/generated/fragment/ComputerFields.kt",
8383
toElement = { elementAt<KtParameter>("resolution")!! },

intellij-plugin/src/test/kotlin/com/apollographql/ijplugin/navigation/KotlinGoToDeclarationHandlerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class KotlinGoToDeclarationHandlerTest : ApolloTestCase() {
6262
fun goToFragmentDefinition() = testNavigation(
6363
fromFile = "src/main/kotlin/com/example/Main.kt",
6464
fromElement = { elementAt<PsiElement>("ComputerFields(") },
65-
toFile = "src/main/graphql/ComputerFields.graphql",
65+
toFile = "src/main/graphql/fragments/ComputerFields.graphql",
6666
toElement = { elementAt<GraphQLFragmentDefinition>("fragment computerFields") }
6767
)
6868

intellij-plugin/src/test/kotlin/com/apollographql/ijplugin/navigation/KotlinTypeDeclarationProviderTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class KotlinTypeDeclarationProviderTest : ApolloTestCase() {
6363
fun goToFragmentDefinition() = testNavigation(
6464
fromFile = "src/main/kotlin/com/example/Main.kt",
6565
fromElement = { elementAt<KtProperty>("computerFields") },
66-
toFile = "src/main/graphql/ComputerFields.graphql",
66+
toFile = "src/main/graphql/fragments/ComputerFields.graphql",
6767
toElement = { elementAt<GraphQLFragmentDefinition>("fragment computerFields") }
6868
)
6969

0 commit comments

Comments
 (0)