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

Print all duplicate types at once #4571

Merged
merged 1 commit into from Dec 12, 2022
Merged

Print all duplicate types at once #4571

merged 1 commit into from Dec 12, 2022

Conversation

chao2zhang
Copy link
Contributor

In our codebase, we have many duplicate types, queries and mutations. Printing all duplicates in one message could greatly reduce the turnaround time.

Tests

Manual as of now. Used multi-module-3 to verify the messages.

Before

* What went wrong:
Execution failed for task ':checkMultimodule3ApolloDuplicates'.
> duplicate Type 'ResolverKey(kind=OperationSelections, id=GetAnimal)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  Use 'alwaysGenerateTypesMatching' in a parent module to generate the type only once

After

* What went wrong:
Execution failed for task ':checkMultimodule3ApolloDuplicates'.
> duplicate Type 'ResolverKey(kind=OperationSelections, id=GetAnimal)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  duplicate Type 'ResolverKey(kind=ModelAdapter, id=operationData.GetAnimal.data.animal)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  duplicate Type 'ResolverKey(kind=ModelAdapter, id=operationData.GetAnimal.data)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  duplicate Type 'ResolverKey(kind=Operation, id=GetAnimal)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  duplicate Type 'ResolverKey(kind=Model, id=operationData.GetAnimal.data)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  duplicate Type 'ResolverKey(kind=Model, id=operationData.GetAnimal.data.animal)' generated in modules: :multi-module-3:child,:multi-module-3:child2
  Use 'alwaysGenerateTypesMatching' in a parent module to generate the type only once

@apollo-cla
Copy link

@chao2zhang: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@netlify
Copy link

netlify bot commented Dec 11, 2022

👷 Deploy request for apollo-android-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d7cebd4

@chao2zhang
Copy link
Contributor Author

Was the integration test flaky? I saw the check failed 1-2 hours ago and but now passed.

@martinbonnin
Copy link
Contributor

Was the integration test flaky?

Yup, happens sometimes. See #3920 for some of the gory details.

I relaunched it and it's all good now ✅ . Thanks for the contribution!

@martinbonnin martinbonnin merged commit 7ec028d into apollographql:main Dec 12, 2022
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.

None yet

4 participants