Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the organization access token creation logic to default the description to an empty string instead of null. However, feedback indicates this fix is incomplete as it does not address existing null descriptions in the database which cause API crashes, nor does it cover project or personal tokens. It is recommended to move this logic to the data model or provider level to ensure consistency and handle legacy data.
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
There was a problem hiding this comment.
On the GraphQL type the description is nullable:
This I think the correct approach is to instead fix the zod model to allow a nullable description property.
Also this fix would not solve existing database records as the AI comment points out. <- Should have read the issue first. We should fix the table definition removing the non null constraint.
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/cli |
0.59.3-alpha-20260527093326-6f630960aeee198c00e737c8d0924de2c47ae1cf |
npm ↗︎ unpkg ↗︎ |
hive |
11.1.2-alpha-20260527093326-6f630960aeee198c00e737c8d0924de2c47ae1cf |
npm ↗︎ unpkg ↗︎ |
| run: ({ psql }) => psql` | ||
| ALTER TABLE IF EXISTS organization_access_tokens | ||
| ADD COLUMN IF NOT EXISTS "expires_at" TIMESTAMP WITH TIME ZONE | ||
| ADD COLUMN IF NOT EXISTS "expires_at" TIMESTAMP WITH TIME ZONE |
CreateOrganizationAccessTokenInput.description to be empty stringCreateOrganizationAccessTokenInput.description nullability
Fixes #8056