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

feat(graphql): Introducing Nested Filtering for Dgraph GraphQL API with Optimized Query Support #9100

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Jun 7, 2024

  1. Configuration menu
    Copy the full SHA
    faecee6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83ed624 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9012f15 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. Configuration menu
    Copy the full SHA
    55f5b6e View commit details
    Browse the repository at this point in the history
  2. remove unused import

    iyinoluwaayoola committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    9fddbf7 View commit details
    Browse the repository at this point in the history
  3. ✨ (query_rewriter.go): Add check for search directive in nested objec…

    …t filtering
    
    ♻️ (query_rewriter.go): Refactor to store field definition in a variable for reuse
    ✨ (wrappers.go): Add HasSearchDirective method to FieldDefinition interface and its implementation to check for search directive in a field
    iyinoluwaayoola committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    01c84ca View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. ♻️ (query.go): Add space for better code readability

    ✨ (query_rewriter.go): Remove unnecessary assignment of aggFilterQueries
    💡 (query_rewriter.go): Add comments to explain nested object filtering
    🐛 (query_rewriter.go): Fix nested object filtering to handle nested fields correctly
    iyinoluwaayoola committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    c48b191 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. ♻️ (query_rewriter.go): Refactor code to improve readability and main…

    …tainability
    
    ✨ (query_test.yaml, schema.graphql, gqlschema_test.yml): Add tests and schema for nested filtering
    🐛 (gqlschema.go, rules.go): Fix validation for @search directive to require @hasInverse directive when necessary
    
    ♻️ (wrappers.go): Rename function 'hasInverseReference' to 'hasInverse' for clarity
    💡 (wrappers.go): Remove unnecessary semicolon and improve code formatting
    ✨ (wrappers.go): Extend 'isCustomType' function to include 'ast.Interface' kind
    🐛 (wrappers.go): Add additional check for inverse type when querying from an interface, not the implemented type
    iyinoluwaayoola committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    c4aa1b9 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. ♻️ (query_rewriter.go): Refactor nested object filter building logic …

    …for readability
    
    ✨ (query_test.yaml): Add test cases for deeply nested object queries and AND/OR conditions
    🐛 (gqlschema.go, rules.go, wrappers.go): Fix custom type detection by passing type instead of field definition
    iyinoluwaayoola committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    3544b65 View commit details
    Browse the repository at this point in the history
  2. ✨ (query_test.yaml): Add new test case "query nested with aggregate f…

    …unction" to increase test coverage and ensure the aggregate function works as expected in nested queries.
    iyinoluwaayoola committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    3a5f682 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. ✨ (schema.graphql): Add Nested_X, Nested_Y, and Nested_Z types to sup…

    …port nested filtering
    
    ✨ (auth_query_test.yaml): Add test case for nested filter query
    🐛 (mutation_rewriter.go): Update rewriteAsQueryByIds and addFilter functions to include mutation alias for better query identification
    
    ♻️ (query_rewriter.go): Refactor filterQueries to varQry for better semantics
    ✨ (query_rewriter.go): Add queryName parameter to rewriteAsQuery and addArgumentsToField functions to support query aliasing
    🐛 (query_rewriter.go): Fix issue where only the first query was returned in rewriteRuleNode, now returns all queries including nested var queries
    iyinoluwaayoola committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    a64fea4 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. 🐛 (schema.graphql): Update Nested_X and Nested_Y types to fix query r…

    …ules for more test coverage
    
    ✨ (auth_delete_test.yaml): Add new test case for delete selection by nested filter
    ✨ (auth_query_test.yaml): Update existing test case and add new ones for positive, negative, and uncertain auth rules with nested filter
    🐛 (mutation_rewriter.go): Fix addFilter function call to include authRw parameter
    
    ♻️ (query_rewriter.go): Refactor addFilter and buildFilter functions to include authRewriter parameter for better access control
    💡 (query_rewriter.go): Update function calls to addFilter and buildFilter to pass authRewriter parameter for improved security
    
    ♻️ (query_rewriter.go): Refactor variable name from 'queries' to 'varQry' for better readability
    ✨ (query_rewriter.go): Add 'auth' parameter to 'buildFilter' and 'buildUnionFilter' functions to support authorization rewriting in queries
    iyinoluwaayoola committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    00e4876 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Configuration menu
    Copy the full SHA
    a3ab965 View commit details
    Browse the repository at this point in the history
  2. ♻️ (query.go): Remove unnecessary line break to improve code readability

    ✨ (query.go): Add timer to track query execution time for performance monitoring
    iyinoluwaayoola committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    c95ecba View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Configuration menu
    Copy the full SHA
    acbdbea View commit details
    Browse the repository at this point in the history