In graphql / lighthouse I got “input.” in sql-statement. How to fix it?

Using input in laravel 9 / lighthouse 6 app:

input VoteCategoryInput {
    name: String! @rules(apply: ["string", "min:2", "max:255", "unique:vote_categories"]),
    active: Boolean!,
    in_subscriptions: Boolean!,
    meta_description: String,
    meta_keywords: [String],
}


extend type Mutation {
   createVoteCategory(
       input: VoteCategoryInput! @spread
   ): VoteCategory! @create

and running mutation :

  mutation {
    createVoteCategory (
      input: {
        name: "Vote Category name"
        active: true
        in_subscriptions: true
        meta_keywords: ["meta_keywords 1", "meta_keywords 2"]
      }
    ) {
        id
        name
        slug
        in_subscriptions
        meta_description
        meta_keywords
        created_at
    }
  }

I got error :

"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'input.name' in 'where clause'
 (SQL: select count(*) as aggregate from `vote_categories` where `input`.`name` = Vote Category name)",

Which syntax have I to use to exclude “input.” in sql-statement ?

Read more here: Source link