Skip to content

Conversation

@shalarewicz
Copy link
Collaborator

@shalarewicz shalarewicz commented Jul 10, 2022

Summary

  • Adds support for fragments and inline fragments on interfaces and unions.
  • Refactor AST functions to allow fragment complexities to be stored in closure.
  • Refactors fieldNode function to improve error handling
  • Refactors buildTypeWeights process and object to better hanlde union types. Shared field types are now added to both the parent Union type and the child types. Matches are determined by field name and resolved type. There is a task to make the test suite for union types more robust and better handle cases when lists and non-null operators are involved.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Issues

Evidence

  • Inline fragments on interfaces and union tests are passing
  • Fragment Definition tests are passing

image

Refactored ASTNodeFunctions into ASTParser class to store fragment complexity in closure
refactored fieldNode to for error clariry
@shalarewicz
Copy link
Collaborator Author

shalarewicz commented Jul 16, 2022

  • Rename ASTnodefunctions to ASTParser. I held off on this to maintain readability of the file diffs.

@shalarewicz shalarewicz marked this pull request as ready for review July 16, 2022 01:32
@evanmcneely
Copy link
Contributor

This is all really good. I think it would be good for future contributors if the comments were more clear. Right now the comments don't help me understand the code any better.

@shalarewicz shalarewicz requested a review from evanmcneely July 18, 2022 23:51
Copy link
Contributor

@evanmcneely evanmcneely left a comment

Choose a reason for hiding this comment

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

This is good and a big step in functionality.

@shalarewicz shalarewicz merged commit 160071b into dev Jul 19, 2022
@shalarewicz shalarewicz deleted the sh/fragments branch July 19, 2022 22:31
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.

Undefined fieldWeight throws an error during complexity anlaysis Complexity algorithm should work with fragments

4 participants