Merge branch 'main' into wip/yaak-proxy-foundation

# Conflicts:
#	apps/yaak-client/components/JsonBodyEditor.tsx
#	apps/yaak-client/lib/jsonComments.ts
#	package-lock.json
#	packages/theme/src/window.ts
#	packages/ui/src/components/HeaderSize.tsx
This commit is contained in:
Gregory Schier
2026-03-11 15:36:57 -07:00
40 changed files with 1187 additions and 518 deletions

View File

@@ -1,6 +1,5 @@
import type { HttpRequest } from '@yaakapp-internal/models';
import { formatSdl } from 'format-graphql';
import { useAtom } from 'jotai';
import { useCallback, useMemo } from 'react';
import { useLocalStorage } from 'react-use';
@@ -16,6 +15,7 @@ import { Editor } from '../core/Editor/LazyEditor';
import { FormattedError } from '../core/FormattedError';
import { Icon } from '@yaakapp-internal/ui';
import { Separator } from '../core/Separator';
import { tryFormatGraphql } from '../../lib/formatters';
import { showGraphQLDocExplorerAtom } from './graphqlAtoms';
type Props = Pick<EditorProps, 'heightMode' | 'className' | 'forceUpdateKey'> & {
@@ -156,6 +156,7 @@ function GraphQLEditorInner({ request, onChange, baseRequest, ...extraEditorProp
{ type: 'separator', label: 'Setting' },
{
label: 'Automatic Introspection',
keepOpenOnSelect: true,
onSelect: () => {
setAutoIntrospectDisabled({
...autoIntrospectDisabled,
@@ -210,7 +211,7 @@ function GraphQLEditorInner({ request, onChange, baseRequest, ...extraEditorProp
language="graphql"
heightMode="auto"
graphQLSchema={schema}
format={formatSdl}
format={tryFormatGraphql}
defaultValue={currentBody.query}
onChange={handleChangeQuery}
placeholder="..."