mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem `@graphql-codegen/cli` and related packages in `apps/studio` and `apps/docs` were pinned to old major versions (`cli` 5.0.5, `typescript` 4.1.6, `typescript-resolvers` 4.5.0). ## Solution - Bump `@graphql-codegen/cli` to `^7.0.0` and `@graphql-codegen/typescript-resolvers` to `^6.0.0`. Drop the explicit `@graphql-codegen/typescript` dependency from `apps/docs`. - Regenerate the Studio GraphQL output in `apps/studio/data/graphql/` with the new codegen. The generated files now include an `index.ts` export change, and `graphql.ts` is much smaller. - Refresh `apps/studio/scripts/schema.graphql`, which picks up the new `ManagementApiReference` search result type. - Update `.prettierignore` (ignore `apps/studio/.output`, `apps/studio/dist`, and all of `apps/ui-library/public`) and run Prettier on the regenerated files. ## Review instructions 1. Check the dependency bumps in `apps/studio/package.json` and `apps/docs/package.json`. 2. Re-run the Studio codegen and confirm it produces no diff in `apps/studio/data/graphql/`. 3. Run `pnpm typecheck` and confirm the GraphQL consumers in Studio still compile. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
import { Column } from 'react-data-grid'
|
|
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
|
|
|
|
import type { LogData } from '../Logs.types'
|
|
import { ResponseCodeFormatter, RowLayout, TextFormatter } from '../LogsFormatters'
|
|
import { defaultRenderCell } from './DefaultPreviewColumnRenderer'
|
|
import { ErrorCodeTooltip } from '@/components/ui/ErrorCodeTooltip/ErrorCodeTooltip'
|
|
|
|
const columns: Column<LogData>[] = [
|
|
{
|
|
name: 'database-api-first-column',
|
|
key: 'database-api-first-column',
|
|
renderHeaderCell: () => null,
|
|
renderCell: (props) => {
|
|
if (!props.row.status_code && !props.row.method && !props.row.path) {
|
|
return defaultRenderCell(props)
|
|
}
|
|
const error_code = props.row.metadata?.[0]?.response?.[0]?.headers?.[0]?.x_sb_error_code
|
|
const service =
|
|
typeof props.row.path === 'string' && props.row.path.startsWith('/auth/')
|
|
? 'AUTH'
|
|
: undefined
|
|
return (
|
|
<RowLayout>
|
|
<TimestampInfo utcTimestamp={props.row.timestamp!} />
|
|
<ResponseCodeFormatter value={String(props.row.status_code)} />
|
|
<TextFormatter value={String(props.row.method)} />
|
|
<TextFormatter value={String(props.row.path)} />
|
|
{error_code && (
|
|
<ErrorCodeTooltip errorCode={String(error_code)} service={service}>
|
|
<span className="font-mono text-xs text-destructive-600 truncate shrink-0">
|
|
{error_code}
|
|
</span>
|
|
</ErrorCodeTooltip>
|
|
)}
|
|
</RowLayout>
|
|
)
|
|
},
|
|
},
|
|
]
|
|
|
|
export default columns
|