question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

filter does not work on "computed" columns

See original GitHub issue

Let’s assume I have a model with UserGroup <- User <- Task. Then postgraphile automatically provides a tasks connection on a user, but there is no way to query all tasks of a user group. So I add the tasks column to the UserGroup table as computed column, and the generated schema correctly lists this column as TasksConnection.

The generated schema also includes the filter option for this connection, however, when trying to use it on any column of the task table, this results in the error:

Unable to resolve where comparison for filter field '...'

The filter option works fine on the auto-generated TasksConnection on the User table.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mattbretlcommented, Oct 11, 2018

Thanks for reporting. This is a regression in beta.16 and I’m working on a fix.

0reactions
leoschweizercommented, Oct 11, 2018

@mattbretl oh sorry, my bad. I didn’t restart the postgraphile server properly. Looks good now, thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SP List Columns filter doesnt work with calculated fields
As a workaround, we suggest you use FilterField/FilterValue parameters to find exact matches on single value per calculated column:
Read more >
Solved: Calculated Column Filter not working
Solved: Hi, I'm trying to calculate the total value of a production lot. The equivalent from excel would be SUMPRODUCT.
Read more >
Filtering on calculated columns doesn't work?
I have a table with calculated field using periodOverPeriodPercentDifference. That all works fine. But I want to add a filter to only show ......
Read more >
Filter doesn't pick up computed columns · Issue #25 - GitHub
In my Graphiql browser I can't seem to perform a filter on a computed column. Below are two queries, one works as normal...
Read more >
Unable to create a Filtered Index on a Computed Column
Unfortunately as of SQL Server 2014, there is no ability to create a Filtered Index where the Filter is on a Computed Column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found