Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do "typecasting" the way graphql-codegen intends #14

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Jul 14, 2023

Turns out you can do it in a typesafe way so I'm happy.

https://the-guild.dev/blog/unleash-the-power-of-fragments-with-graphql-codegen

📦 Published PR as canary version: 0.0.4-canary.14.c9db83a.0

✨ Test out this PR locally via:

npm install @chromaui/addon-visual-tests@0.0.4-canary.14.c9db83a.0
# or 
yarn add @chromaui/addon-visual-tests@0.0.4-canary.14.c9db83a.0

@tmeasday tmeasday requested a review from ghengeveld July 14, 2023 07:17
@linear
Copy link

linear bot commented Jul 14, 2023

AP-3364 Update Graphql codegen to not generate `' $fragmentRefs': {...}` snippets

This is currently forcing us to typecast stuff in a non-typesafe way.

In the Chromatic monorepo we don't need to do this, let's update the generate to match the monorepo's (and put query types next to queries too).

Copy link
Member

@ghengeveld ghengeveld left a comment

Choose a reason for hiding this comment

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

Nice. Much better.

@tmeasday tmeasday merged commit c9db83a into main Jul 15, 2023
@tmeasday tmeasday deleted the tom/ap-3364-update-graphql-codegen-to-not-generate-fragmentrefs-snippets branch July 15, 2023 07:22
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