首页 > 解决方案 > 如何在 Lighthouse GraphQl 和多个 where 查询中添加大于等于

问题描述

我安装了

composer require mll-lab/graphql-php-scalars:^4

在 config/app.php 中添加了提供

\Nuwave\Lighthouse\WhereConditions\WhereConditionsServiceProvider::class,

在我使用它来匹配等于之前

extend type Query @guard {
    usertimesheetextrasWithCondition(query: TimesheetExtraQueryCondition): [UserTimesheetExtra!]!
        @all
}

input TimesheetExtraQueryCondition {
    project_id: ID @eq
    billing_status: String @eq
    status: String @eq

//But I want something like this 
  date: Date @gte
}

但收到此错误:

在此处输入图像描述

标签: laravelgraphqllaravel-lighthouse

解决方案


推荐阅读