Comments (8)
Hey! I found the issue,
I just missed placing connectionFilterRelations: true inside graphileBuildOptions.
graphileBuildOptions: {
connectionFilterRelations: true, // default: false
}
Adding this worked!
from crystal.
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
from crystal.
What should be the version of the postgraphile for this filter to work?
This filter is not working in this version
"postgraphile": "^4.13.0",
"postgraphile-plugin-connection-filter": "^2.3.0"
from crystal.
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.
from crystal.
This is not working for me,
I am getting the above error.
I have added this connectionFilterRelations: true. But still it is not working
Can you please let me know what is causing the issue?
from crystal.
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.
from crystal.
This is the query I am using
{
Users(
filter: {userName: {equalTo: "raghav"}, Account: {accountStatus: {equalTo: "active"}}}
) {
nodes {
userName
Account {
accountName
accountId
accountStatus
}
}
totalCount
}
}
Error:
"message": "Field "Account"" is not defined by type "UsersFilter".
from crystal.
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.
from crystal.
Related Issues (20)
- @omit tag does not get emulated correctly in v5
- Allow adding validation rules to Grafserv HOT 2
- Smart tag to shortcut accessing an attribute from a related table
- Current enum value isn't present on GraphQLEnumType_values_value scope HOT 2
- Planned module: @dataplan/graphql HOT 4
- Significant memory spike in plugin with each() HOT 3
- Grafast: garbage collection
- Grafast: hoisting of subroutines
- Exported PgCodec loses polymorphic information HOT 3
- `withPgClient` is intended for mutations - make it clear! HOT 4
- PostGraphile docs: ambiguous example in makeExtendSchemaPlugin docs
- Document grafserv/envelop integration and how to add validation rules
- Graphile Export: detect hasOwn keys set on functions that aren't exportable
- Connection string with localhost don't work in library mode HOT 6
- "Gather" plugin example: treating unique indexes similarly to unique constraints HOT 1
- Document the new "early exit" and "global dependencies" features
- Epic: removing $step.eval()
- Masked errors when output to console should include path, etc.
- `makeWrapPlansAfterArgumentsHaveBeenAppliedPlugin` - solve confusion
- PostGraphileRelayPreset bug: mutation with "null" foreign key value does not work (returns null) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crystal.