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

Federation: improve entities handling on sdl merge #395

Merged
merged 48 commits into from
Jul 25, 2022

Conversation

devsergiy
Copy link
Member

No description provided.

David Stutt added 30 commits July 11, 2022 12:52
[changelog]
internal: Duplicated scalars among merged schemas will be removed so only one of that scalar name will exist within the federated schema.
[changelog]
internal: Changed magic number to constant; renamed variable; removed unnecessary code.
… union respectively

[changelog]
internal: Duplicate enums and unions are merged into a single enum or union respectively.
[changelog]
internal: Reduced some code duplication through interfaces.
[changelog]
internal: Renamed and clean up some methods; proposed some efficiency solutions.
…visitor.

[changelog]
internal: Duplicate enums, scalars and unions are merged through the same generic visitor.
…y composed.

[changelog]
internal: Added error handling for when duplicate values are not identically composed.
[changelog]
internal: Added new tests; improved test formatting; improved some naming.
[changelog]
internal: Removed unnecessary code; tidied code up.
[changelog]
internal: Capitalised enum values; added one more type to unions.
[changelog]
internal: Implemented removal of duplicate interfaces.

(cherry picked from commit c2388b4)
[changelog]
internal: Implemented duplicate Input/Object/Interface removal.

(cherry picked from commit edc4f3d)
[changelog]
internal: Removed duplicate code.

(cherry picked from commit d12e057)
[changelog]
internal: Changed receiver to pointer.

(cherry picked from commit 5ab441c)
[changelog]
internal: Removed unused interface.

(cherry picked from commit cdd0b14)
[changelog]
internal: Re-added interface tests; improved test naming.

(cherry picked from commit 06e0c87)
[changelog]
internal: Field values are deeply compared; added more tests.

(cherry picked from commit a68d94d)
[changelog]
internal: Expanded fielded and sdlmerge test suites.

(cherry picked from commit de97afa)
[changelog]
internal: Subgraphs are normalized before merge; added missing extension handlers.

(cherry picked from commit f4e821c)
[changelog]
internal: Removed redundant boolean due to early return.

(cherry picked from commit 560e9e1)
…thod.

[changelog]
internal: Extracted pre-merge subgraph normalization into separate method.

(cherry picked from commit 83295b3)
[changelog]
internal: Added logic to produce error if duplicate entity exists; renamed value type to shared type.

(cherry picked from commit 79783e8)
[changelog]
internal: Added logic to still error if the entity is the last item in the schema.

(cherry picked from commit 091ded1)
[changelog]
internal: Removed logic to handle input entities.

(cherry picked from commit d8a9fa6)
[changelog]
internal: Shared types cannot be extended; added unique union member validation; unresolved extension orphans in the supergraph return an error

(cherry picked from commit 9295cc4)
…ension could occur

[changelog]
internal: Added visitor to return an error if a type has an empty body.

(cherry picked from commit 6820fd5)
[changelog]
internal: Moved visitor to astvalidation. Added validation for type extensions. Handled some edge cases.

(cherry picked from commit a8b8544)
[changelog]
internal: Added check for root type; added logic to ignore private fields; removed duplicated line in rule.

(cherry picked from commit e96a455)
[changelog]
internal: Removed unnecessary visitor; changed tests to new expected outcome

(cherry picked from commit 96d3cc4)
[changelog]
internal: Changed reused parse error to string constant.

(cherry picked from commit b271c75)
David Stutt and others added 18 commits July 11, 2022 13:16
… is empty

[changelog]
internal: Changed check for root type to come first so unnecessary code is not performed.

(cherry picked from commit 4430be0)
[changelog]
internal: Added vars to prevent repeated slice creation; added helper function to determine whether type only contains reserved fields.

(cherry picked from commit d4210ec)
[changelog]
internal: Changed explicit byte slice creation to string conversion.

(cherry picked from commit 55244b8)
[changelog]
internal: Removed variables that cached struct fields.

(cherry picked from commit 3237472)
[changelog]
internal: Added handling for extension of entities.

(cherry picked from commit c0ac6e5)
[changelog]
internal: Removed explicit length for empty map.

(cherry picked from commit 163b185)
[changelog]
internal: Refactored implementation of entity handling; moved entity handling and shared type handling into own files.

(cherry picked from commit 59ce182)
[changelog]
internal: Changed some formatting; exported and reused existing constant.

(cherry picked from commit 2e2c521)
[changelog]
internal: Reduced code duplication; reduced cognitive complexity of external directive validation method.

(cherry picked from commit 6cde0ac)
[changelog]
internal: Moved more generic isEntity method to entityValidator.

(cherry picked from commit 97a6a5f)
[changelog]
internal: Renamed some errors; added logic for edge cases.

(cherry picked from commit bcceac4)
[changelog]
internal: Removed most validation of entities.

(cherry picked from commit 6059c34)
[changelog]
internal: Changed placeholder bool to empty struct in entity set; refactored handling of duplicated entities; removed unnecessary checks that are handled elsewhere.

(cherry picked from commit 9e715cf)
[changelog]
internal: Added immediate return when producing an error; added entitySet type and pass that rather than normalizer.

(cherry picked from commit f7dd1be)
[changelog]
internal: Renamed isTypeEntity; changed logic so document is only changed if the extension is valid; separated exported and unexported const blocks in Plan.

(cherry picked from commit 16baec3)
[changelog]
internal: Removed unnecessary variable.

(cherry picked from commit 5389d86)
[changelog]
internal: Changed import paths.
@devsergiy devsergiy merged commit e6e1a13 into master Jul 25, 2022
@devsergiy devsergiy deleted the federation-changes-for-upstream branch July 25, 2022 14:00
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

1 participant