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)
- (v5) I'd like get a generic executor from `build.input.pgRegistry` inside a `makeExtendSchemaPlugin`. HOT 1
- Questions based on initial experience with v5 polymorphism HOT 6
- The v5 documentation for crud mutations mentions both `insert` and `create` as values for the `@behavior` smart tag. HOT 2
- PgExecutor cache is not cleared between subscription payloads
- Subscription error causes socket to disconnect
- `PostGraphileRelayPreset` does not eliminate `Row` in `ByRowId`
- Polymorphic types offer mutations under some circumstances? HOT 1
- Derived types include selector for the derived types when using relational polymorphism HOT 3
- How to call custom function with the id provided by the relay preset HOT 3
- It should be possible to declare a shared `@ref` only in the base table when using relational polymporphism HOT 2
- Using `makeWrapPlansPlugin` creates an error when exporting the schema HOT 1
- TypeScript regression: loadOne no longer inferring types HOT 1
- Documentation for `makePgService({adaptorSettings})` appear to be outdated
- Trailing space after `@primaryKe <name>y` smart tag causes error when used with `|` to modify virtual constraint HOT 5
- Ruru rendering issues HOT 2
- GraphQL resolver emulation should cascade
- Should `__FlagStep` be isSyncAndSafe?
- Change how `__Flag` be represented in plan diagrams?
- Plan diagrams: `::sideeffectplan` and `::unbatchedPlan` conflict HOT 1
- RBAC enhancements: don't fetch column if not allowed to fetch column
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.