Skip to content

Commit

Permalink
Updated packages and GQL response formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrik committed Feb 11, 2025
1 parent b39e27e commit 842432b
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 77 deletions.
130 changes: 65 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
"@microsoft/applicationinsights-web": "^3.0.2",
"@monaco-editor/loader": "^1.3.3",
"@monaco-editor/react": "^4.6.0",
"@paperbits/azure": "^0.1.634",
"@paperbits/common": "^0.1.634",
"@paperbits/core": "^0.1.634",
"@paperbits/forms": "^0.1.634",
"@paperbits/azure": "^0.1.635",
"@paperbits/common": "^0.1.635",
"@paperbits/core": "^0.1.635",
"@paperbits/forms": "^0.1.635",
"@paperbits/react": "1.0.8",
"@paperbits/styles": "^0.1.634",
"@paperbits/styles": "^0.1.635",
"@webcomponents/custom-elements": "1.6.0",
"@webcomponents/shadydom": "^1.11.0",
"client-oauth2": "4.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const OperationConsoleGql = ({
if (api.subscriptionKeyParameterNames?.query) {
subscriptionKeyParamName = api.subscriptionKeyParameterNames.query;
}

const searchName = subscriptionKeyParamName.toLocaleLowerCase();
const newQueryParaemeters = queryParameters.filter(x => x.name()?.toLocaleLowerCase() !== searchName);

Expand All @@ -198,10 +198,10 @@ export const OperationConsoleGql = ({
keyParameter.required = true;
keyParameter.inputType("password");
keyParameter.value(subscriptionKey);

newQueryParaemeters.push(keyParameter);
setQueryParameters([...newQueryParaemeters]);
}
}

const handleEditorWillMount = (editor, monaco: Monaco) => {
monaco.editor.createModel(schema, 'graphql');
Expand Down Expand Up @@ -323,7 +323,7 @@ export const OperationConsoleGql = ({

const responseStr = Buffer.from(response.body.buffer).toString();
setSelectedTab(ConsoleTab.response);
setResponse(responseStr);
setResponse(Utils.formatJson(responseStr));
//responseLanguageValue && setResponseLanguage(responseLanguageValue);
}
catch (error) {
Expand Down Expand Up @@ -395,7 +395,7 @@ export const OperationConsoleGql = ({
const renderNode = (node: GraphQLTreeNode, isChild = false): JSX.Element[] => {
return node.children()?.map((child: GraphQLTreeNode) => {
if (!isChild && !child.label().includes(pattern)) return;

return (
<div key={child.id} className={`console-gql-node${isChild ? ' child-node' : ''}${child.isInputNode() ? ' input-node': ''}`}>
<Checkbox
Expand All @@ -420,7 +420,7 @@ export const OperationConsoleGql = ({
onChange={(_, data) => (child as GraphQLInputTreeNode).changeInputValue(data.value)}
autoComplete="off"
/>

: <></>
}
{child.selected() && renderNode(child, true)}
Expand Down Expand Up @@ -518,7 +518,7 @@ export const OperationConsoleGql = ({
<Tab value={ConsoleTab.queryVariables}>Query variables</Tab>
<Tab value={ConsoleTab.response}>Response</Tab>
</TabList>
<div className={`gql-tab-content${selectedTab === ConsoleTab.queryVariables ? ' query-variables-tab': ''}`}>
<div className={`gql-tab-content${selectedTab === ConsoleTab.queryVariables ? ' query-variables-tab': ''}`}>
{selectedTab === ConsoleTab.auth && (authorizationServers.length > 0 || api.subscriptionRequired) &&
<ConsoleAuthorization
api={api}
Expand Down

0 comments on commit 842432b

Please sign in to comment.