Skip to content

Make both flow output identical#1191

Merged
pyramation merged 7 commits into
mainfrom
fix/update-util-config
Jun 3, 2026
Merged

Make both flow output identical#1191
pyramation merged 7 commits into
mainfrom
fix/update-util-config

Conversation

@NorOldBurden
Copy link
Copy Markdown
Contributor

@NorOldBurden NorOldBurden marked this pull request as draft May 18, 2026 12:51
case 'timestamp': return 'Datetime';
default: return 'String'; // safe fallback
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this switch — can we document where this may live in other codebases, either our codegen or upstream in graphile ? feels like this could be not DRY

else if (unit.startsWith('hour')) result.hours = num;
else if (unit.startsWith('minute')) result.minutes = num;
else if (unit.startsWith('second')) result.seconds = num;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also a bit brittle here — this could be somewhere else too, like the pgsql-parser and we can abstract this to a utils

sign_in_function text,
sign_up_function text,
sign_out_function text
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit duplicative, I think we have a seed for this

['timestamptz', 'Datetime', 'timestamptz'],
['timestamp', 'Datetime', 'timestamptz'],
['float4', 'Float', 'int'],
['float8', 'Float', 'int'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another mapping, not DRY

Comment thread pgpm/export/src/graphql-naming.ts Outdated
case 'Datetime':
return 'timestamptz';
default:
return 'text'; // safe fallback — matches mapPgTypeToFieldType's default
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and ... another, not DRY

@NorOldBurden NorOldBurden marked this pull request as ready for review May 19, 2026 04:23
@pyramation pyramation merged commit 729b406 into main Jun 3, 2026
37 checks passed
@pyramation pyramation deleted the fix/update-util-config branch June 3, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants