Skip to content

Conversation

@danilowoz
Copy link
Contributor

No description provided.

@danilowoz danilowoz requested a review from CompuIves May 13, 2024 10:20
@codesandbox
Copy link

codesandbox bot commented May 13, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

one question about types

v2?: boolean;
title?: string;
privacy?: 0 | 1 | 2;
privacy?: number;
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, shouldn't this be 0 | 1 | 2? I thought it's nice to encode in the type that it can only be one of these three values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed that because there is a mismatch type between GraphQL and our types. Unfortunately, the backend can't return a specific type like 0 | 1 | 2 but number, making the application use the less restrict one.

Alternatively, I could only cast the place with the mismatch type to 0 | 1| 2 instead of changing the main function parameter.

@danilowoz danilowoz merged commit 103603a into master May 14, 2024
@danilowoz danilowoz deleted the draft/boring-heyrovsky branch May 14, 2024 13:02
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.

3 participants