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

Add better tests for GraphQL filtering and lookup #15569

Open
arthanson opened this issue Mar 28, 2024 · 0 comments
Open

Add better tests for GraphQL filtering and lookup #15569

arthanson opened this issue Mar 28, 2024 · 0 comments
Labels
status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@arthanson
Copy link
Collaborator

Proposed Changes

The GraphQL tests currently test all model fields, but are very light on testing any filtering of objects or sub-objects. We should add tests for checking different primary filters:

{
  site_list(filters: {name: {i_contains:"DM"}}) {
    id
    name
  }
}

and sub-object filtering:

{
  site_list {
    id
    name
    tags(filters: {name: {i_starts_with: "P"}}) {
      name
    }
  }
}

Justification

The filtering logic for Strawberry is undergoing some major refactors and we could easily miss issues with filtering without tests in-place.

@arthanson arthanson added the type: housekeeping Changes to the application which do not directly impact the end user label Mar 28, 2024
@arthanson arthanson added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation beta Concerns a bug/feature in a beta release labels Apr 25, 2024
@jeremystretch jeremystretch removed the beta Concerns a bug/feature in a beta release label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

3 participants