Skip to content

Commit 511e52a

Browse files
authored
Merge pull request #455 from jimkyndemeyer/v3
V3
2 parents 1511f03 + db22984 commit 511e52a

File tree

1,027 files changed

+93282
-7802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,027 files changed

+93282
-7802
lines changed

.run/Run IDE.run.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="IDEA" type="GradleRunConfiguration" factoryName="Gradle">
3+
<log_file alias="log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
4+
<ExternalSystemSettings>
5+
<option name="executionName" />
6+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
7+
<option name="externalSystemIdString" value="GRADLE" />
8+
<option name="scriptParameters" value="" />
9+
<option name="taskDescriptions">
10+
<list />
11+
</option>
12+
<option name="taskNames">
13+
<list>
14+
<option value="runIde" />
15+
</list>
16+
</option>
17+
<option name="vmOptions" value="" />
18+
</ExternalSystemSettings>
19+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
20+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
21+
<DebugAllEnabled>false</DebugAllEnabled>
22+
<method v="2" />
23+
</configuration>
24+
</component>

.run/Test.run.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Test" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value="test" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" value="" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<method v="2" />
22+
</configuration>
23+
</component>

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
# Changelog
44

5+
## [3.0.0] - 2021-07-16
6+
7+
### Added
8+
9+
- Added separate configurable inspections for existing schema and query validation rules, e.g. **Unresolved reference**, **Type redefinition**, **Member redefinition**, **Duplicate argument**, **Duplicate directive**, and many more.
10+
- Added support for repeatable directives.
11+
- Added support for `extend schema` syntax.
12+
- Added support for schema descriptions.
13+
- Added support for subscription directives.
14+
- Added several Relay built-in directives.
15+
- Supported suppression of inspections with comment for the definition or the whole file.
16+
- Changing the file highlight level in the editor prevents any inspections from being displayed.
17+
- Load variables from .env files. Supported file names: `.env.local`,`.env.development.local`,`.env.development`,`.env`.
18+
- Injections using `#graphql` and `/* GraphQL */` comments.
19+
- Enabled ESLint support for GraphQL.
20+
21+
### Changed
22+
- Improved completion for variables in queries.
23+
- Improved readability of error messages.
24+
25+
### Fixed
26+
- Emojis in the end-of-line comments.
27+
- Fixed resolve for directive arguments.
28+
- Fixed resolve for default object argument fields.
29+
- Fixed displaying Apollo `@client` fields as errors.
30+
531
## [2.9.1] - 2021-03-02
632

733
### Fixed

DEVELOPING.md

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,9 @@
11
# Developing
22

3-
## Setting up the Plugin SDK
4-
- Add all jars in `<intellij home>/plugins/JavaScriptLanguage`
5-
- Add all jars in `<intellij home>/plugins/JavaScriptDebugger/lib`
6-
- Add the css.jar in `<intellij home>/plugins/CSS/lib`
7-
- Add the netty-all-*.jar in `<intellij home>/lib`
8-
- Add the NodeNS.jar in `<user home>/.IntelliJIdea<version>/config/plugins/NodeJS/lib`
9-
- Add the IntelliLang.jar in `<user home>/.IntelliJIdea<version>/config/plugins/IntelliLang/lib`
10-
11-
## Setting up Intellij Community (OpenApi) sources:
12-
- https://github.com/JetBrains/intellij-plugins/tree/master/Dart
13-
14-
## Run-configuration options for interacting with the language service
15-
By default the plugin uses the language service in `META-INF/dist/js-graphql-language-service.dist.js`.
16-
17-
During plugin development there are two options for working directly with the language service source files:
18-
19-
### Option 1: Let IntelliJ start the language service directly from its server.js file
20-
3+
## Debugging
4+
### Recommended debug log settings
215
```
22-
-Djsgraphql.debug=true
23-
-Djsgraphql.debug.languageServiceDistFile=<git directory>/js-graphql-language-service/bin/server.js
6+
#com.intellij.lang.jsgraphql.types.schema.idl.SchemaGenerator
7+
#com.intellij.lang.jsgraphql.ide.validation.GraphQLSchemaAnnotator
8+
#com.intellij.lang.jsgraphql.schema.GraphQLSchemaProviderImpl
249
```
25-
26-
### Option 2: Let intelliJ connect to an already running language service instance
27-
28-
This run-configuration setup enabled debugging of the language service source code.
29-
30-
```
31-
-Djsgraphql.debug=true
32-
-Djsgraphql.debug.languageServiceUrl=http://localhost:3000/js-graphql-language-service
33-
```
34-
35-
Note that no process handler console view is available since the plugin isn't responsible for running the Node.js process.

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,44 @@ The main documentation site is available at https://jimkyndemeyer.github.io/js-g
2323

2424
## Which IDEs are compatible with the plugin?
2525

