Learn how to develop GraphQL APIs with Laravel and how to secure them with Auth0.
Read on >> https://auth0.com/blog/developing-and-securing-graphql-apis-with-laravel
Learn how to develop GraphQL APIs with Laravel and how to secure them with Auth0.
Read on >> https://auth0.com/blog/developing-and-securing-graphql-apis-with-laravel
Let us know if you have any questions regarding the article, by reopening this community topic!
If I try to do âphp artisan migrate:fresh --seedâ on my terminal, I get following exceptions.
Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.02 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.02 seconds)
Migrating: 2019_03_10_201800_create_wines_table
Migrated: 2019_03_10_201800_create_wines_table (0.01 seconds)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated: 2019_08_19_000000_create_failed_jobs_table (0.01 seconds)
Illuminate\Contracts\Container\BindingResolutionException : Target class [WinesTableSeeder] does not exist.
at /Users/hisashiyamaguchi/winestore/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
801|
802| try {
803| $reflector = new ReflectionClass($concrete);
804| } catch (ReflectionException $e) {
805| throw new BindingResolutionException(âTarget class [$concrete] does not exist.â, 0, $e);
806| }
807|
808| // If the type is not instantiable, the developer is attempting to resolve
809| // an abstract type such as an Interface or Abstract Class and there is
Exception trace:
1 ReflectionException::(âClass WinesTableSeeder does not existâ)
/Users/hisashiyamaguchi/winestore/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
2 ReflectionClass::__construct(âWinesTableSeederâ)
/Users/hisashiyamaguchi/winestore/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
Please use the argument -v to see more details.
Any ideas?
Hey there @hisashiyamaguchi!
Iâm sure @andrea.chiarelli who is the article author will look at your struggles to provide some help, once heâs online!
Hi @hisashiyamaguchi,
Just a few questions that come to my mind:
WinesTableSeeder
class in the database/seeds
folder? (I think the answer is yes, but I ask just to be sure )Please, let me know.
A heads up for anyone getting the error:
Declaration of App\GraphQL\Queries\UserQuery::type() must be compatible with Rebing\GraphQL\Support\Field::type(): GraphQL\Type\Definition\Type.
You must add return types to the methods.
e.g.
use GraphQL\Type\Definition\Type;
// â
public function type(): Type
{
return GraphQL::type('User');
}
public function args(): Array
{
return [
...
]
}
// â
public function type()
{
return GraphQL::type('User');
}
public function args()
{
return [
...
]
}
Thanks for providing that tip @fa-repo!
// ./app/Http/Middleware/CheckAccess.php
I have an Error: Class âAuth0\SDK\JWTVerifierâ not found in file.
How to fix this ? I am using laravel 8.x
Tagging @andrea.chiarelli for visibility
Thank you @fa-repo for the heads-up and @konrad.sopala for tagging me.
We will plan to update the article soon.