Compare commits

...

2 Commits

Author SHA1 Message Date
Gregory Schier
eb10910d20 Update HttpMethodTag.tsx 2026-01-22 06:03:04 -08:00
Gregory Schier
6ba83d424d Fix request method dropdown for GraphQL not showing HTTP method 2026-01-22 06:02:49 -08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ export const RequestMethodDropdown = memo(function RequestMethodDropdown({
onChange={handleChange}
>
<Button size="xs" className={classNames(className, 'text-text-subtle hover:text')}>
<HttpMethodTag request={request} />
<HttpMethodTag request={request} noAlias />
</Button>
</RadioDropdown>
);

View File

@@ -8,6 +8,7 @@ interface Props {
request: HttpRequest | GrpcRequest | WebsocketRequest;
className?: string;
short?: boolean;
noAlias?: boolean;
}
const methodNames: Record<string, string> = {
@@ -24,9 +25,9 @@ const methodNames: Record<string, string> = {
websocket: 'WS',
};
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short }: Props) {
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short, noAlias }: Props) {
const method =
request.model === 'http_request' && request.bodyType === 'graphql'
request.model === 'http_request' && (request.bodyType === 'graphql' && !noAlias)
? 'graphql'
: request.model === 'grpc_request'
? 'grpc'