Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alphaolomi/laravel-graphql-api
Laravel GraphQL API
https://github.com/alphaolomi/laravel-graphql-api
graphql graphql-server hacktobefest laravel laravel-graphql
Last synced: 7 days ago
JSON representation
Laravel GraphQL API
- Host: GitHub
- URL: https://github.com/alphaolomi/laravel-graphql-api
- Owner: alphaolomi
- Created: 2023-05-21T22:44:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-30T09:13:10.000Z (11 months ago)
- Last Synced: 2024-09-14T10:32:38.402Z (19 days ago)
- Topics: graphql, graphql-server, hacktobefest, laravel, laravel-graphql
- Language: PHP
- Homepage: https://alphaolomi.github.io/laravel-graphql-api/
- Size: 859 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# πΈοΈ Laravel GraphQl Example
![GraphQL Playground Screenshot](./public/screenshot.png)
## π οΈ Technologies
- [Laravel](https://laravel.com/) The PHP Framework for Web Artisans.
- [Lighthouse](https://lighthouse-php.com/) A Lighthouse is a GraphQL framework for Laravel.
- [GraphQL Playground](https://github.com/mll-lab/laravel-graphiql) A GraphQL Playground UI for testing and exploring GraphQL APIs.## π Installation
> **Note:** This project requires Git and Composer.
```bash
git clonecomposer install
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate
php artisan db:seed
php artisan serve
```Open [http://localhost:8000/graphql-playground](http://localhost:8000/graphql-playground) to view it in the browser.
## π Usage
### Queries
Here are some example queries to try:
```graphql
{
users {
id
name
posts {
id
title
body
}
}
}
``````graphql
{
user(id: 1) {
id
name
posts {
id
title
body
}
}
}
```## π§ͺ Testing
```bash
php artisan test
```## β Support for this project
If you liked this project, please give it a star β & check out my [other projects](https://github.com/alphaolomi).
## π License
This project is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).