-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:graphql/graphiql; branch 'patch-2' …
…of github.com:patrick91/graphiql into pr/patrick91/1978
- Loading branch information
Showing
52 changed files
with
4,431 additions
and
380 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"graphql-language-service-server": patch | ||
"graphql-language-service-cli": patch | ||
--- | ||
|
||
Fix unknown fragment errors on save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'graphiql': patch | ||
--- | ||
|
||
add react 17, 18 in peerDependencies |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
"graphiql": patch | ||
"monaco-graphql": patch | ||
"codemirror-graphql": patch | ||
"graphql-language-service-parser": patch | ||
"graphql-language-service": patch | ||
"graphql-language-service-server": patch | ||
"graphql-language-service-cli": patch | ||
--- | ||
|
||
adopt block string parsing for variables in language parser |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# GraphiQL CDN Example | ||
|
||
This example uses the CDN bundles to show the most simple example possible. It uses the latest version published on npm, via unpkg | ||
|
||
### Setup | ||
|
||
none required, just open the index.html! | ||
|
||
`open index.html` in osx | ||
`firefox index.html` or `chromium index.html` in linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!-- | ||
* Copyright (c) 2021 GraphQL Contributors | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
width: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
#graphiql { | ||
height: 100vh; | ||
} | ||
</style> | ||
|
||
<!-- | ||
This GraphiQL example depends on Promise and fetch, which are available in | ||
modern browsers, but can be "polyfilled" for older browsers. | ||
GraphiQL itself depends on React DOM. | ||
If you do not want to rely on a CDN, you can host these files locally or | ||
include them directly in your favored resource bunder. | ||
--> | ||
<script | ||
crossorigin | ||
src="https://unpkg.com/react@16/umd/react.development.js" | ||
></script> | ||
<script | ||
crossorigin | ||
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" | ||
></script> | ||
|
||
<!-- | ||
These two files can be found in the npm module, however you may wish to | ||
copy them directly into your environment, or perhaps include them in your | ||
favored resource bundler. | ||
--> | ||
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" /> | ||
</head> | ||
|
||
<body> | ||
<div id="graphiql">Loading...</div> | ||
<script | ||
src="https://unpkg.com/graphiql/graphiql.min.js" | ||
type="application/javascript" | ||
></script> | ||
<script src="/renderExample.js" type="application/javascript"></script> | ||
<script> | ||
// ONLY for the cdn bundle is `GraphiQL.createFetcher` included. It is not exported from graphiql npm module, for tree-shaking purposes | ||
var fetcher = GraphiQL.createFetcher({ | ||
url: 'https://swapi-graphql.netlify.com/.netlify/functions/index', | ||
}); | ||
|
||
ReactDOM.render( | ||
React.createElement(GraphiQL, { | ||
fetcher: fetcher, | ||
headerEditorEnabled: true, | ||
defaultVariableEditorOpen: true, | ||
}), | ||
document.getElementById('graphiql'), | ||
); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "example-graphiql-cdn-create-fetcher", | ||
"version": "0.0.8", | ||
"private": true, | ||
"license": "MIT", | ||
"description": "An example using GraphiQL and GraphiQL.createFetcher()", | ||
"scripts": { | ||
"build-demo": "copy index.html ../../packages/graphiql/cdn/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## GraphiQL Create Fetcher Example | ||
|
||
This example demonstrates how to transpile your own custom ES6 GraphiQL implementation with webpack, using `@graphiql/toolkit`'s `createGraphiQLFetcher()` to create a fetcher | ||
|
||
### Setup | ||
|
||
1. `yarn`, `yarn build` and `yarn build-bundles` (to build css) at the root of this repository, if you have not already. | ||
1. `yarn start` from this folder to start webpack dev server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../resources/babel.config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "example-graphiql-webpack-create-fetcher", | ||
"version": "1.1.1-alpha.8", | ||
"private": true, | ||
"license": "MIT", | ||
"description": "A GraphiQL example with webpack and typescript demonstrating createFetcher", | ||
"scripts": { | ||
"build-demo": "webpack-cli && yarn copy-demo", | ||
"copy-demo": "mkdirp ../../packages/graphiql/webpack && copy 'dist/*' '../../packages/graphiql/webpack'", | ||
"start": "cross-env NODE_ENV=development webpack-dev-server" | ||
}, | ||
"dependencies": { | ||
"graphiql": "file:../../packages/graphiql", | ||
"@graphiql/toolkit": "file:../../packages/graphiql-toolkit", | ||
"graphql": "experimental-stream-defer", | ||
"react": "16.13.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/preset-env": "^7.9.5", | ||
"@babel/preset-react": "^7.9.4", | ||
"babel-loader": "^8.1.0", | ||
"cross-env": "^7.0.2", | ||
"css-loader": "^3.5.1", | ||
"html-webpack-plugin": "^4.2.0", | ||
"react-dom": "^16.12.0", | ||
"style-loader": "^1.1.3", | ||
"webpack": "^4.42.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3", | ||
"worker-loader": "^2.0.0" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import GraphiQL from 'graphiql'; | ||
import { createGraphiQLFetcher } from '@graphiql/toolkit'; | ||
import 'graphiql/graphiql.css'; | ||
|
||
const Logo = () => <span>{'My Corp'}</span>; | ||
|
||
// See GraphiQL Readme - Advanced Usage section for more examples like this | ||
GraphiQL.Logo = Logo; | ||
|
||
const fetcher = createGraphiQLFetcher({ | ||
url: 'https://swapi-graphql.netlify.app/.netlify/functions/index', | ||
}); | ||
|
||
const App = () => ( | ||
<GraphiQL style={{ height: '100vh' }} headerEditorEnabled fetcher={fetcher} /> | ||
); | ||
|
||
render(<App />, document.getElementById('root')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('../../resources/webpack.config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
module.exports = { | ||
sourceMaps: true, | ||
presets: [ | ||
[ | ||
require.resolve('@babel/preset-env'), | ||
{ | ||
targets: 'latest 2 versions', | ||
modules: false, | ||
}, | ||
], | ||
require.resolve('@babel/preset-react'), | ||
], | ||
plugins: [require.resolve('@babel/plugin-proposal-class-properties')], | ||
}; | ||
module.exports = require('../../resources/babel.config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.