Skip to content

Commit 3c12ce0

Browse files
authored
fix types incorrect types entry (#3740)
1 parent dfb302a commit 3c12ce0

File tree

6 files changed

+24
-13
lines changed

6 files changed

+24
-13
lines changed

.changeset/nine-meals-happen.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphiql/plugin-code-exporter': patch
3+
'@graphiql/plugin-explorer': patch
4+
---
5+
6+
fix types incorrect types entry

packages/graphiql-plugin-code-exporter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
".": {
2828
"import": "./dist/index.mjs",
2929
"require": "./dist/index.js",
30-
"types": "./dist/types/index.d.ts"
30+
"types": "./dist/index.d.ts"
3131
}
3232
},
3333
"scripts": {

packages/graphiql-plugin-explorer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ function GraphiQLWithExplorer() {
4444

4545
You can also use this plugin with `unpkg`, `jsdelivr`, and other CDNs.
4646

47-
See the [example HTML file](examples/index.html) for this plugin
47+
See the [example HTML file](./example.html) for this plugin

packages/graphiql-plugin-explorer/examples/index.html renamed to packages/graphiql-plugin-explorer/example.html

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,20 @@
6868
const explorerPlugin = GraphiQLPluginExplorer.explorerPlugin();
6969

7070
const root = ReactDOM.createRoot(document.getElementById('graphiql'));
71-
root.render(
72-
React.createElement(GraphiQL, {
73-
fetcher: fetcher,
74-
defaultEditorToolsVisibility: true,
75-
plugins: [explorerPlugin],
76-
defaultQuery:
77-
'query AllFilms {\n allFilms {\n films {\n title\n }\n }\n}',
78-
}),
79-
);
71+
const app = React.createElement(GraphiQL, {
72+
fetcher,
73+
defaultEditorToolsVisibility: true,
74+
plugins: [explorerPlugin],
75+
defaultQuery: `query AllFilms {
76+
allFilms {
77+
films {
78+
title
79+
}
80+
}
81+
}`,
82+
});
83+
84+
root.render(app);
8085
</script>
8186
</body>
8287
</html>

packages/graphiql-plugin-explorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
".": {
2727
"import": "./dist/index.mjs",
2828
"require": "./dist/index.js",
29-
"types": "./dist/types/index.d.ts"
29+
"types": "./dist/index.d.ts"
3030
}
3131
},
3232
"scripts": {

packages/graphiql-plugin-explorer/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
.graphiql-explorer-graphql-arguments input {
6666
line-height: 0;
67-
min-width: 5rem;
67+
min-width: 2rem;
6868
}
6969

7070
.graphiql-explorer-actions {

0 commit comments

Comments
 (0)