You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: intellij-plugin/src/main/kotlin/com/apollographql/ijplugin/inspection/ApolloMissingGraphQLDefinitionImportInspection.kt
@@ -60,7 +61,8 @@ class ApolloMissingGraphQLDefinitionImportInspection : LocalInspectionTool() {
60
61
highlightType:ProblemHighlightType,
61
62
) {
62
63
if (directiveElement.name !in definitions.directives().map { it.name }) return
63
-
val message =if (highlightType ==ProblemHighlightType.WEAK_WARNING) "inspection.missingGraphQLDefinitionImport.reportText.warning"else"inspection.missingGraphQLDefinitionImport.reportText.error"
64
+
val message =
65
+
if (highlightType ==ProblemHighlightType.WEAK_WARNING) "inspection.missingGraphQLDefinitionImport.reportText.warning"else"inspection.missingGraphQLDefinitionImport.reportText.error"
64
66
if (!directiveElement.isImported(definitionsUrl)) {
65
67
val typeKind =ApolloBundle.message("inspection.missingGraphQLDefinitionImport.reportText.directive")
66
68
holder.registerProblem(
@@ -123,13 +125,16 @@ private class ImportDefinitionQuickFix(
123
125
val linkDirective = schemaFiles.flatMap { it.linkDirectives(definitionsUrl) }.firstOrNull()
124
126
125
127
if (linkDirective ==null) {
126
-
val linkDirectiveSchemaExtension = createLinkDirectiveSchemaExtension(project, setOf(element.nameForImport), definitions, definitionsUrl)
127
-
val extraSchemaFile = schemaFiles.firstOrNull { it.name =="extra.graphqls" }
0 commit comments