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

Don't run Prettier on GraphQL codegen #13073

Closed
wants to merge 1 commit into from

Conversation

felixfbecker
Copy link
Contributor

No description provided.

Makes codegen faster, the file is gitignored anyway
@felixfbecker felixfbecker requested a review from a team August 17, 2020 19:28
@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #13073 into main will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #13073   +/-   ##
=======================================
  Coverage   51.14%   51.15%           
=======================================
  Files        1470     1470           
  Lines       82536    82536           
  Branches     6796     6796           
=======================================
+ Hits        42216    42223    +7     
+ Misses      36712    36709    -3     
+ Partials     3608     3604    -4     
Flag Coverage Δ
#go 52.42% <ø> (+<0.01%) ⬆️
#integration 24.58% <ø> (+<0.01%) ⬆️
#storybook 14.85% <ø> (ø)
#typescript 47.68% <ø> (+<0.01%) ⬆️
#unit 34.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/frontend/graphqlbackend/zoekt.go 75.89% <0.00%> (-0.28%) ⬇️
web/src/tree/TreeRoot.tsx 81.03% <0.00%> (+1.72%) ⬆️
internal/trace/httptrace.go 8.33% <0.00%> (+2.27%) ⬆️
.../internal/codeintel/resolvers/graphql/locations.go 87.27% <0.00%> (+3.63%) ⬆️

Comment on lines -39 to -41
hooks: {
afterOneFileWrite: 'prettier --write',
},
Copy link
Member

Choose a reason for hiding this comment

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

Hmm not so sure about this part, the file is actually not really pretty formatted and from time to time I need to go there and check the type of something, especially how it's exported, what fields it has and whether subobjects are in a separate interface or not. Without it, the whole content of one type is just in one single line, which is harder to read.
Is there a way to programmatically hook into it before writing the file content?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good point. I guess we need to wait what comes out of dotansimha/graphql-code-generator#2726 then

@felixfbecker felixfbecker deleted the no-gql-codegen-prettier branch August 24, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants