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

Feature Request: And/Or Operators #2201

Open
jadamconnor opened this issue Jan 4, 2022 · 4 comments
Open

Feature Request: And/Or Operators #2201

jadamconnor opened this issue Jan 4, 2022 · 4 comments
Labels
Architecture Component: Connections Issues related to connections Component: Query effort: high more than a week Type: Enhancement New feature or request

Comments

@jadamconnor
Copy link

jadamconnor commented Jan 4, 2022

Other GraphQL libraries feature And/Or operators. An example:

posts(where: {_and: [{categoryName: "foo"}, {categoryName: bar}]}) {
    edges {
        node {
            id
        }
    }
}

Is there some specific limitation preventing this from being implemented with WPGraphQL?

@jasonbahl
Copy link
Collaborator

@jadamconnor the only limitation so far has been coming up with a good plan around it, and spending the time to execute the plan!

It's been discussed a bit here already: #1385

I think this is the way to go, for sure.

The early design around the where args was, I think, a mistake, as it was an attempt to treat GraphQL simply as a mirror of internal WordPress mechanisms and not a Graph.

I think formalizing a "spec" of sorts around the and/or operators, how plugins can hook in to add their own, how the input should affect underlying queries, etc would be great.

@jasonbahl jasonbahl added Component: Query Status: Discussion Requires a discussion to proceed Architecture effort: high more than a week Type: Enhancement New feature or request labels Jan 7, 2022
@stale
Copy link

stale bot commented Aug 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 2, 2022
@stale
Copy link

stale bot commented Sep 2, 2022

This issue has been automatically closed because it has not had recent activity. If you believe this issue is still valid, please open a new issue and mark this as a related issue.

@stale stale bot closed this as completed Sep 2, 2022
@justlevine justlevine reopened this Sep 2, 2022
@stale stale bot removed the stale label Sep 2, 2022
@stale
Copy link

stale bot commented Dec 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale? May need to be revalidated due to prolonged inactivity label Dec 1, 2022
@jasonbahl jasonbahl added not stale Short-circuits stalebot. USE SPARINGLY and removed Status: Discussion Requires a discussion to proceed Stale? May need to be revalidated due to prolonged inactivity labels Dec 1, 2022
@jasonbahl jasonbahl added the Component: Connections Issues related to connections label Dec 1, 2022
@justlevine justlevine removed the not stale Short-circuits stalebot. USE SPARINGLY label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Component: Connections Issues related to connections Component: Query effort: high more than a week Type: Enhancement New feature or request
Projects
Status: 🗺 Planned
Development

No branches or pull requests

3 participants