Skip to content

Commit

Permalink
Change severity to warning and tweak messages
Browse files Browse the repository at this point in the history
  • Loading branch information
BoD committed May 27, 2024
1 parent 6897a33 commit af67208
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ApolloGraphQLConfigFilePresentAnnotator : Annotator {
override fun annotate(element: PsiElement, holder: AnnotationHolder) {
if (!element.project.apolloProjectService.apolloVersion.isAtLeastV4 || !element.project.projectSettingsState.contributeConfigurationToGraphqlPlugin) return
if (element.containingFile.name in graphQLConfigFileNames && element.containingFile == element) {
holder.newAnnotation(HighlightSeverity.ERROR, ApolloBundle.message("inspection.graphQLConfigFilePresent.reportText"))
holder.newAnnotation(HighlightSeverity.WARNING, ApolloBundle.message("inspection.graphQLConfigFilePresent.reportText"))
.range(element)
.create()
}
Expand Down
2 changes: 1 addition & 1 deletion intellij-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
groupKey="inspection.group.graphql.apolloKotlin"
key="inspection.graphQLConfigFilePresent.displayName"
enabledByDefault="true"
level="ERROR"
level="WARNING"
/>

<annotator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
<body>
Suggests to delete GraphQL config files on projects using Apollo Kotlin 4.
<p>
It is no longer useful to have a GraphQL config file, as the Apollo Kotlin plugin will automatically provide the location of your
project's operations and schema files to the GraphQL plugin.<br>
It is no longer useful to have a GraphQL config file, as the Apollo plugin will automatically provide the location of your
project's operations and schema files to the GraphQL plugin, <br>
</p>
<p>
Note: the Apollo plugin uses the Gradle tooling API to retrieve the project's GraphQL configuration.
</p>
<p>
<a href="https://www.apollographql.com/docs/kotlin/v4/testing/android-studio-plugin#integration-with-the-graphql-intellij-plugin">More information</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ inspection.missingGraphQLDefinitionImport.reportText.scalar=scalar
inspection.missingGraphQLDefinitionImport.quickFix=Import {0} {1}

inspection.graphQLConfigFilePresent.displayName=GraphQL config file present
inspection.graphQLConfigFilePresent.reportText=A GraphQL config file is not needed in Apollo Kotlin 4 projects
inspection.graphQLConfigFilePresent.quickFix=Delete the file {0}
inspection.graphQLConfigFilePresent.reportText=The Apollo plugin retrieves the GraphQL configuration from Gradle and doesn't use the GraphQL config file
inspection.graphQLConfigFilePresent.quickFix=Delete the {0} file
inspection.more=More...
Expand Down

0 comments on commit af67208

Please sign in to comment.