Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Code Exporter Plugin #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ dist/
/graphiqlWithExtensions.js
/graphiqlWithExtensions.min.js
/graphiqlWithExtensions.css
/graphiqlCodeExporter.css

.merlin
lib/
/.bsb.lock

# ide
/.idea
87 changes: 66 additions & 21 deletions examples/static.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style>
html,
body {
Expand All @@ -14,42 +15,83 @@
}
</style>

<!-- <link-->
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgrove Could you please help me in getting these links correct.

<!-- rel="stylesheet"-->
<!-- href="https://cdn.jsdelivr.net/npm/[email protected]/graphiqlWithExtensions.css"-->
<!-- integrity="sha384-GBqwox+q8UtVEyBLBKloN5QDlBDsQnuoSUfMeJH1ZtDiCrrk103D7Bg/WjIvl4ya"-->
<!-- crossorigin="anonymous"-->
<!-- />-->
<!-- <script-->
<!-- src="https://cdn.jsdelivr.net/npm/[email protected]/fetch.min.js"-->
<!-- integrity="sha384-dcF7KoWRaRpjcNbVPUFgatYgAijf8DqW6NWuqLdfB5Sb4Cdbb8iHX7bHsl9YhpKa"-->
<!-- crossorigin="anonymous"-->
<!-- ></script>-->
<!-- <script-->
<!-- src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"-->
<!-- integrity="sha384-qn+ML/QkkJxqn4LLs1zjaKxlTg2Bl/6yU/xBTJAgxkmNGc6kMZyeskAG0a7eJBR1"-->
<!-- crossorigin="anonymous"-->
<!-- ></script>-->
<!-- <script-->
<!-- src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js"-->
<!-- integrity="sha384-85IMG5rvmoDsmMeWK/qUU4kwnYXVpC+o9hoHMLi4bpNR+gMEiPLrvkZCgsr7WWgV"-->
<!-- crossorigin="anonymous"-->
<!-- ></script>-->
<!-- <script-->
<!-- src="https://cdn.jsdelivr.net/npm/[email protected]/graphiqlWithExtensions.min.js"-->
<!-- integrity="sha384-TqI6gT2PjmSrnEOTvGHLad1U4Vm5VoyzMmcKK0C/PLCWTnwPyXhCJY6NYhC/tp19"-->
<!-- crossorigin="anonymous"-->
<!-- ></script>-->




<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/graphiqlWithExtensions.css"
integrity="sha384-GBqwox+q8UtVEyBLBKloN5QDlBDsQnuoSUfMeJH1ZtDiCrrk103D7Bg/WjIvl4ya"
crossorigin="anonymous"
rel="stylesheet"
href="/Users/bshah6/Documents/node-test/node_modules/graphiql-with-extensions/graphiqlWithExtensions.css"
/>
<link
rel="stylesheet"
href="/Users/bshah6/Documents/node-test/node_modules/graphiql-with-extensions/graphiqlCodeExporter.css"
/>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/fetch.min.js"
integrity="sha384-dcF7KoWRaRpjcNbVPUFgatYgAijf8DqW6NWuqLdfB5Sb4Cdbb8iHX7bHsl9YhpKa"
crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/[email protected]/fetch.min.js"
integrity="sha384-dcF7KoWRaRpjcNbVPUFgatYgAijf8DqW6NWuqLdfB5Sb4Cdbb8iHX7bHsl9YhpKa"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"
integrity="sha384-qn+ML/QkkJxqn4LLs1zjaKxlTg2Bl/6yU/xBTJAgxkmNGc6kMZyeskAG0a7eJBR1"
crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"
integrity="sha384-qn+ML/QkkJxqn4LLs1zjaKxlTg2Bl/6yU/xBTJAgxkmNGc6kMZyeskAG0a7eJBR1"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js"
integrity="sha384-85IMG5rvmoDsmMeWK/qUU4kwnYXVpC+o9hoHMLi4bpNR+gMEiPLrvkZCgsr7WWgV"
crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js"
integrity="sha384-85IMG5rvmoDsmMeWK/qUU4kwnYXVpC+o9hoHMLi4bpNR+gMEiPLrvkZCgsr7WWgV"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/graphiqlWithExtensions.min.js"
integrity="sha384-TqI6gT2PjmSrnEOTvGHLad1U4Vm5VoyzMmcKK0C/PLCWTnwPyXhCJY6NYhC/tp19"
crossorigin="anonymous"
src="/Users/bshah6/Documents/node-test/node_modules/graphiql-with-extensions/graphiqlWithExtensions.min.js"
></script>

<script>


</script>


</head>
<body>
<div id="graphiql"></div>
<script>
var fetchURL = 'https://graphql-pokemon.now.sh/';
let fetchURL = 'https://graphql-pokemon.now.sh/';
let appId = 'c333eb5b-04b2-4709-9246-31e18db397e1';
let serverUrl = `https://serve.onegraph.com/dynamic?app_id=${appId}`;
let headers = {
Accept: 'application/json',
'Content-Type': 'application/json',
};

function graphQLFetcher(graphQLParams) {
var headers = {
Accept: 'application/json',
'Content-Type': 'application/json',
};


return fetch(fetchURL, {
method: 'post',
Expand All @@ -70,6 +112,9 @@
ReactDOM.render(
React.createElement(GraphiQLWithExtensions.GraphiQLWithExtensions, {
fetcher: graphQLFetcher,
serverUrl: serverUrl,
context: {},
headers: headers,
}),
document.getElementById('graphiql'),
);
Expand Down
Loading