Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IJ Plugin] Remove GraphQL IJ plugin issue workaround #5907

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

4 changes: 0 additions & 4 deletions intellij-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@
<extensions defaultExtensionNs="com.intellij.lang.jsgraphql">
<!-- Contribute configuration to the GraphQL plugin -->
<configContributor implementation="com.apollographql.ijplugin.graphql.ApolloGraphQLConfigContributor" />

<!-- Suppress redefinition errors for built-in GraphQL types/directives. -->
<!-- TODO: remove this once https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665 is fixed -->
<errorFilter implementation="com.apollographql.ijplugin.graphql.BuiltInRedefinitionErrorFilter" />
</extensions>

<applicationListeners>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,7 @@ fun GQLDocument.toSDL(indent: String = " "): String {

definition is GQLTypeDefinition && definition.name in GQLTypeDefinition.builtInTypes ||
definition is GQLDirectiveDefinition && definition.name in GQLDirectiveDefinition.builtInDirectives -> {
// Tools like the GraphQL intelliJ plugin expect a "server" schema, without builtin types
// Suppress the errors for now
buffer.writeUtf8("# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665\n")
buffer.writeUtf8("# noinspection GraphQLTypeRedefinition\n")
writer.write(definition)

}

else -> {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5828,8 +5828,6 @@ type UserModData {
email: String
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.
"""
Expand Down Expand Up @@ -5860,8 +5858,6 @@ type __Schema {
directives: [__Directive!]!
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.

Expand All @@ -5887,8 +5883,6 @@ type __Type {
ofType: __Type
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
An enum describing what kind of type a given `__Type` is.
"""
Expand Down Expand Up @@ -5934,8 +5928,6 @@ enum __TypeKind {
NON_NULL
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.
"""
Expand All @@ -5953,8 +5945,6 @@ type __Field {
deprecationReason: String
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.
"""
Expand All @@ -5971,8 +5961,6 @@ type __InputValue {
defaultValue: String
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.
"""
Expand All @@ -5986,8 +5974,6 @@ type __EnumValue {
deprecationReason: String
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.

Expand All @@ -6009,8 +5995,6 @@ type __Directive {
onField: Boolean! @deprecated(reason: "Use `locations`.")
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.
"""
Expand Down Expand Up @@ -6106,22 +6090,16 @@ enum __DirectiveLocation {
INPUT_FIELD_DEFINITION
}

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
Directs the executor to include this field or fragment only when the `if` argument is true.
"""
directive @include ("Included when true." if: Boolean!) on FIELD|FRAGMENT_SPREAD|INLINE_FRAGMENT

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
Directs the executor to skip this field or fragment when the `if` argument is true.
"""
directive @skip ("Skipped when true." if: Boolean!) on FIELD|FRAGMENT_SPREAD|INLINE_FRAGMENT

# See https://github.com/JetBrains/js-graphql-intellij-plugin/issues/665
# noinspection GraphQLTypeRedefinition
"""
Marks an element of a GraphQL schema as no longer supported.
"""
Expand Down
Loading