@webiny/app-graphql-playground 5.24.0 → 5.25.0-beta.2
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.js.map +1 -0
- package/package.json +11 -11
- package/plugins/Playground.js.map +1 -0
- package/plugins/Playground.styles.d.ts +1 -2
- package/plugins/Playground.styles.js.map +1 -0
- package/plugins/index.d.ts +2 -4
- package/plugins/index.js.map +1 -0
- package/plugins/settings.js.map +1 -0
- package/types.d.ts +1 -1
- package/types.js.map +1 -0
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["React","memo","plugins","Plugins","AddMenu","AddRoute","Layout","ReactComponent","InfoIcon","Playground","playgroundPlugins","GraphQLPlaygroundExtension","createApolloClient","register","GraphQLPlayground"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,IAAhB,QAA4B,OAA5B;AAEA,SAASC,OAAT,QAAwB,iBAAxB;AACA,SAASC,OAAT,EAAkBC,OAAlB,EAA2BC,QAA3B,EAAqCC,MAArC,QAAmD,mBAAnD;AACA,SAASC,cAAc,IAAIC,QAA3B;AACA,OAAOC,UAAP;AACA,OAAOC,iBAAP;;AASA,IAAMC,0BAA4D,GAAG,SAA/DA,0BAA+D,OAA4B;AAAA,MAAzBC,kBAAyB,QAAzBA,kBAAyB;AAC7FV,EAAAA,OAAO,CAACW,QAAR,CAAiBH,iBAAjB;AAEA,sBACI,oBAAC,OAAD,qBACI,oBAAC,OAAD;AACI,IAAA,IAAI,EAAE,eADV;AAEI,IAAA,KAAK,EAAE,gBAFX;AAGI,IAAA,IAAI,EAAE,iBAHV;AAII,IAAA,IAAI,eAAE,oBAAC,QAAD,OAJV;AAKI,IAAA,IAAI,EAAE,CAAC,QAAD;AALV,IADJ,eAQI,oBAAC,QAAD;AAAU,IAAA,KAAK,MAAf;AAAgB,IAAA,IAAI,EAAE;AAAtB,kBACI,oBAAC,MAAD;AAAQ,IAAA,KAAK,EAAE;AAAf,kBACI,oBAAC,UAAD;AAAY,IAAA,kBAAkB,EAAEE;AAAhC,IADJ,CADJ,CARJ,CADJ;AAgBH,CAnBD;;AAqBA,OAAO,IAAME,iBAAiB,gBAAGb,IAAI,CAACU,0BAAD,CAA9B","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: React.FC<GraphQLPlaygroundProps> = ({ createApolloClient }) => {\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-graphql-playground",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.0-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@emotion/core": "10.3.1",
|
|
13
13
|
"@emotion/styled": "10.3.0",
|
|
14
|
-
"@webiny/app": "5.
|
|
15
|
-
"@webiny/app-admin": "5.
|
|
16
|
-
"@webiny/app-i18n": "5.
|
|
17
|
-
"@webiny/app-security": "5.
|
|
18
|
-
"@webiny/plugins": "5.
|
|
19
|
-
"@webiny/ui": "5.
|
|
14
|
+
"@webiny/app": "5.25.0-beta.2",
|
|
15
|
+
"@webiny/app-admin": "5.25.0-beta.2",
|
|
16
|
+
"@webiny/app-i18n": "5.25.0-beta.2",
|
|
17
|
+
"@webiny/app-security": "5.25.0-beta.2",
|
|
18
|
+
"@webiny/plugins": "5.25.0-beta.2",
|
|
19
|
+
"@webiny/ui": "5.25.0-beta.2",
|
|
20
20
|
"apollo-cache": "1.3.5",
|
|
21
21
|
"apollo-client": "2.6.10",
|
|
22
22
|
"apollo-link": "1.2.14",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@babel/preset-env": "^7.16.4",
|
|
36
36
|
"@babel/preset-react": "^7.16.0",
|
|
37
37
|
"@babel/preset-typescript": "^7.16.0",
|
|
38
|
-
"@webiny/cli": "^5.
|
|
39
|
-
"@webiny/project-utils": "^5.
|
|
38
|
+
"@webiny/cli": "^5.25.0-beta.2",
|
|
39
|
+
"@webiny/project-utils": "^5.25.0-beta.2",
|
|
40
40
|
"babel-plugin-emotion": "^9.2.8",
|
|
41
41
|
"babel-plugin-lodash": "^3.3.4",
|
|
42
42
|
"rimraf": "^3.0.2",
|
|
43
|
-
"typescript": "
|
|
43
|
+
"typescript": "4.5.5"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "ed2f22976af47aea0b6b5d638f8afdc39951b014"
|
|
64
64
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Playground.tsx"],"names":["React","Fragment","useEffect","useRef","useCallback","useState","ApolloLink","setContext","loadScript","Global","plugins","useI18N","useSecurity","CircularProgress","playgroundDialog","PlaygroundContainer","settings","config","appConfig","withHeaders","link","headers","from","_","req","initScripts","Promise","resolve","window","GraphQLPlayground","Playground","createApolloClient","loading","setLoading","getCurrentLocale","identity","links","locale","tabs","byType","map","pl","tab","filter","Boolean","createApolloLink","endpoint","current","apiUrl","getKey","process","env","REACT_APP_API_URL","includes","Object","values","uri","then","init","document","getElementById"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,MAArC,EAA6CC,WAA7C,EAA0DC,QAA1D,QAA0E,OAA1E;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,UAAT,QAA2B,qBAA3B;AACA;AACA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,aAAvB;AACA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,OAAT,QAAwB,iBAAxB;AACA,SAASC,OAAT,QAAwB,gCAAxB;AACA,SAASC,WAAT,QAA4B,sBAA5B;AACA,SAASC,gBAAT,QAAiC,qBAAjC;AACA,SAASC,gBAAT,EAA2BC,mBAA3B;AACA,SAASC,QAAT;AACA,SAASC,MAAM,IAAIC,SAAnB,QAAoC,oBAApC;;AAKA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAmBC,OAAnB,EAAmE;AACnF,SAAOf,UAAU,CAACgB,IAAX,CAAgB,CACnBf,UAAU;AAAA,wEAAC,iBAAOgB,CAAP,EAAUC,GAAV;AAAA;AAAA;AAAA;AAAA;AAAA,+CACA;AACHH,gBAAAA,OAAO,kCACAG,GAAG,CAACH,OADJ,GAEAA,OAFA;AADJ,eADA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAD;;AAAA;AAAA;AAAA;AAAA,MADS,EASnBD,IATmB,CAAhB,CAAP;AAWH,CAZD;;AAcA,IAAMK,WAAW,GAAG,SAAdA,WAAc,GAAM;AACtB,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAkB;AACjC;AACA,QAAI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{ ApolloLink } from \"apollo-link\";\nimport { setContext } from \"apollo-link-context\";\n/**\n * Package load-script does not have types.\n */\n// @ts-ignore\nimport loadScript from \"load-script\";\nimport { Global } from \"@emotion/core\";\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-ignore\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: React.FC<PlaygroundProps> = ({ createApolloClient }) => {\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-ignore\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"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
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>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "children" | "defaultValue" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "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>;
|
|
1
|
+
export declare const PlaygroundContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
3
2
|
export declare const playgroundDialog: {
|
|
4
3
|
".ReactModalPortal": {
|
|
5
4
|
"p, a, h1, h2, h3, h4, ul, pre, code": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Playground.styles.ts"],"names":["styled","sharedStyles","margin","padding","color","outline","border","fontFamily","code","PlaygroundContainer","marginTop","overflow","height","WebkitFontSmoothing","MozOsxFontSmoothing","lineHeight","letterSpacing","marginRight","playgroundDialog"],"mappings":";AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AAEA,IAAMC,YAAY,GAAG;AACjB,yCAAuC;AACnCC,IAAAA,MAAM,EAAE,CAD2B;AAEnCC,IAAAA,OAAO,EAAE,CAF0B;AAGnCC,IAAAA,KAAK,EAAE;AAH4B,GADtB;AAMjB,kDAAgD;AAC5CC,IAAAA,OAAO,EAAE;AADmC,GAN/B;AASjB,2BAAyB;AACrBC,IAAAA,MAAM,EAAE;AADa,GATR;AAYjB,wBAAsB;AAClBC,IAAAA,UAAU,EAAE;AADM,GAZL;AAejBC,EAAAA,IAAI,EAAE;AACFD,IAAAA,UAAU,EAAE;AADV;AAfW,CAArB;AAoBA,OAAO,IAAME,mBAAmB,gBAAGT,MAAH,CAAU,KAAV;AAAA;AAAA;AAAA,GAAiB;AAC7CU,EAAAA,SAAS,EAAE,CAAC,CADiC;AAE7CC,EAAAA,QAAQ,EAAE,QAFmC;AAG7C;AACIC,IAAAA,MAAM,EAAE,oBADZ;AAEIV,IAAAA,MAAM,EAAE,CAFZ;AAGIC,IAAAA,OAAO,EAAE,CAHb;AAIII,IAAAA,UAAU,EAAE,yBAJhB;AAKIM,IAAAA,mBAAmB,EAAE,aALzB;AAMIC,IAAAA,mBAAmB,EAAE,WANzB;AAOIV,IAAAA,KAAK,EAAE,gBAPX;AAQIW,IAAAA,UAAU,EAAE,GARhB;AASIC,IAAAA,aAAa,EAAE,IATnB;AAUIC,IAAAA,WAAW,EAAE;AAVjB,KAWOhB,YAXP;AAH6C,CAAjB,CAAzB;AAkBP,OAAO,IAAMiB,gBAAgB,GAAG;AAC5B,uBAAqBjB;AADO,CAAzB","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"]}
|
package/plugins/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
tab(params: import("../types").GraphQLPlaygroundTabParams): import("../types").GraphQLPlaygroundTab;
|
|
4
|
-
}>[];
|
|
1
|
+
import { GraphQLPlaygroundTabPlugin } from "../types";
|
|
2
|
+
declare const _default: GraphQLPlaygroundTabPlugin[];
|
|
5
3
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["placeholder","config","appConfig","plugin","type","tab","apiUrl","getKey","process","env","REACT_APP_API_URL","name","endpoint","headers","query"],"mappings":"AACA;AACA,OAAOA,WAAP,MAAwB,oCAAxB;AACA,SAASC,MAAM,IAAIC,SAAnB,QAAoC,oBAApC;AAEA,IAAMC,MAAkC,GAAG;AACvCC,EAAAA,IAAI,EAAE,wBADiC;AAEvCC,EAAAA,GAFuC,iBAEjC;AACF,QAAMC,MAAM,GAAGJ,SAAS,CAACK,MAAV,CAAiB,SAAjB,EAA4BC,OAAO,CAACC,GAAR,CAAYC,iBAAxC,CAAf;AACA,WAAO;AACHC,MAAAA,IAAI,EAAE,UADH;AAEHC,MAAAA,QAAQ,EAAEN,MAAM,GAAG,UAFhB;AAGHO,MAAAA,OAAO,EAAE,EAHN;AAIHC,MAAAA,KAAK,EAAEd;AAJJ,KAAP;AAMH;AAVsC,CAA3C;AAYA,eAAe,CAACG,MAAD,CAAf","sourcesContent":["import { GraphQLPlaygroundTabPlugin } from \"~/types\";\n// @ts-ignore\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["settings.ts"],"names":["settings"],"mappings":"AAAA,OAAO,IAAMA,QAAa,GAAG;AACzB,wBAAsB,MADG;AAEzB,6GAFyB;AAGzB,qBAAmB,EAHM;AAIzB,yBAAuB,IAJE;AAKzB,kBAAgB,MALS;AAMzB,yBAAuB,KANE;AAOzB,yBAAuB,EAPE;AAQzB,uBAAqB,CARI;AASzB,sBAAoB,KATK;AAUzB,yBAAuB,MAVE;AAWzB,4BAA0B,IAXD;AAYzB,2BAAyB,KAZA;AAazB,mCAAiC,aAbR;AAczB,6BAA2B,OAdF;AAezB,iCAA+B,IAfN;AAgBzB,qCAAmC;AAhBV,CAAtB","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"]}
|
package/types.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export interface GraphQLPlaygroundTab {
|
|
|
12
12
|
}
|
|
13
13
|
export declare type GraphQLPlaygroundTabPlugin = Plugin<{
|
|
14
14
|
type: "graphql-playground-tab";
|
|
15
|
-
tab(params: GraphQLPlaygroundTabParams)
|
|
15
|
+
tab: (params: GraphQLPlaygroundTabParams) => GraphQLPlaygroundTab | null;
|
|
16
16
|
}>;
|
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|