diff --git a/.changeset/nine-meals-happen.md b/.changeset/nine-meals-happen.md new file mode 100644 index 0000000000..34b1551d19 --- /dev/null +++ b/.changeset/nine-meals-happen.md @@ -0,0 +1,6 @@ +--- +'@graphiql/plugin-code-exporter': patch +'@graphiql/plugin-explorer': patch +--- + +fix types incorrect types entry diff --git a/packages/graphiql-plugin-code-exporter/package.json b/packages/graphiql-plugin-code-exporter/package.json index 1a9e64a101..6766d5fd59 100644 --- a/packages/graphiql-plugin-code-exporter/package.json +++ b/packages/graphiql-plugin-code-exporter/package.json @@ -27,7 +27,7 @@ ".": { "import": "./dist/index.mjs", "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "types": "./dist/index.d.ts" } }, "scripts": { diff --git a/packages/graphiql-plugin-explorer/README.md b/packages/graphiql-plugin-explorer/README.md index 57fb71e940..7ea41b8c2d 100644 --- a/packages/graphiql-plugin-explorer/README.md +++ b/packages/graphiql-plugin-explorer/README.md @@ -44,4 +44,4 @@ function GraphiQLWithExplorer() { You can also use this plugin with `unpkg`, `jsdelivr`, and other CDNs. -See the [example HTML file](examples/index.html) for this plugin +See the [example HTML file](./example.html) for this plugin diff --git a/packages/graphiql-plugin-explorer/examples/index.html b/packages/graphiql-plugin-explorer/example.html similarity index 85% rename from packages/graphiql-plugin-explorer/examples/index.html rename to packages/graphiql-plugin-explorer/example.html index 67109fa9b8..7d07347f1a 100644 --- a/packages/graphiql-plugin-explorer/examples/index.html +++ b/packages/graphiql-plugin-explorer/example.html @@ -68,15 +68,20 @@ const explorerPlugin = GraphiQLPluginExplorer.explorerPlugin(); const root = ReactDOM.createRoot(document.getElementById('graphiql')); - root.render( - React.createElement(GraphiQL, { - fetcher: fetcher, - defaultEditorToolsVisibility: true, - plugins: [explorerPlugin], - defaultQuery: - 'query AllFilms {\n allFilms {\n films {\n title\n }\n }\n}', - }), - ); + const app = React.createElement(GraphiQL, { + fetcher, + defaultEditorToolsVisibility: true, + plugins: [explorerPlugin], + defaultQuery: `query AllFilms { + allFilms { + films { + title + } + } +}`, + }); + + root.render(app); diff --git a/packages/graphiql-plugin-explorer/package.json b/packages/graphiql-plugin-explorer/package.json index 3d5e853b0b..ec88413e4f 100644 --- a/packages/graphiql-plugin-explorer/package.json +++ b/packages/graphiql-plugin-explorer/package.json @@ -26,7 +26,7 @@ ".": { "import": "./dist/index.mjs", "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "types": "./dist/index.d.ts" } }, "scripts": { diff --git a/packages/graphiql-plugin-explorer/src/index.css b/packages/graphiql-plugin-explorer/src/index.css index eb05824538..36c1f2b95d 100644 --- a/packages/graphiql-plugin-explorer/src/index.css +++ b/packages/graphiql-plugin-explorer/src/index.css @@ -64,7 +64,7 @@ .graphiql-explorer-graphql-arguments input { line-height: 0; - min-width: 5rem; + min-width: 2rem; } .graphiql-explorer-actions {