-
-
Notifications
You must be signed in to change notification settings - Fork 466
Closed as not planned
Labels
questionRequest for support or clarificationRequest for support or clarification
Description
Describe the bug
Expected behavior/Solution
Table name and field name should be snake_case but got camelCase
Steps to reproduce
MY VALIDATION RULES:
public function rules(): array
{
return [
'id' => [
'required'
],
'title' => [
'required'
],
'slug' => [
'required',
Rule::unique('collections', 'slug')->ignore($this->arg('id'), 'id'),
],
'tracks' => [
'connect' => [
Rule::unique('collection_tracks', 'track_id')->ignore($this->arg('id'), 'collection_id'),
]
]
];
}
input UpdateTracksBelongsToMany {
connect: [ID!]
sync: [ID!]
syncWithoutDetaching: [ID!]
disconnect: [ID!]
delete: [ID!]
}
MY MUTATION:
updateUserCollection(
id: ID!
title: String
slug: String
description: String
public: Boolean
tracks: UpdateTracksBelongsToMany
): Collection
@validator
@can(
ability: "update"
injectArgs: true
model: "App\\Models\\Collection"
)
@update
Output/Logs
Click to expand
debugMessage
:
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'audiosugar.collectiontracks' doesn't exist (SQL: select count(*) as aggregate from `collectionTracks` where `trackId` = 1 and `collectionId` <> 1)"
Lighthouse Version
Metadata
Metadata
Assignees
Labels
questionRequest for support or clarificationRequest for support or clarification