File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
main/com/intellij/lang/jsgraphql/ide/editor
test/com/intellij/lang/jsgraphql/ide/editor Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 4646import com .intellij .util .Consumer ;
4747import com .intellij .util .ExceptionUtil ;
4848import graphql .GraphQLException ;
49+ import graphql .Scalars ;
4950import graphql .introspection .IntrospectionQuery ;
5051import graphql .language .*;
5152import graphql .schema .Coercing ;
6667import java .util .*;
6768
6869import static com .intellij .lang .jsgraphql .v1 .ide .project .JSGraphQLLanguageUIProjectService .setHeadersFromOptions ;
70+ import static graphql .schema .idl .ScalarInfo .STANDARD_SCALARS ;
6971
7072public class GraphQLIntrospectionHelper {
7173
@@ -81,6 +83,16 @@ public GraphQLIntrospectionHelper(Project project) {
8183 if (project != null ) {
8284 project .getMessageBus ().connect ().subscribe (GraphQLConfigManager .TOPIC , () -> latestIntrospection = null );
8385 }
86+
87+ // remove the non-spec "graphql-java" standard scalars since we're building a registry based on the actual types present in introspection results
88+ STANDARD_SCALARS .remove (Scalars .GraphQLBigDecimal );
89+ STANDARD_SCALARS .remove (Scalars .GraphQLBigInteger );
90+ STANDARD_SCALARS .remove (Scalars .GraphQLByte );
91+ STANDARD_SCALARS .remove (Scalars .GraphQLChar );
92+ STANDARD_SCALARS .remove (Scalars .GraphQLShort );
93+ STANDARD_SCALARS .remove (Scalars .GraphQLLong );
94+
95+
8496 }
8597
8698 public void performIntrospectionQueryAndUpdateSchemaPathFile (Project project , GraphQLConfigEndpoint endpoint ) {
You can’t perform that action at this time.
0 commit comments