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

Unsetting "object_ids" on all connections #39

Closed
seagyn opened this issue Apr 24, 2019 · 1 comment
Closed

Unsetting "object_ids" on all connections #39

seagyn opened this issue Apr 24, 2019 · 1 comment

Comments

@seagyn
Copy link

seagyn commented Apr 24, 2019

Describe the bug
The filter added to graphql_term_object_connection_query_args is unsetting $query['object_ids'] without checking the type that is being worked with. This means that if you want to limit connection terms to their object, you can't even if you set shouldOnlyIncludeConnectedItems.

To Reproduce
This query should only return 1 category on my side but it returns them all.

query getPosts {
    posts {
      edges {
        node {
          postId
          title
        	categories(where: {
            shouldOnlyIncludeConnectedItems: true
          }) {
            edges {
              node {
                name
              }
            }
          }
        }
      }
    }
  }

Expected behavior
The WooCommerce term connection should only unset "object_ids" on WooCommerce types and not effect other connections.

@kidunot89
Copy link
Member

Fixed it in #30

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

No branches or pull requests

2 participants