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

Write the basic framework for the complexity analysis algorithm. #2

Closed
evanmcneely opened this issue May 14, 2022 · 0 comments · Fixed by #34
Closed

Write the basic framework for the complexity analysis algorithm. #2

evanmcneely opened this issue May 14, 2022 · 0 comments · Fixed by #34

Comments

@evanmcneely
Copy link
Contributor

evanmcneely commented May 14, 2022

The algorithm should do roughly these things.

  1. Accepts a GraphQL query string and a 'field weight object' from issue Write a function to iterate through the GraphQL schema object #3
  2. Parses the string and iterates through the AST
  3. Counts and totals complexity by checking the query fields against field weight object
  4. Returns the total complexity

Use the GraphQL.js library.

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 a pull request may close this issue.

1 participant