remove whitespace from source

This commit is contained in:
Bram van Neerven 2022-08-28 01:10:04 +02:00
parent 6d3de2c74b
commit e5cf24ae54
1 changed files with 192 additions and 192 deletions

View File

@ -66,54 +66,54 @@ impl<'a> GraphiQLSource<'a> {
};
r#"
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: %GRAPHIQL_URL%,
subscriptionUrl: %GRAPHIQL_SUBSCRIPTION_URL%,
headers: %GRAPHIQL_HEADERS%,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: %GRAPHIQL_URL%,
subscriptionUrl: %GRAPHIQL_SUBSCRIPTION_URL%,
headers: %GRAPHIQL_HEADERS%,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
.replace("%GRAPHIQL_URL%", &graphiql_url)
.replace("%GRAPHIQL_SUBSCRIPTION_URL%", &graphiql_subscription_url)
.replace("%GRAPHIQL_HEADERS%", &graphiql_headers)
@ -133,54 +133,54 @@ mod tests {
assert_eq!(
graphiql_source,
r#"
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: undefined,
headers: undefined,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: undefined,
headers: undefined,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
)
}
@ -194,54 +194,54 @@ mod tests {
assert_eq!(
graphiql_source,
r#"
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: 'ws://localhost:8000/ws',
headers: undefined,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: 'ws://localhost:8000/ws',
headers: undefined,
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
)
}
@ -256,54 +256,54 @@ mod tests {
assert_eq!(
graphiql_source,
r#"
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: 'ws://localhost:8000/ws',
headers: {"Authorization":"Bearer <token>"},
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
#graphiql {
height: 100vh;
}
</style>
<script
crossorigin
src="https://unpkg.com/react@17/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
></script>
<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>
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: GraphiQL.createFetcher({
url: 'http://localhost:8000',
subscriptionUrl: 'ws://localhost:8000/ws',
headers: {"Authorization":"Bearer <token>"},
}),
defaultEditorToolsVisibility: true,
}),
document.getElementById("graphiql")
);
</script>
</body>
</html>
"#
)
}
}