Skip to content

Commit bf05447

Browse files
authored
Remove GraphQL settings UI and update definitions, including cache ones (#50)
* Remove GraphQL settings UI * Update definitions, and include the cache ones
1 parent 93b5028 commit bf05447

File tree

21 files changed

+542
-460
lines changed

21 files changed

+542
-460
lines changed

jsgraphql/src/main/java/com/intellij/lang/jsgraphql/GraphQLSettings.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,13 @@ class GraphQLSettings : PersistentStateComponent<GraphQLSettingsState> {
6969
state.enableFederationSupport = enableFederationSupport
7070
}
7171

72-
var isApolloKotlinSupportEnabled: Boolean
73-
get() = state.enableApolloKotlinSupport
74-
set(enableApolloKotlinSupport) {
75-
state.enableApolloKotlinSupport = enableApolloKotlinSupport
76-
}
77-
7872
class GraphQLSettingsState {
7973
var introspectionQuery = ""
8074
var enableIntrospectionDefaultValues = true
8175
var enableIntrospectionRepeatableDirectives = false
8276
var openEditorWithIntrospectionResult = true
8377
var enableRelayModernFrameworkSupport = false
8478
var enableFederationSupport = false
85-
var enableApolloKotlinSupport = false
8679
}
8780

8881
companion object {

jsgraphql/src/main/java/com/intellij/lang/jsgraphql/schema/library/GraphQLLibraryManager.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
import com.intellij.openapi.util.ClearableLazyValue;
1313
import com.intellij.openapi.util.EmptyRunnable;
1414
import com.intellij.openapi.util.Pair;
15-
import com.intellij.openapi.vfs.*;
15+
import com.intellij.openapi.vfs.JarFileSystem;
16+
import com.intellij.openapi.vfs.LocalFileSystem;
17+
import com.intellij.openapi.vfs.VfsUtil;
18+
import com.intellij.openapi.vfs.VfsUtilCore;
19+
import com.intellij.openapi.vfs.VirtualFile;
20+
import com.intellij.openapi.vfs.VirtualFileManager;
1621
import com.intellij.psi.PsiManager;
1722
import com.intellij.testFramework.LightVirtualFile;
1823
import com.intellij.ui.EditorNotifications;
@@ -37,10 +42,10 @@ public final class GraphQLLibraryManager {
3742
new GraphQLLibrary(new GraphQLLibraryDescriptor("EMPTY"), new LightVirtualFile());
3843

3944
private static final Map<GraphQLLibraryDescriptor, String> ourDefinitionResourcePaths = Map.of(
40-
GraphQLLibraryTypes.SPECIFICATION, "Specification.graphql",
41-
GraphQLLibraryTypes.RELAY, "Relay.graphql",
42-
GraphQLLibraryTypes.FEDERATION, "Federation.graphql",
43-
GraphQLLibraryTypes.APOLLO_KOTLIN, "ApolloKotlin.graphql"
45+
GraphQLLibraryTypes.SPECIFICATION, "Specification.graphqls",
46+
GraphQLLibraryTypes.RELAY, "Relay.graphqls",
47+
GraphQLLibraryTypes.FEDERATION, "Federation.graphqls",
48+
GraphQLLibraryTypes.APOLLO_KOTLIN, "ApolloKotlin.graphqls"
4449
);
4550

4651
private final Project myProject;

jsgraphql/src/main/java/com/intellij/lang/jsgraphql/schema/library/GraphQLLibraryTypes.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ public boolean isEnabled(@NotNull Project project) {
3838
};
3939

4040
public static GraphQLLibraryDescriptor APOLLO_KOTLIN = new GraphQLLibraryDescriptor("APOLLO_KOTLIN") {
41-
@Override
42-
public boolean isEnabled(@NotNull Project project) {
43-
return GraphQLSettings.getSettings(project).isApolloKotlinSupportEnabled();
44-
}
45-
4641
@Override
4742
public @NotNull String getPresentableText() {
4843
return GraphQLBundle.message("graphql.library.apollokotlin");

jsgraphql/src/main/java/com/intellij/lang/jsgraphql/ui/GraphQLSettingsConfigurable.kt

Lines changed: 0 additions & 93 deletions
This file was deleted.

jsgraphql/src/main/resources/definitions/ApolloKotlin.graphql

Lines changed: 0 additions & 209 deletions
This file was deleted.

0 commit comments

Comments
 (0)