Skip to content

Commit d4c42f9

Browse files
committed
Recognize JSON files with top-level __schema field as GraphQL introspection result in GraphQLIdentifierIndex (#242)
1 parent 6d1ed32 commit d4c42f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/com/intellij/lang/jsgraphql/ide/project/indexing/GraphQLIdentifierIndex.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ private boolean isIntrospectionJsonFile(JsonFile jsonFile) {
118118
return ((JsonObject) dataProperty.getValue()).findProperty("__schema") != null;
119119
}
120120
}
121+
final JsonProperty schemaProperty = ((JsonObject) child).findProperty("__schema");
122+
if(schemaProperty != null) {
123+
return true;
124+
}
121125
}
122126
}
123127
return false;
@@ -149,7 +153,7 @@ public DataExternalizer<IdentifierKind> getValueExternalizer() {
149153

150154
@Override
151155
public int getVersion() {
152-
return 1;
156+
return 2;
153157
}
154158

155159
@NotNull

0 commit comments

Comments
 (0)