Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions packages/graphiql-react/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ export type {
} from './segmented-control';
export { MethodPill } from './method-pill';
export type { MethodPillProps, Operation } from './method-pill';
export { TopBar, TopBarView } from './top-bar';
export type { TopBarProps, TopBarViewProps } from './top-bar';
export { StatusBar, StatusBarView } from './status-bar';
export type { ConnectionStatus, StatusBarViewProps } from './status-bar';
export { SidePanel, SidePanelView } from './side-panel';
export type { SidePanelViewProps } from './side-panel';
export { TopBar } from './top-bar';
export type { TopBarProps } from './top-bar';
export { StatusBar } from './status-bar';
export type { ConnectionStatus } from './status-bar';
export { SidePanel } from './side-panel';
export { ActivityRail } from './activity-rail';
export type { ActivityRailProps } from './activity-rail';
export { ResponseHeader } from './response-header';
Expand All @@ -44,6 +43,6 @@ export type { ResponseTableViewProps } from './response-table-view';
export { ResponseTreeView } from './response-tree-view';
export type { ResponseTreeViewProps } from './response-tree-view';
export { VarHeadersStrip } from './var-headers-strip';
export type { VarHeadersStripProps, VarTab } from './var-headers-strip';
export type { VarHeadersStripProps, VarHeadersTab } from './var-headers-strip';
export { SettingsDialog } from './settings-dialog';
export type { SettingsDialogProps } from './settings-dialog';
5 changes: 4 additions & 1 deletion packages/graphiql-react/src/components/top-bar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { Tooltip } from '../tooltip';
import { DropdownMenu } from '../dropdown-menu';
import { GraphQLLogoIcon, PlayIcon, ChevronDownIcon } from '../../icons';
import { clsx } from 'clsx';
import { getRunBlockReason, resolveActiveOperation } from '../../utility';
import {
getRunBlockReason,
resolveActiveOperation,
} from '../../utility/run-block';
import './index.css';

export type TopBarProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { useEditorState } from '../../utility/hooks';
import { tryParseJSONC } from '../../utility';
import './index.css';

export type VarTab = 'variables' | 'headers';
export type VarHeadersTab = 'variables' | 'headers';

const VAR_TAB_OPTIONS: { value: VarTab; label: string }[] = [
const VAR_TAB_OPTIONS: { value: VarHeadersTab; label: string }[] = [
{ value: 'variables', label: 'Variables' },
{ value: 'headers', label: 'Headers' },
];
Expand Down Expand Up @@ -37,7 +37,7 @@ function useVariablesHint(): string | null {

export type VarHeadersStripProps = {
/** Which tab is shown initially. @default 'variables' */
defaultTab?: VarTab;
defaultTab?: VarHeadersTab;
/**
* Whether the headers tab and editor are available.
* When `false`, only the variables editor is shown.
Expand All @@ -54,7 +54,7 @@ export const VarHeadersStrip: FC<VarHeadersStripProps> = ({
onEditVariables,
onEditHeaders,
}) => {
const [varTab, setVarTab] = useState<VarTab>(
const [varTab, setVarTab] = useState<VarHeadersTab>(
headersEditorEnabled ? defaultTab : 'variables',
);
const hint = useVariablesHint();
Expand Down
4 changes: 2 additions & 2 deletions packages/graphiql-react/src/stores/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import setValue from 'set-value';
import getValue from 'get-value';

import type { StateCreator } from 'zustand';
import { tryParseJSONC } from '../utility';
import {
tryParseJSONC,
getRunBlockReason,
resolveActiveOperation,
} from '../utility';
} from '../utility/run-block';
import { Range } from '../utility/monaco-ssr';
import { STORAGE_KEY } from '../constants';
import type { SlicesWithActions, MonacoEditor } from '../types';
Expand Down
5 changes: 0 additions & 5 deletions packages/graphiql-react/src/utility/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ export { debounce } from './debounce';
export { formatJSONC, parseJSONC, tryParseJSONC } from './jsonc';
export { markdown } from './markdown';
export { pick } from './pick';
export {
getRunBlockReason,
resolveActiveOperation,
MUTATION_REQUIRES_POST_REASON,
} from './run-block';
export { useDragResize } from './resize';
export { typeCategory } from './type-category';
export type { GraphQLTypeCategory } from './type-category';
Expand Down
Loading