Skip to content

Commit c836fe3

Browse files
committed
Support for gql tagged templates used by Apollo and Lokka GraphQL Clients (#25)
(cherry picked from commit 2ac5950)
1 parent c6cb854 commit c836fe3

22 files changed

+290
-68
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 1.4.1 (2016-09-11)
2+
3+
Features:
4+
5+
- Support for gql tagged templates used by Apollo and Lokka GraphQL Clients (#25)
6+
- Language Service 1.3.0 with Lokka and Apollo gql support (#25)
7+
- Persist endpoint selection to project configuration
8+
9+
Changes:
10+
11+
- Fixes false Error in Relay Mutation (#23)
12+
13+
114
## 1.4.0 (2016-08-28)
215

316
Features:

resources/META-INF/plugin.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<idea-plugin version="2">
1111
<id>com.intellij.lang.jsgraphql</id>
1212
<name>JS GraphQL</name>
13-
<version>1.4.0.143-145</version>
13+
<version>1.4.1.143-145</version>
1414
<vendor>Jim Kynde Meyer - [email protected]</vendor>
1515

1616
<description><![CDATA[
@@ -29,6 +29,7 @@
2929

3030
<change-notes><![CDATA[
3131
<ul>
32+
<li>1.4.1: Support for gql tagged templates used by Apollo and Lokka GraphQL Clients. Fixes false Error in Relay Mutation.</li>
3233
<li>1.4.0: Language Service 1.2.0 based on graphql 0.7.0 and codemirror-graphql 0.5.4. Basic editor support for GraphQL Schema (.graphqls)</li>
3334
<li>1.3.2: Removes GraphQL schema from scratch file formats.</li>
3435
<li>1.3.1: Fixes compatibility issue with WebStorm 2016.2 EAP.</li>
@@ -131,6 +132,7 @@
131132
<!-- Editor notification bars and markers -->
132133
<editorNotificationProvider implementation="com.intellij.lang.jsgraphql.ide.notifications.JSGraphQLNodeInterpreterEditorNotificationProvider"/>
133134
<editorNotificationProvider implementation="com.intellij.lang.jsgraphql.ide.notifications.JSGraphQLConfigEditorNotificationProvider"/>
135+
<editorNotificationProvider implementation="com.intellij.lang.jsgraphql.ide.notifications.JSGraphQLApolloLokkaEditorNotificationProvider"/>
134136
<codeInsight.lineMarkerProvider language="JavaScript" implementationClass="com.intellij.lang.jsgraphql.ide.editor.JSGraphQLLineMarkerProvider" />
135137

136138
<editorTabColorProvider implementation="com.intellij.lang.jsgraphql.schema.ide.project.JSGraphQLSchemaEditorTabColorProvider" />

src/main/com/intellij/lang/jsgraphql/icons/JSGraphQLIcons.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class JSGraphQLIcons {
1616
public static class Logos {
1717
public static final Icon GraphQL = JSGraphQLIcons.load("/com/intellij/lang/jsgraphql/icons/graphql.png");
1818
public static final Icon Relay = JSGraphQLIcons.load("/com/intellij/lang/jsgraphql/icons/relay.png");
19+
public static final Icon Apollo = JSGraphQLIcons.load("/com/intellij/lang/jsgraphql/icons/apollo.png");
20+
public static final Icon Lokka = JSGraphQLIcons.load("/com/intellij/lang/jsgraphql/icons/lokka.png");
1921
}
2022

2123
public static class Files {
1.23 KB
Loading
1.69 KB
Loading
1.64 KB
Loading
1.21 KB
Loading
1.32 KB
Loading
1.67 KB
Loading

src/main/com/intellij/lang/jsgraphql/ide/annotator/JSGraphQLAnnotator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public JSGraphQLAnnotationResult collectInformation(@NotNull PsiFile file, @NotN
5454
buffer = getWhitespacePaddedGraphQL(file, buffer);
5555
}
5656
if (buffer.length() > 0) {
57-
final boolean relay = JSGraphQLLanguageInjectionUtil.isRelayInjection(file);
58-
final AnnotationsResponse annotations = JSGraphQLNodeLanguageServiceClient.getAnnotations(buffer.toString(), file.getProject(), relay);
57+
final String environment = JSGraphQLLanguageInjectionUtil.getEnvironment(file);
58+
final AnnotationsResponse annotations = JSGraphQLNodeLanguageServiceClient.getAnnotations(buffer.toString(), file.getProject(), environment);
5959
return new JSGraphQLAnnotationResult(annotations, editor);
6060
}
6161
} else if(file instanceof JSGraphQLSchemaFile) {

0 commit comments

Comments
 (0)