Skip to content

Commit d199a94

Browse files
committed
feat: editor tabs by @harshithpabbati, doc explorer as plugin
1 parent 9afaf1a commit d199a94

Some content is hidden

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

81 files changed

+483
-2100
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ module.exports = {
313313
},
314314
},
315315
{
316-
files: ['packages/{graphql-*,graphiql}/src/**'],
316+
files: ['packages/{graphql-*,graphiql}/src/**', 'plugins/*/src/**'],
317317
extends: ['plugin:jest/recommended'],
318318
env: {
319319
'jest/globals': true,
@@ -357,7 +357,7 @@ module.exports = {
357357
},
358358
{
359359
// Resources are typically our helper scripts; make life easier there
360-
files: ['resources/*.js', 'packages/*/resources/*.js'],
360+
files: ['resources/*.js', '**/resources/*.js'],
361361
rules: {
362362
'no-console': 0,
363363
'no-await-in-loop': 0,

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
'identity-obj-proxy',
1818
'\\.(css|less)$': 'identity-obj-proxy',
1919
'^graphql-language-([^/]+)': '<rootDir>/packages/graphql-language-$1/src',
20+
'^@graphiql-plugins\\/([^/]+)': '<rootDir>/plugins/$1/src',
2021
'^codemirror-graphql\\/([^]+)':
2122
'<rootDir>/packages/codemirror-graphql/src/$1',
2223
'^example-([^/]+)': '<rootDir>/examples/$1/src',

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"packages": ["packages/*", "examples/*"],
2+
"packages": ["packages/*", "examples/*", "plugins/*"],
33
"npmClient": "yarn",
44
"useWorkspaces": true,
55
"version": "independent",

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"license": "MIT",
44
"workspaces": [
55
"packages/*",
6-
"examples/*"
6+
"examples/*",
7+
"plugins/*"
78
],
89
"lint-staged": {
910
"*.{js,ts,jsx,tsx}": [
@@ -32,7 +33,7 @@
3233
"build-docs": "rimraf 'packages/graphiql/lsp' && typedoc 'packages'",
3334
"build-bundles": "yarn prebuild-bundles && yarn workspace graphiql run build-bundles",
3435
"prebuild-bundles": "yarn build-ts-esm && yarn build-bundles-clean",
35-
"build-bundles-clean": "rimraf '{packages,examples}/**/{bundle,cdn,webpack}' && lerna run build-bundles-clean",
36+
"build-bundles-clean": "rimraf '{packages,examples,plugins}/**/{bundle,cdn,webpack}' && lerna run build-bundles-clean",
3637
"tsc": "tsc --build",
3738
"test": "jest",
3839
"test-mocha": "yarn workspace codemirror-graphql run test",

packages/graphiql/.eslintrc.js.old

Lines changed: 0 additions & 298 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { configure, addDecorator } from '@storybook/react';
22
import React from 'react';
33
import requireContext from 'require-context.macro';
4-
import ThemeProvider from '../src/new-components/themes/provider';
4+
import ThemeProvider from '../src/components/common/themes/provider';
55

66
addDecorator(story => <ThemeProvider>{story()}</ThemeProvider>);
77

88
configure(
9-
requireContext('../src/new-components', true, /\.stories\.tsx$/),
9+
requireContext('../src/components/common', true, /\.stories\.tsx$/),
1010
module,
1111
);

packages/graphiql/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
"graphql-languageservice": "^2.4.0-alpha.7",
5252
"monaco-editor": "^0.20.0",
5353
"regenerator-runtime": "^0.13.5",
54-
"theme-ui": "^0.3.1"
54+
"theme-ui": "^0.3.1",
55+
"@graphiql-plugins/doc-explorer-classic": "^0.0.1"
5556
},
5657
"peerDependencies": {
5758
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './useOperation';
2+
export * from './useQueryFacts';
3+
export * from './useSchema';
4+
export * from './useValueRef';

packages/graphiql/src/api/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export * from './providers/GraphiQLEditorsProvider';
2+
export * from './providers/GraphiQLSessionProvider';
3+
export * from './providers/GraphiQLSchemaProvider';
4+
export * from './hooks';
5+
export * from './types';

0 commit comments

Comments
 (0)