Skip to content

Commit

Permalink
Merge branch 'main' of github.com:graphql/graphiql into recent-missin…
Browse files Browse the repository at this point in the history
…g-coverage
  • Loading branch information
acao committed Apr 7, 2024
2 parents 25bd204 + 29e99a8 commit 278c6ed
Show file tree
Hide file tree
Showing 19 changed files with 592 additions and 255 deletions.
8 changes: 4 additions & 4 deletions examples/graphiql-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"start": "NODE_ENV=development webpack-cli serve"
},
"dependencies": {
"@graphiql/plugin-code-exporter": "^1.0.4",
"@graphiql/plugin-explorer": "^1.0.3",
"@graphiql/plugin-code-exporter": "^2.0.0",
"@graphiql/plugin-explorer": "^2.0.0",
"@graphiql/toolkit": "^0.9.1",
"@graphiql/react": "^0.20.3",
"graphiql": "^3.1.1",
"@graphiql/react": "^0.21.0",
"graphiql": "^3.2.0",
"graphql": "^16.8.1",
"graphql-ws": "^5.5.5",
"react": "^18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/codemirror-graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 2.0.11

### Patch Changes

- [#3567](https://github.com/graphql/graphiql/pull/3567) [`fc7de5a7`](https://github.com/graphql/graphiql/commit/fc7de5a75f4b23dd62dd630b705895b5fa5d0a03) Thanks [@retrodaredevil](https://github.com/retrodaredevil)! - tooltip a tag's click listener calls event.preventDefault() to stop navigating away from page

## 2.0.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codemirror-graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codemirror-graphql",
"version": "2.0.10",
"version": "2.0.11",
"description": "GraphQL mode and helpers for CodeMirror.",
"contributors": [
"Hyohyeon Jeong <[email protected]>",
Expand Down
3 changes: 3 additions & 0 deletions packages/codemirror-graphql/src/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ function text(
// want clicking the node to navigate anywhere.
node.href = 'javascript:void 0'; // eslint-disable-line no-script-url
node.addEventListener('click', (e: MouseEvent) => {
// Although an href of 'javascript:void 0' should never navigate away from the page,
// that is not always the case: https://github.com/graphql/graphiql/issues/3565
e.preventDefault();
onClick(ref, e);
});
} else {
Expand Down
14 changes: 14 additions & 0 deletions packages/graphiql-plugin-code-exporter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @graphiql/plugin-code-exporter

## 2.0.0

### Patch Changes

- Updated dependencies [[`5d051054`](https://github.com/graphql/graphiql/commit/5d05105469c3f0cbeb5e294da1cf6ff2355e4eb5)]:
- @graphiql/react@0.21.0

## 1.0.5

### Patch Changes

- Updated dependencies []:
- @graphiql/react@0.20.4

## 1.0.4

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/graphiql-plugin-code-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphiql/plugin-code-exporter",
"version": "1.0.4",
"version": "2.0.0",
"repository": {
"type": "git",
"url": "https://github.com/graphql/graphiql",
Expand Down Expand Up @@ -33,13 +33,13 @@
"graphiql-code-exporter": "^3.0.3"
},
"peerDependencies": {
"@graphiql/react": "^0.20.3",
"@graphiql/react": "^0.21.0",
"graphql": "^15.5.0 || ^16.0.0",
"react": "^16.8.0 || ^17 || ^18",
"react-dom": "^16.8.0 || ^17 || ^18"
},
"devDependencies": {
"@graphiql/react": "^0.20.3",
"@graphiql/react": "^0.21.0",
"@vitejs/plugin-react": "^4.0.1",
"graphql": "^16.8.1",
"postcss-nesting": "^10.1.7",
Expand Down
14 changes: 14 additions & 0 deletions packages/graphiql-plugin-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @graphiql/plugin-explorer

## 2.0.0

### Patch Changes

- Updated dependencies [[`5d051054`](https://github.com/graphql/graphiql/commit/5d05105469c3f0cbeb5e294da1cf6ff2355e4eb5)]:
- @graphiql/react@0.21.0

## 1.0.4

### Patch Changes

- Updated dependencies []:
- @graphiql/react@0.20.4

## 1.0.3

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/graphiql-plugin-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphiql/plugin-explorer",
"version": "1.0.3",
"version": "2.0.0",
"repository": {
"type": "git",
"url": "https://github.com/graphql/graphiql",
Expand Down Expand Up @@ -32,13 +32,13 @@
"graphiql-explorer": "^0.9.0"
},
"peerDependencies": {
"@graphiql/react": "^0.20.3",
"@graphiql/react": "^0.21.0",
"graphql": "^15.5.0 || ^16.0.0",
"react": "^16.8.0 || ^17 || ^18",
"react-dom": "^16.8.0 || ^17 || ^18"
},
"devDependencies": {
"@graphiql/react": "^0.20.3",
"@graphiql/react": "^0.21.0",
"@vitejs/plugin-react": "^4.0.1",
"graphql": "^16.8.1",
"react": "^18.2.0",
Expand Down
13 changes: 13 additions & 0 deletions packages/graphiql-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @graphiql/react

## 0.21.0

### Minor Changes

- [#3569](https://github.com/graphql/graphiql/pull/3569) [`5d051054`](https://github.com/graphql/graphiql/commit/5d05105469c3f0cbeb5e294da1cf6ff2355e4eb5) Thanks [@AaronMoat](https://github.com/AaronMoat)! - Update to markdown-it 14.x

## 0.20.4

### Patch Changes

- Updated dependencies [[`fc7de5a7`](https://github.com/graphql/graphiql/commit/fc7de5a75f4b23dd62dd630b705895b5fa5d0a03)]:
- [email protected]

## 0.20.3

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/graphiql-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphiql/react",
"version": "0.20.3",
"version": "0.21.0",
"repository": {
"type": "git",
"url": "https://github.com/graphql/graphiql",
Expand Down Expand Up @@ -57,11 +57,11 @@
"@types/codemirror": "^5.60.8",
"clsx": "^1.2.1",
"codemirror": "^5.65.3",
"codemirror-graphql": "^2.0.10",
"codemirror-graphql": "^2.0.11",
"copy-to-clipboard": "^3.2.0",
"framer-motion": "^6.5.1",
"graphql-language-service": "^5.2.0",
"markdown-it": "^12.2.0",
"markdown-it": "^14.1.0",
"set-value": "^4.1.0"
},
"devDependencies": {
Expand Down
18 changes: 18 additions & 0 deletions packages/graphiql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Change Log

## 3.2.0

### Minor Changes

- [#3569](https://github.com/graphql/graphiql/pull/3569) [`5d051054`](https://github.com/graphql/graphiql/commit/5d05105469c3f0cbeb5e294da1cf6ff2355e4eb5) Thanks [@AaronMoat](https://github.com/AaronMoat)! - Update to markdown-it 14.x

### Patch Changes

- Updated dependencies [[`5d051054`](https://github.com/graphql/graphiql/commit/5d05105469c3f0cbeb5e294da1cf6ff2355e4eb5)]:
- @graphiql/react@0.21.0

## 3.1.2

### Patch Changes

- Updated dependencies []:
- @graphiql/react@0.20.4

## 3.1.1

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/graphiql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphiql",
"version": "3.1.1",
"version": "3.2.0",
"description": "An graphical interactive in-browser GraphQL IDE.",
"contributors": [
"Hyohyeon Jeong <[email protected]>",
Expand Down Expand Up @@ -47,10 +47,10 @@
"webpack": "webpack-cli --config resources/webpack.config.js"
},
"dependencies": {
"@graphiql/react": "^0.20.3",
"@graphiql/react": "^0.21.0",
"@graphiql/toolkit": "^0.9.1",
"graphql-language-service": "^5.2.0",
"markdown-it": "^12.2.0"
"markdown-it": "^14.1.0"
},
"peerDependencies": {
"graphql": "^15.5.0 || ^16.0.0",
Expand All @@ -62,7 +62,7 @@
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
"@types/codemirror": "^0.0.90",
"@types/markdown-it": "^12.2.3",
"@types/markdown-it": "^13.0.7",
"@types/node": "^16.18.4",
"@types/testing-library__jest-dom": "5.14.5",
"babel-loader": "^9.1.2",
Expand Down
6 changes: 6 additions & 0 deletions packages/vscode-graphql-syntax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# vscode-graphql-syntax

## 1.3.5

### Patch Changes

- [#3545](https://github.com/graphql/graphiql/pull/3545) [`e9fc21ab`](https://github.com/graphql/graphiql/commit/e9fc21ab5f403a3e26cec555b29e5fb9db436838) Thanks [@kitten](https://github.com/kitten)! - Fix TextMate grammar to support string literals that don’t immediately follow a function call's left-parenthesis (`(`).

## 1.3.4

### Patch Changes
Expand Down
48 changes: 32 additions & 16 deletions packages/vscode-graphql-syntax/grammars/graphql.js.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"injectionSelector": "L:(meta.embedded.block.javascript | meta.embedded.block.typescript | source.js | source.ts | source.tsx | source.vue | source.svelte | source.astro) -source.graphql -inline.graphql -string -comment",
"patterns": [
{
"contentName": "meta.embedded.block.graphql",
"begin": "\\s*+(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)|(/\\* GraphQL \\*/))\\s*\\(?\\s*(`|')",
"begin": "\\s*+(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)\\s*(?:<.*>)?\\s*\\(",
"end": "\\)",
"beginCaptures": {
"1": {
"name": "variable.other.class.js"
Expand All @@ -14,29 +14,42 @@
},
"3": {
"name": "entity.name.function.tagged-template.js"
},
"4": {
"name": "comment.graphql.js"
},
"5": {
"name": "punctuation.definition.string.template.begin.js"
}
},
"end": "(`|')",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.template.end.js"
}
},
"patterns": [
{
"include": "source.graphql"
"contentName": "meta.embedded.block.graphql",
"begin": "(`|')",
"end": "(`|')",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.template.begin.js"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.template.end.js"
}
},
"patterns": [
{
"include": "source.graphql"
}
]
},
{
"patterns": [
{ "include": "source.js" },
{ "include": "source.ts" },
{ "include": "source.js.jsx" },
{ "include": "source.tsx" }
]
}
]
},
{
"contentName": "meta.embedded.block.graphql",
"begin": "\\s*+(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental))\\s*\\(?\\s*(?:<.*>)(`|')",
"begin": "\\s*+(?:(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)\\s*(?:<.*>)?\\s*)|(/\\* GraphQL \\*/))\\s*(`|')",
"beginCaptures": {
"1": {
"name": "variable.other.class.js"
Expand All @@ -48,6 +61,9 @@
"name": "entity.name.function.tagged-template.js"
},
"4": {
"name": "comment.graphql.js"
},
"5": {
"name": "punctuation.definition.string.template.begin.js"
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-graphql-syntax/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-graphql-syntax",
"version": "1.3.4",
"version": "1.3.5",
"displayName": "GraphQL: Syntax Highlighting",
"description": "Adds syntax highlighting support for .graphql & embedded support for javascript, typescript, vue, markdown, python, php, reason, ocaml and rescript",
"publisher": "GraphQL",
Expand Down
17 changes: 15 additions & 2 deletions packages/vscode-graphql-syntax/tests/__fixtures__/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,22 @@ const graphql = graphql(`
}
`);

const after1 = 'after';

const graphql = graphql(
`
query($id: ID!) { test }
`,
[var1, var2]
);

const after2 = 'after';

const query = /* GraphQL */ 'query { id } ';
const query = graphql('query { id } ');
const query = graphql('query($id: ID!) { id } ');
const query = graphql(
'query($id: ID!) { test }'
);

const queryWithInlineComment = `#graphql
query {
Expand All @@ -59,7 +73,6 @@ const queryWithInlineComment = `#graphql
}
}
`;
// TODO: fix this
const queryWithInlineComment = `
#graphql
query {
Expand Down
20 changes: 19 additions & 1 deletion packages/vscode-graphql-syntax/tests/__fixtures__/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,27 @@ const query = graphql<SomeGeneric>`
}
`;

// TODO: Fix this
const query = graphql<Generic>('query { id }');

const query = graphql(
'query { id }'
);

const query = graphql<Generic>(
'query { id }'
);

const query = graphql(`
query { id }
`);

const query = graphql(
`
query { id }
`,
[var1, var2]
);

const queryWithInlineComment = `#graphql
query {
user(id: "5", name: boolean) {
Expand Down
Loading

0 comments on commit 278c6ed

Please sign in to comment.