Skip to content

Commit 208a859

Browse files
committed
Bump version of mini-graphql for new features
1 parent 89224ad commit 208a859

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
},
3434
"dependencies": {
3535
"codemirror": "^5.6.0",
36-
"codemirror-graphql": "^0.1.1",
37-
"graphql": "^0.4.3",
36+
"codemirror-graphql": "^0.5.7",
37+
"graphql": "^0.7.0",
3838
"marked": "^0.3.5"
3939
}
4040
}

resources/writer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ function writeReact(writePath, file, fileData) {
133133
resolve(
134134
withInitialRenders.replace(
135135
'</body></html>',
136-
`<script src="//cdn.jsdelivr.net/react/0.13.3/react.js"></script>` +
136+
`<script src="/vendor/react-15.0.1.min.js"></script>` +
137+
`<script src="/vendor/react-dom-15.0.1.min.js"></script>` +
137138
`<script src="${path.basename(writePath)}.${stats.hash}.js"></script></body></html>`
138139
)
139140
);
@@ -258,8 +259,8 @@ function writeScript(writePath, file, fileData) {
258259
resolve(
259260
withInitialRenders.replace(
260261
'</body></html>',
261-
`<script src="http://github.com/%3Cspan%20class="x x-first x-last">/cdn.jsdelivr.net/react/15.3.1/react.js"></script>` +
262-
`<script src="http://github.com/%3Cspan%20class="x x-first x-last">/cdn.jsdelivr.net/react/15.3.1/react-dom.js"></script>` +
262+
`<script src="http://github.com/%3Cspan%20class="x x-first x-last">vendor/react-15.0.1.min.js"></script>` +
263+
`<script src="http://github.com/%3Cspan%20class="x x-first x-last">vendor/react-dom-15.0.1.min.js"></script>` +
263264
`<script src="${path.basename(writePath)}.${stats.hash}.js"></script></body></html>`
264265
)
265266
);

site/_core/MiniGraphiQL.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,17 +315,14 @@ class QueryEditor extends React.Component {
315315
class ResultViewer extends React.Component {
316316
componentDidMount() {
317317
var CodeMirror = require('codemirror');
318-
require('codemirror/mode/javascript/javascript');
318+
require('codemirror-graphql/results/mode');
319319

320320
this.viewer = CodeMirror(this.domNode, {
321321
value: this.props.value || '',
322322
viewportMargin: Infinity,
323323
readOnly: true,
324324
theme: 'graphiql',
325-
mode: {
326-
name: 'javascript',
327-
json: true
328-
},
325+
mode: 'graphql-results',
329326
keyMap: 'sublime',
330327
extraKeys: {
331328
// Editor improvements

site/vendor/react-15.0.1.min.js

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/vendor/react-dom-15.0.1.min.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* ReactDOM v15.1.0
3+
*
4+
* Copyright 2013-present, Facebook, Inc.
5+
* All rights reserved.
6+
*
7+
* This source code is licensed under the BSD-style license found in the
8+
* LICENSE file in the root directory of this source tree. An additional grant
9+
* of patent rights can be found in the PATENTS file in the same directory.
10+
*
11+
*/
12+
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});

0 commit comments

Comments
 (0)