26-
The plugin is compatible with version 2018.2+ (182.711 or later) of all IDEs based on the IntelliJ Platform, including but not limited to WebStorm, IntelliJ IDEA, Android Studio, RubyMine, PhpStorm, and PyCharm.
26+
The plugin is compatible with version 2019.3+ (193.7288 or later) of all IDEs based on the IntelliJ Platform, including but not limited to WebStorm, IntelliJ IDEA, Android Studio, RubyMine, PhpStorm, and PyCharm.
2727

2828
## Where can I get the plugin?
2929

3030
The plugin is published to the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/8097-js-graphql).
3131

3232
To install it, open your IDE "Settings", "Plugins", "Marketplace" and search for "GraphQL".
3333

34+
## Injections
35+
36+
### Tagged template literals
37+
38+
Supported tags are: `graphql`, `gql`, `Relay.QL`, `Apollo.gql`.
39+
```
40+
const QUERY = gql``;
41+
```
42+
43+
### IntelliJ default comment-based injection
44+
45+
```
46+
// language=GraphQL
47+
const QUERY = `query { field }`;
48+
```
49+
50+
### C-style comments
51+
```
52+
const QUERY = /* GraphQL */ `query { field }`;
53+
```
54+
55+
### GraphQL comments
56+
```
57+
const QUERY = `
58+
#graphql
59+
60+
query { field }
61+
`;
62+
```
63+
3464
## Acknowledgements
3565

3666
This plugin was heavily inspired by [GraphiQL](https://github.com/graphql/graphiql) from Facebook.

build.gradle

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id 'org.jetbrains.grammarkit' version '2020.2.1'
3-
id 'org.jetbrains.intellij' version '0.6.3'
2+
id 'org.jetbrains.grammarkit' version '2021.1.3'
3+
id 'org.jetbrains.intellij' version '1.1.3'
44
id 'com.github.ManifestClasspath' version '0.1.0-RELEASE'
5-
id 'org.jetbrains.changelog' version '0.6.2'
5+
id 'org.jetbrains.changelog' version '1.2.0'
66
}
77

88
group pluginGroup
@@ -19,33 +19,31 @@ repositories {
1919
}
2020

2121
dependencies {
22-
implementation ('com.graphql-java:graphql-java:15.0') {
23-
exclude group: 'org.reactivestreams', module: 'reactive-streams'
24-
exclude group: 'com.graphql-java', module: 'java-dataloader'
25-
exclude group: 'org.slf4j', module: 'slf4j-api'
26-
}
2722
implementation 'commons-io:commons-io:2.6'
2823
implementation 'com.atlassian.commonmark:commonmark:0.12.1'
2924
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.21'
3025
implementation 'fr.opensagres.js:minimatch.java:1.1.0'
3126
implementation 'io.github.cdimascio:dotenv-kotlin:6.2.2'
3227

28+
implementation 'org.antlr:antlr4-runtime:4.8'
29+
implementation 'com.graphql-java:java-dataloader:2.2.3'
30+
implementation 'org.reactivestreams:reactive-streams:1.0.2'
31+
3332
testImplementation group: 'junit', name: 'junit', version: '4.12'
3433
}
3534

3635
intellij {
37-
version platformVersion
38-
type platformType
39-
pluginName pluginName
36+
version = platformVersion
37+
type = platformType
4038
plugins = ['JavaScriptLanguage', 'CSS', 'IntelliLang', 'java']
41-
ideaDependencyCachePath = project.buildDir
39+
ideaDependencyCachePath = project.buildDir.absolutePath
4240

4341
patchPluginXml {
44-
version pluginVersion
45-
sinceBuild pluginSinceBuild
46-
untilBuild pluginUntilBuild
42+
version = pluginVersion
43+
sinceBuild = pluginSinceBuild
44+
untilBuild = pluginUntilBuild
4745

48-
changeNotes """
46+
changeNotes = """
4947
<p><b>New in $pluginVersion</b></p>
5048
<p>
5149
${changelog.get(pluginVersion.toString()).toHTML()}
@@ -57,7 +55,7 @@ intellij {
5755
}
5856

5957
runPluginVerifier {
60-
ideVersions = ['IU-2019.3.4', 'IU-2020.2.4']
58+
ideVersions = ['IU-2019.3.5', 'IU-2020.2.4', 'IU-2021.2']
6159
}
6260

6361
runIde {
@@ -82,7 +80,9 @@ sourceSets {
8280
apply plugin: 'org.jetbrains.grammarkit'
8381

8482
// import is optional to make task creation easier
85-
import org.jetbrains.grammarkit.tasks.*
83+
84+
import org.jetbrains.grammarkit.tasks.GenerateLexer
85+
import org.jetbrains.grammarkit.tasks.GenerateParser
8686

8787
// GraphQL Parser and Lexer
8888
task generateGraphQLLexer(type: GenerateLexer) {

0 commit comments

Comments
 (0)