@arcblock/graphql-playground 2.1.2 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -11,8 +11,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
- var _querystring = _interopRequireDefault(require("querystring"));
15
-
16
14
  var _axios = _interopRequireDefault(require("axios"));
17
15
 
18
16
  var _reactLoadScript = _interopRequireDefault(require("react-load-script"));
@@ -74,7 +72,7 @@ function GraphQLPlayground(props) {
74
72
  } = history.location;
75
73
  const params = (0, _Util.parseQuery)(search);
76
74
  params.query = newQuery;
77
- const newUrl = "".concat(pathname, "?").concat(_querystring.default.stringify(params));
75
+ const newUrl = "".concat(pathname, "?").concat((0, _Util.stringifyQuery)(params));
78
76
  history.replace(newUrl);
79
77
  };
80
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/graphql-playground",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
4
4
  "description": "A React Component to interact with GraphQL APIs",
5
5
  "keywords": [
6
6
  "react",
@@ -33,14 +33,13 @@
33
33
  "url": "https://github.com/ArcBlock/ux/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@arcblock/ux": "^2.1.2",
36
+ "@arcblock/ux": "^2.1.5",
37
37
  "axios": "^0.21.2",
38
38
  "core-js": "^3.6.4",
39
39
  "graphiql": "^0.13.2",
40
40
  "graphiql-code-exporter": "^2.0.5",
41
41
  "graphiql-explorer": "^0.4.3",
42
42
  "graphql": "^14.6.0",
43
- "querystring": "^0.2.1",
44
43
  "react-load-script": "^0.0.6",
45
44
  "react-router-dom": "^5.1.2",
46
45
  "styled-components": "^5.0.0"
@@ -60,5 +59,5 @@
60
59
  "eslint-plugin-react-hooks": "^4.2.0",
61
60
  "jest": "^24.1.0"
62
61
  },
63
- "gitHead": "a73064aaab5cde4fa378672c9c037cf427022123"
62
+ "gitHead": "6a480839e6280fae5ad34f6618e8f68635406f3e"
64
63
  }
package/src/index.js CHANGED
@@ -4,7 +4,6 @@
4
4
  import React, { useEffect, useState, useRef } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styled from 'styled-components';
7
- import qs from 'querystring';
8
7
  import axios from 'axios';
9
8
  import Script from 'react-load-script';
10
9
  import GraphiQL from 'graphiql';
@@ -18,7 +17,7 @@ import './graphiql.css';
18
17
  import 'graphiql-code-exporter/CodeExporter.css';
19
18
  import 'codemirror/theme/neo.css';
20
19
 
21
- import { mergeProps, parseQuery } from '@arcblock/ux/lib/Util';
20
+ import { mergeProps, parseQuery, stringifyQuery } from '@arcblock/ux/lib/Util';
22
21
  import { graphQLFetcher } from './util';
23
22
 
24
23
  export default function GraphQLPlayground(props) {
@@ -42,7 +41,7 @@ export default function GraphQLPlayground(props) {
42
41
  const { pathname, search } = history.location;
43
42
  const params = parseQuery(search);
44
43
  params.query = newQuery;
45
- const newUrl = `${pathname}?${qs.stringify(params)}`;
44
+ const newUrl = `${pathname}?${stringifyQuery(params)}`;
46
45
  history.replace(newUrl);
47
46
  };
48
47