File tree Expand file tree Collapse file tree 11 files changed +37
-21
lines changed
graphiql-create-react-app/src
graphiql-plugin-code-exporter Expand file tree Collapse file tree 11 files changed +37
-21
lines changed Original file line number Diff line number Diff line change 33---
44
55migrate from ` webpack ` to ` vite `
6+
7+ changed exports
8+
9+ ``` diff
10+ - graphiql/graphiql.css
11+ + graphiql/style.css
12+ ```
13+
14+ changed cdn paths, ` dist/index.umd.js ` and ` dist/style.css ` are minified
15+
16+ ``` diff
17+ - https://unpkg.com/graphiql/graphiql.js
18+ - https://unpkg.com/graphiql/graphiql.min.js
19+ + https://unpkg.com/graphiql/dist/index.umd.js
20+ - https://unpkg.com/graphiql/graphiql.css
21+ - https://unpkg.com/graphiql/graphiql.min.css
22+ + https://unpkg.com/graphiql/dist/style.css
23+ ```
Original file line number Diff line number Diff line change 4242 favored resource bundler.
4343 -->
4444 < script
45- src ="https://unpkg.com/graphiql/graphiql.min .js "
46- type =" application/javascript "
45+ src ="https://unpkg.com/graphiql/dist/index.umd .js "
46+ crossorigin
4747 > </ script >
48- < link rel ="stylesheet " href ="https://unpkg.com/graphiql/graphiql.min .css " />
49- <!--
48+ < link rel ="stylesheet " href ="https://unpkg.com/graphiql/dist/style .css " />
49+ <!--
5050 These are imports for the GraphIQL Explorer plugin.
5151 -->
5252 < script
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { GraphiQL } from 'graphiql' ;
33import type { Fetcher } from '@graphiql/toolkit' ;
4- import 'graphiql/graphiql.min .css' ;
4+ import 'graphiql/style .css' ;
55
66const fetcher : Fetcher = async graphQLParams => {
77 const data = await fetch (
Original file line number Diff line number Diff line change 1616 < meta http-equiv ="X-UA-Compatible " content ="ie=edge " />
1717 < title > Parcel React Example</ title >
1818
19- < link rel ="stylesheet " href ="https://unpkg.com/graphiql/graphiql.min .css " />
19+ < link rel ="stylesheet " href ="https://unpkg.com/graphiql/dist/style .css " />
2020 </ head >
2121
2222 < body >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const resultConfig = {
4747 plugins : [
4848 // in order to prevent async modules for CDN builds
4949 // until we can guarantee it will work with the CDN properly
50- // and so that graphiql.min .js can retain parity
50+ // and so that `index.umd .js` can retain parity
5151 new HtmlWebpackPlugin ( {
5252 template : relPath ( 'src/index.html.ejs' ) ,
5353 filename : 'index.html' ,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import { useState } from 'react';
3131import { GraphiQL } from ' graphiql' ;
3232import { createGraphiQLFetcher } from ' @graphiql/toolkit' ;
3333import { codeExporterPlugin } from ' @graphiql/plugin-code-exporter' ;
34- import ' graphiql/graphiql .css' ;
34+ import ' graphiql/style .css' ;
3535import ' @graphiql/plugin-code-exporter/dist/style.css' ;
3636
3737const fetcher = createGraphiQLFetcher ({
Original file line number Diff line number Diff line change 2222 }
2323 </ style >
2424
25- < link rel ="stylesheet " href ="https://unpkg.com/graphiql/graphiql.min .css " />
25+ < link rel ="stylesheet " href ="https://unpkg.com/graphiql/dist/style .css " />
2626 < link
2727 rel ="stylesheet "
2828 href ="https://unpkg.com/@graphiql/plugin-code-exporter/dist/style.css "
4242 > </ script >
4343
4444 < script
45- src ="https://unpkg.com/graphiql/graphiql.min.js "
46- integrity ="sha512-FmqQBx9FVDKvUNDuimXswv4o1eqQUqzQYIuEoIkmkDaoXMUvmD9fKQXYSrSEMf5LQUEZr5EEMesxUzex2wS/hg== "
47- crossorigin ="anonymous "
45+ src ="https://unpkg.com/graphiql/dist/index.umd.js "
46+ crossorigin
4847 > </ script >
4948 < script
5049 src ="https://unpkg.com/@graphiql/plugin-code-exporter/dist/index.umd.js "
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ npm install react react-dom graphql
2525import { GraphiQL } from ' graphiql' ;
2626import { createGraphiQLFetcher } from ' @graphiql/toolkit' ;
2727import { explorerPlugin } from ' @graphiql/plugin-explorer' ;
28- import ' graphiql/graphiql .css' ;
28+ import ' graphiql/style .css' ;
2929import ' @graphiql/plugin-explorer/dist/style.css' ;
3030
3131const fetcher = createGraphiQLFetcher ({
Original file line number Diff line number Diff line change 2222 }
2323 </ style >
2424
25- < link rel ="stylesheet " href ="https://unpkg.com/graphiql/graphiql.min .css " />
25+ < link rel ="stylesheet " href ="https://unpkg.com/graphiql/dist/style .css " />
2626 < link
2727 rel ="stylesheet "
2828 href ="https://unpkg.com/@graphiql/plugin-explorer/dist/style.css "
4242 > </ script >
4343
4444 < script
45- src ="https://unpkg.com/graphiql/graphiql.min.js "
46- integrity ="sha512-FVCV2//UVo1qJ3Kg6kkHLe0Hg+IJhjrGa+aYHh8xD4KmwbbjthIzvaAcCJsQgA43+k+6u7HqORKXMyMt82Srfw== "
47- crossorigin ="anonymous "
45+ src ="https://unpkg.com/graphiql/dist/index.umd.js "
46+ crossorigin
4847 > </ script >
4948 < script
5049 src ="https://unpkg.com/@graphiql/plugin-explorer/dist/index.umd.js "
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ _/ˈɡrafək(ə)l/_ A graphical interactive in-browser GraphQL IDE.
6363With ` unpkg ` /` jsdelivr ` , etc.:
6464
6565``` html
66- <link href =" https://unpkg.com/graphiql/graphiql.min .css" rel =" stylesheet" />
67- <script crossorigin src =" https://unpkg.com/graphiql/graphiql.min .js" ></script >
66+ <link href =" https://unpkg.com/graphiql/dist/style .css" rel =" stylesheet" />
67+ <script crossorigin src =" https://unpkg.com/graphiql/dist/index.umd .js" ></script >
6868```
6969
7070(see: Usage UMD Bundle below for more required script tags)
@@ -107,7 +107,7 @@ import { createGraphiQLFetcher } from '@graphiql/toolkit';
107107import { GraphiQL } from ' graphiql' ;
108108import React from ' react' ;
109109import { createRoot } from ' react-dom/client' ;
110- import ' graphiql/graphiql .css' ;
110+ import ' graphiql/style .css' ;
111111
112112const fetcher = createGraphiQLFetcher ({ url: ' https://my.backend/graphql' });
113113
You can’t perform that action at this time.
0 commit comments