@webiny/app-graphql-playground 0.0.0-unstable.99666aeb00 → 0.0.0-unstable.a9593f74dd
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/index.d.ts +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +15 -16
- package/plugins/Playground.d.ts +2 -2
- package/plugins/Playground.js +15 -30
- package/plugins/Playground.js.map +1 -1
- package/plugins/Playground.styles.d.ts +0 -2
- package/plugins/Playground.styles.js +3 -1
- package/plugins/Playground.styles.js.map +1 -1
- package/plugins/index.js +4 -2
- package/plugins/index.js.map +1 -1
- package/plugins/settings.js +3 -1
- package/plugins/settings.js.map +1 -1
- package/types.js +3 -1
package/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ interface CreateApolloClientParams {
|
|
|
6
6
|
interface GraphQLPlaygroundProps {
|
|
7
7
|
createApolloClient(params: CreateApolloClientParams): ApolloClient<any>;
|
|
8
8
|
}
|
|
9
|
-
export declare const GraphQLPlayground: React.
|
|
9
|
+
export declare const GraphQLPlayground: React.MemoExoticComponent<({ createApolloClient }: GraphQLPlaygroundProps) => JSX.Element>;
|
|
10
10
|
export {};
|
package/index.js
CHANGED
|
@@ -31,4 +31,6 @@ var GraphQLPlaygroundExtension = function GraphQLPlaygroundExtension(_ref) {
|
|
|
31
31
|
}))));
|
|
32
32
|
};
|
|
33
33
|
var GraphQLPlayground = /*#__PURE__*/(0, _react.memo)(GraphQLPlaygroundExtension);
|
|
34
|
-
exports.GraphQLPlayground = GraphQLPlayground;
|
|
34
|
+
exports.GraphQLPlayground = GraphQLPlayground;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GraphQLPlaygroundExtension","createApolloClient","plugins","register","playgroundPlugins","GraphQLPlayground","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { memo } from \"react\";\nimport { ApolloClient } from \"apollo-client\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Plugins, AddMenu, AddRoute, Layout } from \"@webiny/app-admin\";\nimport { ReactComponent as InfoIcon } from \"./assets/graphql.svg\";\nimport Playground from \"./plugins/Playground\";\nimport playgroundPlugins from \"./plugins\";\n\ninterface CreateApolloClientParams {\n uri: string;\n}\ninterface GraphQLPlaygroundProps {\n createApolloClient(params: CreateApolloClientParams): ApolloClient<any>;\n}\n\nconst GraphQLPlaygroundExtension
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_plugins","_appAdmin","_graphql","_Playground","_interopRequireDefault","_plugins2","GraphQLPlaygroundExtension","_ref","createApolloClient","plugins","register","playgroundPlugins","default","createElement","Plugins","AddMenu","name","label","path","icon","ReactComponent","tags","AddRoute","exact","Layout","title","GraphQLPlayground","memo","exports"],"sources":["index.tsx"],"sourcesContent":["import React, { memo } from \"react\";\nimport { ApolloClient } from \"apollo-client\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Plugins, AddMenu, AddRoute, Layout } from \"@webiny/app-admin\";\nimport { ReactComponent as InfoIcon } from \"./assets/graphql.svg\";\nimport Playground from \"./plugins/Playground\";\nimport playgroundPlugins from \"./plugins\";\n\ninterface CreateApolloClientParams {\n uri: string;\n}\ninterface GraphQLPlaygroundProps {\n createApolloClient(params: CreateApolloClientParams): ApolloClient<any>;\n}\n\nconst GraphQLPlaygroundExtension = ({ createApolloClient }: GraphQLPlaygroundProps) => {\n plugins.register(playgroundPlugins);\n\n return (\n <Plugins>\n <AddMenu\n name={\"apiPlayground\"}\n label={\"API Playground\"}\n path={\"/api-playground\"}\n icon={<InfoIcon />}\n tags={[\"footer\"]}\n />\n <AddRoute exact path={\"/api-playground\"}>\n <Layout title={\"API Playground\"}>\n <Playground createApolloClient={createApolloClient} />\n </Layout>\n </AddRoute>\n </Plugins>\n );\n};\n\nexport const GraphQLPlayground = memo(GraphQLPlaygroundExtension);\n"],"mappings":";;;;;;;;AAAA,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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-graphql-playground",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.a9593f74dd",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@emotion/react": "11.10.8",
|
|
13
13
|
"@emotion/styled": "11.10.6",
|
|
14
|
-
"@webiny/app": "0.0.0-unstable.
|
|
15
|
-
"@webiny/app-admin": "0.0.0-unstable.
|
|
16
|
-
"@webiny/app-i18n": "0.0.0-unstable.
|
|
17
|
-
"@webiny/app-security": "0.0.0-unstable.
|
|
18
|
-
"@webiny/plugins": "0.0.0-unstable.
|
|
19
|
-
"@webiny/ui": "0.0.0-unstable.
|
|
14
|
+
"@webiny/app": "0.0.0-unstable.a9593f74dd",
|
|
15
|
+
"@webiny/app-admin": "0.0.0-unstable.a9593f74dd",
|
|
16
|
+
"@webiny/app-i18n": "0.0.0-unstable.a9593f74dd",
|
|
17
|
+
"@webiny/app-security": "0.0.0-unstable.a9593f74dd",
|
|
18
|
+
"@webiny/plugins": "0.0.0-unstable.a9593f74dd",
|
|
19
|
+
"@webiny/ui": "0.0.0-unstable.a9593f74dd",
|
|
20
20
|
"apollo-cache": "1.3.5",
|
|
21
21
|
"apollo-client": "2.6.10",
|
|
22
22
|
"apollo-link": "1.2.14",
|
|
@@ -29,16 +29,15 @@
|
|
|
29
29
|
"react-dom": "17.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@babel/cli": "7.
|
|
33
|
-
"@babel/core": "7.
|
|
32
|
+
"@babel/cli": "7.22.6",
|
|
33
|
+
"@babel/core": "7.22.8",
|
|
34
34
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
35
|
-
"@babel/preset-env": "7.
|
|
36
|
-
"@babel/preset-react": "7.
|
|
37
|
-
"@babel/preset-typescript": "7.
|
|
38
|
-
"@webiny/cli": "0.0.0-unstable.
|
|
39
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
35
|
+
"@babel/preset-env": "7.22.7",
|
|
36
|
+
"@babel/preset-react": "7.22.5",
|
|
37
|
+
"@babel/preset-typescript": "7.22.5",
|
|
38
|
+
"@webiny/cli": "0.0.0-unstable.a9593f74dd",
|
|
39
|
+
"@webiny/project-utils": "0.0.0-unstable.a9593f74dd",
|
|
40
40
|
"babel-plugin-emotion": "9.2.11",
|
|
41
|
-
"babel-plugin-lodash": "3.3.4",
|
|
42
41
|
"rimraf": "3.0.2",
|
|
43
42
|
"typescript": "4.7.4"
|
|
44
43
|
},
|
|
@@ -60,5 +59,5 @@
|
|
|
60
59
|
]
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a9593f74ddf9ce93263eadb0ddc0807ed343f5ee"
|
|
64
63
|
}
|
package/plugins/Playground.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import ApolloClient from "apollo-client";
|
|
3
3
|
interface CreateApolloClientParams {
|
|
4
4
|
uri: string;
|
|
@@ -6,5 +6,5 @@ interface CreateApolloClientParams {
|
|
|
6
6
|
interface PlaygroundProps {
|
|
7
7
|
createApolloClient: (params: CreateApolloClientParams) => ApolloClient<any>;
|
|
8
8
|
}
|
|
9
|
-
declare const Playground:
|
|
9
|
+
declare const Playground: ({ createApolloClient }: PlaygroundProps) => JSX.Element;
|
|
10
10
|
export default Playground;
|
package/plugins/Playground.js
CHANGED
|
@@ -7,9 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
12
|
var _apolloLink = require("apollo-link");
|
|
15
13
|
var _apolloLinkContext = require("apollo-link-context");
|
|
@@ -24,40 +22,25 @@ var _settings = require("./settings");
|
|
|
24
22
|
var _config = require("@webiny/app/config");
|
|
25
23
|
/**
|
|
26
24
|
* Package load-script does not have types.
|
|
27
|
-
*/
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
|
|
25
|
+
*/ // @ts-expect-error
|
|
30
26
|
var withHeaders = function withHeaders(link, headers) {
|
|
31
|
-
return _apolloLink.ApolloLink.from([(0, _apolloLinkContext.setContext)(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
while (1) switch (_context.prev = _context.next) {
|
|
35
|
-
case 0:
|
|
36
|
-
return _context.abrupt("return", {
|
|
37
|
-
headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, req.headers), headers)
|
|
38
|
-
});
|
|
39
|
-
case 1:
|
|
40
|
-
case "end":
|
|
41
|
-
return _context.stop();
|
|
42
|
-
}
|
|
43
|
-
}, _callee);
|
|
44
|
-
}));
|
|
45
|
-
return function (_x, _x2) {
|
|
46
|
-
return _ref.apply(this, arguments);
|
|
27
|
+
return _apolloLink.ApolloLink.from([(0, _apolloLinkContext.setContext)(async function (_, req) {
|
|
28
|
+
return {
|
|
29
|
+
headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, req.headers), headers)
|
|
47
30
|
};
|
|
48
|
-
}
|
|
31
|
+
}), link]);
|
|
49
32
|
};
|
|
50
33
|
var initScripts = function initScripts() {
|
|
51
34
|
return new Promise(function (resolve) {
|
|
52
|
-
// @ts-
|
|
35
|
+
// @ts-expect-error
|
|
53
36
|
if (window.GraphQLPlayground) {
|
|
54
37
|
return resolve();
|
|
55
38
|
}
|
|
56
39
|
return (0, _loadScript.default)("https://cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react@1.7.32/build/static/js/middleware.js", resolve);
|
|
57
40
|
});
|
|
58
41
|
};
|
|
59
|
-
var Playground = function Playground(
|
|
60
|
-
var createApolloClient =
|
|
42
|
+
var Playground = function Playground(_ref) {
|
|
43
|
+
var createApolloClient = _ref.createApolloClient;
|
|
61
44
|
var _useState = (0, _react.useState)(true),
|
|
62
45
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
63
46
|
loading = _useState2[0],
|
|
@@ -74,9 +57,9 @@ var Playground = function Playground(_ref2) {
|
|
|
74
57
|
identity: identity
|
|
75
58
|
});
|
|
76
59
|
}).filter(Boolean);
|
|
77
|
-
var createApolloLink = (0, _react.useCallback)(function (
|
|
78
|
-
var endpoint =
|
|
79
|
-
headers =
|
|
60
|
+
var createApolloLink = (0, _react.useCallback)(function (_ref2) {
|
|
61
|
+
var endpoint = _ref2.endpoint,
|
|
62
|
+
headers = _ref2.headers;
|
|
80
63
|
var current = links.current;
|
|
81
64
|
// If the request endpoint is not know to us, return the first available
|
|
82
65
|
var apiUrl = _config.config.getKey("API_URL", process.env.REACT_APP_API_URL);
|
|
@@ -101,7 +84,7 @@ var Playground = function Playground(_ref2) {
|
|
|
101
84
|
}, []);
|
|
102
85
|
(0, _react.useEffect)(function () {
|
|
103
86
|
if (!loading) {
|
|
104
|
-
// @ts-
|
|
87
|
+
// @ts-expect-error
|
|
105
88
|
window.GraphQLPlayground.init(document.getElementById("graphql-playground"), {
|
|
106
89
|
tabs: tabs,
|
|
107
90
|
createApolloLink: createApolloLink,
|
|
@@ -118,4 +101,6 @@ var Playground = function Playground(_ref2) {
|
|
|
118
101
|
}));
|
|
119
102
|
};
|
|
120
103
|
var _default = Playground;
|
|
121
|
-
exports.default = _default;
|
|
104
|
+
exports.default = _default;
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=Playground.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withHeaders","link","headers","ApolloLink","from","setContext","_","req","initScripts","Promise","resolve","window","GraphQLPlayground","loadScript","Playground","createApolloClient","useState","loading","setLoading","useI18N","getCurrentLocale","useSecurity","identity","links","useRef","locale","tabs","plugins","byType","map","pl","tab","filter","Boolean","createApolloLink","useCallback","endpoint","current","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","includes","Object","values","uri","useEffect","then","init","document","getElementById","settings","playgroundDialog"],"sources":["Playground.tsx"],"sourcesContent":["import React, { Fragment, useEffect, useRef, useCallback, useState } from \"react\";\nimport { ApolloLink } from \"apollo-link\";\nimport { setContext } from \"apollo-link-context\";\n/**\n * Package load-script does not have types.\n */\n// @ts-
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_apolloLink","_apolloLinkContext","_loadScript","_interopRequireDefault","_react2","_plugins","_useI18N2","_appSecurity","_Progress","_Playground","_settings","_config","withHeaders","link","headers","ApolloLink","from","setContext","_","req","_objectSpread2","default","initScripts","Promise","resolve","window","GraphQLPlayground","loadScript","Playground","_ref","createApolloClient","_useState","useState","_useState2","_slicedToArray2","loading","setLoading","_useI18N","useI18N","getCurrentLocale","_useSecurity","useSecurity","identity","links","useRef","locale","tabs","plugins","byType","map","pl","tab","filter","Boolean","createApolloLink","useCallback","_ref2","endpoint","current","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","includes","Object","values","uri","useEffect","then","init","document","getElementById","settings","createElement","Fragment","CircularProgress","label","PlaygroundContainer","id","Global","styles","playgroundDialog","_default","exports"],"sources":["Playground.tsx"],"sourcesContent":["import React, { Fragment, useEffect, useRef, useCallback, useState } from \"react\";\nimport { ApolloLink } from \"apollo-link\";\nimport { setContext } from \"apollo-link-context\";\n/**\n * Package load-script does not have types.\n */\n// @ts-expect-error\nimport loadScript from \"load-script\";\nimport { Global } from \"@emotion/react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { useI18N } from \"@webiny/app-i18n/hooks/useI18N\";\nimport { useSecurity } from \"@webiny/app-security\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { playgroundDialog, PlaygroundContainer } from \"./Playground.styles\";\nimport { settings } from \"./settings\";\nimport { config as appConfig } from \"@webiny/app/config\";\nimport ApolloClient from \"apollo-client\";\nimport { GraphQLPlaygroundTabPlugin } from \"~/types\";\nimport { SecurityIdentity } from \"@webiny/app-security/types\";\n\nconst withHeaders = (link: ApolloLink, headers: Record<string, string>): ApolloLink => {\n return ApolloLink.from([\n setContext(async (_, req) => {\n return {\n headers: {\n ...req.headers,\n ...headers\n }\n };\n }),\n link\n ]);\n};\n\nconst initScripts = () => {\n return new Promise((resolve: any) => {\n // @ts-expect-error\n if (window.GraphQLPlayground) {\n return resolve();\n }\n\n return loadScript(\n \"https://cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react@1.7.32/build/static/js/middleware.js\",\n resolve\n );\n });\n};\n\ninterface CreateApolloClientParams {\n uri: string;\n}\ninterface PlaygroundProps {\n createApolloClient: (params: CreateApolloClientParams) => ApolloClient<any>;\n}\nconst Playground = ({ createApolloClient }: PlaygroundProps) => {\n const [loading, setLoading] = useState(true);\n const { getCurrentLocale } = useI18N();\n const { identity } = useSecurity();\n const links = useRef<Record<string, ApolloLink>>({});\n\n const locale = getCurrentLocale(\"content\");\n\n const tabs = plugins\n .byType<GraphQLPlaygroundTabPlugin>(\"graphql-playground-tab\")\n .map(pl =>\n pl.tab({\n locale: locale as string,\n identity: identity as SecurityIdentity\n })\n )\n .filter(Boolean);\n\n const createApolloLink = useCallback(({ endpoint, headers }) => {\n const current = links.current;\n // If the request endpoint is not know to us, return the first available\n const apiUrl = appConfig.getKey(\"API_URL\", process.env.REACT_APP_API_URL);\n if (!endpoint.includes(apiUrl)) {\n return { link: withHeaders(Object.values(current)[0], headers) };\n }\n\n if (!current[endpoint]) {\n current[endpoint] = createApolloClient({ uri: endpoint }).link;\n }\n\n return {\n link: withHeaders(current[endpoint], headers)\n };\n }, []);\n\n useEffect(() => {\n initScripts().then(() => {\n setLoading(false);\n });\n }, []);\n\n useEffect(() => {\n if (!loading) {\n // @ts-expect-error\n window.GraphQLPlayground.init(document.getElementById(\"graphql-playground\"), {\n tabs,\n createApolloLink,\n settings\n });\n }\n }, [loading]);\n\n return (\n <Fragment>\n {loading ? (\n <CircularProgress label={\"Loading playground...\"} />\n ) : (\n <PlaygroundContainer id={\"graphql-playground\"} />\n )}\n <Global styles={playgroundDialog} />\n </Fragment>\n );\n};\n\nexport default Playground;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAZA;AACA;AACA,GAFA,CAGA;AAcA,IAAMa,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAgB,EAAEC,OAA+B,EAAiB;EACnF,OAAOC,sBAAU,CAACC,IAAI,CAAC,CACnB,IAAAC,6BAAU,EAAC,gBAAOC,CAAC,EAAEC,GAAG,EAAK;IACzB,OAAO;MACHL,OAAO,MAAAM,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACAF,GAAG,CAACL,OAAO,GACXA,OAAO;IAElB,CAAC;EACL,CAAC,CAAC,EACFD,IAAI,CACP,CAAC;AACN,CAAC;AAED,IAAMS,WAAW,GAAG,SAAdA,WAAWA,CAAA,EAAS;EACtB,OAAO,IAAIC,OAA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AA,CAAAqE,gBAAgB;IAACC,KAAK,EAAE;EAAwB,CAAE,CAAC,gBAEpDjF,MAAA,CAAAwB,OAAA,CAAAsD,aAAA,CAAClE,WAAA,CAAAsE,mBAAmB;IAACC,EAAE,EAAE;EAAqB,CAAE,CACnD,eACDnF,MAAA,CAAAwB,OAAA,CAAAsD,aAAA,CAACvE,OAAA,CAAA6E,MAAM;IAACC,MAAM,EAAEC;EAAiB,CAAE,CAC7B,CAAC;AAEnB,CAAC;AAAC,IAAAC,QAAA,GAEaxD,UAAU;AAAAyD,OAAA,CAAAhE,OAAA,GAAA+D,QAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
/// <reference types="web" />
|
|
4
2
|
export declare const PlaygroundContainer: import("@emotion/styled").StyledComponent<{
|
|
5
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
6
4
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -49,4 +49,6 @@ exports.PlaygroundContainer = PlaygroundContainer;
|
|
|
49
49
|
var playgroundDialog = {
|
|
50
50
|
".ReactModalPortal": sharedStyles
|
|
51
51
|
};
|
|
52
|
-
exports.playgroundDialog = playgroundDialog;
|
|
52
|
+
exports.playgroundDialog = playgroundDialog;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=Playground.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sharedStyles","margin","padding","color","outline","border","fontFamily","code","PlaygroundContainer","styled","marginTop","overflow","height","WebkitFontSmoothing","MozOsxFontSmoothing","lineHeight","letterSpacing","marginRight","playgroundDialog"],"sources":["Playground.styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nconst sharedStyles = {\n \"p, a, h1, h2, h3, h4, ul, pre, code\": {\n margin: 0,\n padding: 0,\n color: \"inherit\"\n },\n \"a:active, a:focus, button:focus, input:focus\": {\n outline: \"none\"\n },\n \"input, button, submit\": {\n border: \"none\"\n },\n \"input, button, pre\": {\n fontFamily: \"'Open Sans', sans-serif\"\n },\n code: {\n fontFamily: \"Consolas, monospace\"\n }\n};\n\nexport const PlaygroundContainer = styled(\"div\")({\n marginTop: -3,\n overflow: \"hidden\",\n \".playground\": {\n height: \"calc(100vh - 64px)\",\n margin: 0,\n padding: 0,\n fontFamily: \"'Open Sans', sans-serif\",\n WebkitFontSmoothing: \"antialiased\",\n MozOsxFontSmoothing: \"grayscale\",\n color: \"rgba(0,0,0,.8)\",\n lineHeight: 1.5,\n letterSpacing: 0.53,\n marginRight: \"-1px !important\",\n ...sharedStyles\n }\n});\n\nexport const playgroundDialog = {\n \".ReactModalPortal\": sharedStyles\n};\n"],"mappings":";;;;;;;;AAAA;AAEA,
|
|
1
|
+
{"version":3,"names":["_styled","_interopRequireDefault","require","sharedStyles","margin","padding","color","outline","border","fontFamily","code","PlaygroundContainer","styled","target","label","marginTop","overflow","_objectSpread2","default","height","WebkitFontSmoothing","MozOsxFontSmoothing","lineHeight","letterSpacing","marginRight","exports","playgroundDialog"],"sources":["Playground.styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nconst sharedStyles = {\n \"p, a, h1, h2, h3, h4, ul, pre, code\": {\n margin: 0,\n padding: 0,\n color: \"inherit\"\n },\n \"a:active, a:focus, button:focus, input:focus\": {\n outline: \"none\"\n },\n \"input, button, submit\": {\n border: \"none\"\n },\n \"input, button, pre\": {\n fontFamily: \"'Open Sans', sans-serif\"\n },\n code: {\n fontFamily: \"Consolas, monospace\"\n }\n};\n\nexport const PlaygroundContainer = styled(\"div\")({\n marginTop: -3,\n overflow: \"hidden\",\n \".playground\": {\n height: \"calc(100vh - 64px)\",\n margin: 0,\n padding: 0,\n fontFamily: \"'Open Sans', sans-serif\",\n WebkitFontSmoothing: \"antialiased\",\n MozOsxFontSmoothing: \"grayscale\",\n color: \"rgba(0,0,0,.8)\",\n lineHeight: 1.5,\n letterSpacing: 0.53,\n marginRight: \"-1px !important\",\n ...sharedStyles\n }\n});\n\nexport const playgroundDialog = {\n \".ReactModalPortal\": sharedStyles\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAMC,YAAY,GAAG;EACjB,qCAAqC,EAAE;IACnCC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE,CAAC;IACVC,KAAK,EAAE;EACX,CAAC;EACD,8CAA8C,EAAE;IAC5CC,OAAO,EAAE;EACb,CAAC;EACD,uBAAuB,EAAE;IACrBC,MAAM,EAAE;EACZ,CAAC;EACD,oBAAoB,EAAE;IAClBC,UAAU,EAAE;EAChB,CAAC;EACDC,IAAI,EAAE;IACFD,UAAU,EAAE;EAChB;AACJ,CAAC;AAEM,IAAME,mBAAmB,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EAC7CC,SAAS,EAAE,CAAC,CAAC;EACbC,QAAQ,EAAE,QAAQ;EAClB,aAAa,MAAAC,cAAA,CAAAC,OAAA;IACTC,MAAM,EAAE,oBAAoB;IAC5Bf,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE,CAAC;IACVI,UAAU,EAAE,yBAAyB;IACrCW,mBAAmB,EAAE,aAAa;IAClCC,mBAAmB,EAAE,WAAW;IAChCf,KAAK,EAAE,gBAAgB;IACvBgB,UAAU,EAAE,GAAG;IACfC,aAAa,EAAE,IAAI;IACnBC,WAAW,EAAE;EAAiB,GAC3BrB,YAAY;AAEvB,CAAC,CAAC;AAACsB,OAAA,CAAAd,mBAAA,GAAAA,mBAAA;AAEI,IAAMe,gBAAgB,GAAG;EAC5B,mBAAmB,EAAEvB;AACzB,CAAC;AAACsB,OAAA,CAAAC,gBAAA,GAAAA,gBAAA"}
|
package/plugins/index.js
CHANGED
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _placeholder = _interopRequireDefault(require("!!raw-loader!./placeholder.graphql"));
|
|
9
9
|
var _config = require("@webiny/app/config");
|
|
10
|
-
// @ts-
|
|
10
|
+
// @ts-expect-error
|
|
11
11
|
|
|
12
12
|
var plugin = {
|
|
13
13
|
type: "graphql-playground-tab",
|
|
@@ -22,4 +22,6 @@ var plugin = {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
var _default = [plugin];
|
|
25
|
-
exports.default = _default;
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
package/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["plugin","type","tab","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","name","endpoint","headers","query","placeholder"],"sources":["index.tsx"],"sourcesContent":["import { GraphQLPlaygroundTabPlugin } from \"~/types\";\n// @ts-
|
|
1
|
+
{"version":3,"names":["_placeholder","_interopRequireDefault","require","_config","plugin","type","tab","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","name","endpoint","headers","query","placeholder","_default","exports","default"],"sources":["index.tsx"],"sourcesContent":["import { GraphQLPlaygroundTabPlugin } from \"~/types\";\n// @ts-expect-error\nimport placeholder from \"!!raw-loader!./placeholder.graphql\";\nimport { config as appConfig } from \"@webiny/app/config\";\n\nconst plugin: GraphQLPlaygroundTabPlugin = {\n type: \"graphql-playground-tab\",\n tab() {\n const apiUrl = appConfig.getKey(\"API_URL\", process.env.REACT_APP_API_URL) as string;\n return {\n name: \"Main API\",\n endpoint: apiUrl + \"/graphql\",\n headers: {},\n query: placeholder\n };\n }\n};\nexport default [plugin];\n"],"mappings":";;;;;;;AAEA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAFA;;AAIA,IAAME,MAAkC,GAAG;EACvCC,IAAI,EAAE,wBAAwB;EAC9BC,GAAG,WAAAA,IAAA,EAAG;IACF,IAAMC,MAAM,GAAGC,cAAS,CAACC,MAAM,CAAC,SAAS,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB,CAAW;IACnF,OAAO;MACHC,IAAI,EAAE,UAAU;MAChBC,QAAQ,EAAEP,MAAM,GAAG,UAAU;MAC7BQ,OAAO,EAAE,CAAC,CAAC;MACXC,KAAK,EAAEC;IACX,CAAC;EACL;AACJ,CAAC;AAAC,IAAAC,QAAA,GACa,CAACd,MAAM,CAAC;AAAAe,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
package/plugins/settings.js
CHANGED
package/plugins/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["settings"],"sources":["settings.ts"],"sourcesContent":["export const settings: any = {\n \"editor.cursorShape\": \"line\",\n \"editor.fontFamily\": `'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace`,\n \"editor.fontSize\": 14,\n \"editor.reuseHeaders\": true,\n \"editor.theme\": \"dark\",\n \"general.betaUpdates\": false,\n \"prettier.printWidth\": 80,\n \"prettier.tabWidth\": 2,\n \"prettier.useTabs\": false,\n \"request.credentials\": \"omit\",\n \"schema.disableComments\": true,\n \"schema.polling.enable\": false,\n \"schema.polling.endpointFilter\": \"*localhost*\",\n \"schema.polling.interval\": 2000000,\n \"tracing.hideTracingResponse\": true,\n \"queryPlan.hideQueryPlanResponse\": true\n};\n"],"mappings":";;;;;;AAAO,IAAMA,QAAa,GAAG;EACzB,oBAAoB,EAAE,MAAM;EAC5B,mBAAmB,wFAAwF;EAC3G,iBAAiB,EAAE,EAAE;EACrB,qBAAqB,EAAE,IAAI;EAC3B,cAAc,EAAE,MAAM;EACtB,qBAAqB,EAAE,KAAK;EAC5B,qBAAqB,EAAE,EAAE;EACzB,mBAAmB,EAAE,CAAC;EACtB,kBAAkB,EAAE,KAAK;EACzB,qBAAqB,EAAE,MAAM;EAC7B,wBAAwB,EAAE,IAAI;EAC9B,uBAAuB,EAAE,KAAK;EAC9B,+BAA+B,EAAE,aAAa;EAC9C,yBAAyB,EAAE,OAAO;EAClC,6BAA6B,EAAE,IAAI;EACnC,iCAAiC,EAAE;AACvC,CAAC;
|
|
1
|
+
{"version":3,"names":["settings","exports"],"sources":["settings.ts"],"sourcesContent":["export const settings: any = {\n \"editor.cursorShape\": \"line\",\n \"editor.fontFamily\": `'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace`,\n \"editor.fontSize\": 14,\n \"editor.reuseHeaders\": true,\n \"editor.theme\": \"dark\",\n \"general.betaUpdates\": false,\n \"prettier.printWidth\": 80,\n \"prettier.tabWidth\": 2,\n \"prettier.useTabs\": false,\n \"request.credentials\": \"omit\",\n \"schema.disableComments\": true,\n \"schema.polling.enable\": false,\n \"schema.polling.endpointFilter\": \"*localhost*\",\n \"schema.polling.interval\": 2000000,\n \"tracing.hideTracingResponse\": true,\n \"queryPlan.hideQueryPlanResponse\": true\n};\n"],"mappings":";;;;;;AAAO,IAAMA,QAAa,GAAG;EACzB,oBAAoB,EAAE,MAAM;EAC5B,mBAAmB,wFAAwF;EAC3G,iBAAiB,EAAE,EAAE;EACrB,qBAAqB,EAAE,IAAI;EAC3B,cAAc,EAAE,MAAM;EACtB,qBAAqB,EAAE,KAAK;EAC5B,qBAAqB,EAAE,EAAE;EACzB,mBAAmB,EAAE,CAAC;EACtB,kBAAkB,EAAE,KAAK;EACzB,qBAAqB,EAAE,MAAM;EAC7B,wBAAwB,EAAE,IAAI;EAC9B,uBAAuB,EAAE,KAAK;EAC9B,+BAA+B,EAAE,aAAa;EAC9C,yBAAyB,EAAE,OAAO;EAClC,6BAA6B,EAAE,IAAI;EACnC,iCAAiC,EAAE;AACvC,CAAC;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA"}
|