@webiny/app-graphql-playground 5.18.2 → 5.18.3-beta.0
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/package.json +11 -11
- package/plugins/Playground.js +4 -2
- package/plugins/Playground.styles.d.ts +1 -1
- package/plugins/index.d.ts +2 -2
- package/plugins/index.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-graphql-playground",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.3-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@emotion/core": "10.1.1",
|
|
13
13
|
"@emotion/styled": "10.0.27",
|
|
14
|
-
"@webiny/app": "5.18.
|
|
15
|
-
"@webiny/app-admin": "5.18.
|
|
16
|
-
"@webiny/app-i18n": "5.18.
|
|
17
|
-
"@webiny/app-security": "5.18.
|
|
18
|
-
"@webiny/plugins": "5.18.
|
|
19
|
-
"@webiny/react-router": "5.18.
|
|
20
|
-
"@webiny/ui": "5.18.
|
|
14
|
+
"@webiny/app": "5.18.3-beta.0",
|
|
15
|
+
"@webiny/app-admin": "5.18.3-beta.0",
|
|
16
|
+
"@webiny/app-i18n": "5.18.3-beta.0",
|
|
17
|
+
"@webiny/app-security": "5.18.3-beta.0",
|
|
18
|
+
"@webiny/plugins": "5.18.3-beta.0",
|
|
19
|
+
"@webiny/react-router": "5.18.3-beta.0",
|
|
20
|
+
"@webiny/ui": "5.18.3-beta.0",
|
|
21
21
|
"apollo-cache": "1.3.5",
|
|
22
22
|
"apollo-client": "2.6.10",
|
|
23
23
|
"apollo-link": "1.2.14",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@babel/preset-env": "^7.5.5",
|
|
38
38
|
"@babel/preset-react": "^7.0.0",
|
|
39
39
|
"@babel/preset-typescript": "^7.8.3",
|
|
40
|
-
"@webiny/cli": "^5.18.
|
|
41
|
-
"@webiny/project-utils": "^5.18.
|
|
40
|
+
"@webiny/cli": "^5.18.3-beta.0",
|
|
41
|
+
"@webiny/project-utils": "^5.18.3-beta.0",
|
|
42
42
|
"babel-plugin-emotion": "^9.2.8",
|
|
43
43
|
"babel-plugin-lodash": "^3.3.4",
|
|
44
44
|
"rimraf": "^3.0.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "eb7a008ad4f5b01f01b7c84d291d1fa0b5ced25b"
|
|
71
71
|
}
|
package/plugins/Playground.js
CHANGED
|
@@ -13,6 +13,7 @@ import { useSecurity } from "@webiny/app-security";
|
|
|
13
13
|
import { CircularProgress } from "@webiny/ui/Progress";
|
|
14
14
|
import { playgroundDialog, PlaygroundContainer } from "./Playground.styles";
|
|
15
15
|
import { settings } from "./settings";
|
|
16
|
+
import { config as appConfig } from "@webiny/app/config";
|
|
16
17
|
|
|
17
18
|
var withHeaders = function withHeaders(link, headers) {
|
|
18
19
|
return ApolloLink.from([setContext( /*#__PURE__*/function () {
|
|
@@ -75,9 +76,10 @@ var Playground = function Playground(_ref2) {
|
|
|
75
76
|
var createApolloLink = useCallback(function (_ref3) {
|
|
76
77
|
var endpoint = _ref3.endpoint,
|
|
77
78
|
headers = _ref3.headers;
|
|
78
|
-
|
|
79
79
|
// If the request endpoint is not know to us, return the first available
|
|
80
|
-
|
|
80
|
+
var apiUrl = appConfig.getKey("API_URL", process.env.REACT_APP_API_URL);
|
|
81
|
+
|
|
82
|
+
if (!endpoint.includes(apiUrl)) {
|
|
81
83
|
return {
|
|
82
84
|
link: withHeaders(Object.values(links.current)[0], headers)
|
|
83
85
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const PlaygroundContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "
|
|
2
|
+
export declare const PlaygroundContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, object>;
|
|
3
3
|
export declare const playgroundDialog: {
|
|
4
4
|
".ReactModalPortal": {
|
|
5
5
|
"p, a, h1, h2, h3, h4, ul, pre, code": {
|
package/plugins/index.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ declare type GraphQLPlaygroundOptions = {
|
|
|
7
7
|
uri: string;
|
|
8
8
|
}): ApolloClient<any>;
|
|
9
9
|
};
|
|
10
|
-
declare const _default: (options: GraphQLPlaygroundOptions) => (
|
|
10
|
+
declare const _default: (options: GraphQLPlaygroundOptions) => (import("@webiny/plugins/types").Plugin<{
|
|
11
11
|
type: "graphql-playground-tab";
|
|
12
12
|
tab(params: {
|
|
13
13
|
locale: string;
|
|
14
14
|
identity: import("@webiny/app-security/types").SecurityIdentity;
|
|
15
15
|
}): import("../types").GraphQLPlaygroundTab;
|
|
16
|
-
}> | UIViewPlugin<NavigationView>)[];
|
|
16
|
+
}> | UIViewPlugin<NavigationView> | RoutePlugin)[];
|
|
17
17
|
export default _default;
|
package/plugins/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import placeholder from "!!raw-loader!./placeholder.graphql";
|
|
|
9
9
|
import { NavigationMenuElement } from "@webiny/app-admin/ui/elements/NavigationMenuElement";
|
|
10
10
|
import { UIViewPlugin } from "@webiny/app-admin/ui/UIView";
|
|
11
11
|
import { NavigationView } from "@webiny/app-admin/ui/views/NavigationView";
|
|
12
|
+
import { config as appConfig } from "@webiny/app/config";
|
|
12
13
|
// @ts-ignore
|
|
13
14
|
export default (function (options) {
|
|
14
15
|
return [new UIViewPlugin(NavigationView, function (view) {
|
|
@@ -35,9 +36,10 @@ export default (function (options) {
|
|
|
35
36
|
}, {
|
|
36
37
|
type: "graphql-playground-tab",
|
|
37
38
|
tab: function tab() {
|
|
39
|
+
var apiUrl = appConfig.getKey("API_URL", process.env.REACT_APP_API_URL);
|
|
38
40
|
return {
|
|
39
41
|
name: "Main API",
|
|
40
|
-
endpoint:
|
|
42
|
+
endpoint: apiUrl + "/graphql",
|
|
41
43
|
headers: {},
|
|
42
44
|
query: placeholder
|
|
43
45
|
};
|