我正在尝试根据一对多关系过滤我的结果,并在postgraphile-plugin-connection-filter的文档中概述了如何做到这一点。我已启用此功能,但选项未显示。
我已重置服务器以确保已获取最新版本,但仍然不走运。
配置
postgraphile(process.env.DATABASE_URL || dbUrl, 'public', {
appendPlugins: [ConnectionFilterPlugin],
connectionFilterRelations: true,
watchPg: true,
graphiql: true,
connectionFilterAllowNullInput: true,
connectionFilterAllowEmptyObjectInput: true,
enhanceGraphiql: true,
enableQueryBatching: true,
})
##询问
query ($firstname: String) {
allArtists(filter: {firstname: {likeInsensitive: $firstname}, awardsByArtistIdExists: true }) {
edges {
node {
artistId
firstname
nationality
错误
{
"errors": [
{
"message": "Field \"awardsByArtistIdExists\" is not defined by type \"ArtistFilter\".",
"locations": [
{
"line": 2,
"column": 65
}
]
}
]
}