Skip to content

Conversation

@evanmcneely
Copy link
Contributor

@evanmcneely evanmcneely commented Jun 2, 2022

Summary

This is a functioning type complexity analysis algorithm that passes tests up to and including with aliases. The algorithm traverses the query AST which is a bunch of nested nodes of different graphQL types. The algorithm implements a different function for each AST Node Type so that the algorithm is modular and easily extendable. To add new functionality, create a new function to handle the GraphQL Node that holds the responsibility for that functionality.

Still to do

  • handle arguments and variables
  • handle fragments
  • handling lists

Type of Change

  • New feature (non-breaking change which adds functionality)

Issues

Evidence

Screen Shot 2022-06-02 at 9 29 12 AM

@evanmcneely evanmcneely marked this pull request as ready for review June 2, 2022 14:05
@evanmcneely evanmcneely requested a review from shalarewicz June 3, 2022 03:47
}

/**
* There are numorous ways to get the ip address off of the request object.
Copy link
Collaborator

@shalarewicz shalarewicz Jun 4, 2022

Choose a reason for hiding this comment

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

Great catch on this. This came up while writing tests but I never created an issue for it. It will be a good post mvp discussion. Created #47

Copy link
Collaborator

@shalarewicz shalarewicz left a comment

Choose a reason for hiding this comment

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

Really great work and gives us solid groundwork for expanding.

@shalarewicz
Copy link
Collaborator

Updated evidence. All tests still passing
image

@shalarewicz shalarewicz linked an issue Jun 16, 2022 that may be closed by this pull request
@evanmcneely evanmcneely merged commit 1b0ac1b into dev Jun 17, 2022
@evanmcneely evanmcneely deleted the em/typeComplexityAlgo branch June 17, 2022 17:19
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.

Get express ratelimitng middleware to pass tests Write the basic framework for the complexity analysis algorithm.

4 participants