Laravel GraphQL is a implementation of GraphQL with PHP for Laravel. Very easy to install and use. So the plan in this post is to create
langs query and see it in Graphiql.
- Laravel GraphQL library.
I'm using PostgreSQL.
I created the class BaseModel to save the
updated_by fields in the database.
This file has the columns to return as the JSON variables. You can see whole file in github.
This is the basic example to return all the columns of the
Now you can go to http://127.0.0.1:8000/graphiql/ and run the query and see the DB values in JSON format.
This is a very basic query. To make it better you have to work with the arguments and pagination. I already did it, so if you go to my laravel-graphql-api repository you can see it. If you would like to see it live please go here.