DEV Community

loading...

Discussion on: GraphQL Auth with Passport and Lighthouse PHP

Collapse
kevinpallado profile image
Kevin Pallado

hi jose, can you help me out? I got these error even the model are exists

error => {
"message": "Cannot query field \"_id\" on type \"User\". Did you mean \"id\"?",
"extensions": {
"category": "graphql"
},

this is my auth configuration
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],

    'api' => [
        'driver' => 'passport',
        'provider' => 'users',
        'hash' => false,
    ],
],

'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User\User::class,
],
]

I am trying to figure this out but sad to say I cant solve it

Thread Thread
joselfonseca profile image
Jose Luis Fonseca Author

Hey there, you are trying to query a field _id but that field does not exist, it should be id without the _

Thread Thread
kevinpallado profile image
Kevin Pallado

I am using my own user table, Im not relying on laravel's user default table. And I think I cannot see my own model, although I already configure the auth on using my own user table. Can you help me out?

Thread Thread
kevinpallado profile image
Kevin Pallado

Hi jose just for the update, I got this kind of error

'''The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."''