-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
How to add condition for a table that is related to other(while joining tables) #2009
Comments
This is more a question for the filter plugin, but something like this: {
AAAA(filter: {ab: {isNull: false}, BBBB: { type: { isEqual: "ccdd" } }}) {
nodes {
id
BBBB{
type
}
}
totalCount
}
} You need to turn on relational filters; see: https://github.com/graphile-contrib/postgraphile-plugin-connection-filter?tab=readme-ov-file#connectionfilterrelations |
What should be the version of the postgraphile for this filter to work? This filter is not working in this version |
Any release from the last couple years should work; do make sure you read the filter plugins documentation though - especially the part I mentioned above about enabling relational filters. |
Seems like you’re querying field 🟥🟥🟥🟥 on type 🟥🟥🟥🟥, but that field doesn’t exist. You should use GraphiQL or similar to build your query so it will show you what’s wrong. |
This is the query I am using
Error: |
Hey! I found the issue,
Adding this worked! |
Great; glad it's working! You should note that this is exactly what I linked you to 3 weeks ago and then referenced again 3 days ago. |
Summary
We have two tables AAAA and BBBB. Now I am trying to joining AAAA with BBBB and getting some data based on conditions
Here I need to add a condition where my type is "ccdd" in table BBBB
Additional context
The text was updated successfully, but these errors were encountered: