PHPackages                             tylerfiekens/graphqlite-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tylerfiekens/graphqlite-laravel

ActiveLibrary[API Development](/categories/api)

tylerfiekens/graphqlite-laravel
===============================

A Laravel service provider package to help you get started with GraphQLite in Laravel.

v7.0.1(1y ago)03.6kMITPHPPHP ^8.2

Since Feb 14Pushed 1y agoCompare

[ Source](https://github.com/TylerFiekens/graphqlite-laravel)[ Packagist](https://packagist.org/packages/tylerfiekens/graphqlite-laravel)[ Docs](https://github.com/thecodingmachine/graphqlite)[ RSS](/packages/tylerfiekens-graphqlite-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (13)Versions (20)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/7e9ff65863ad79bd73cafc5223a59bac6052851263d834ca08aca5f76036b5ba/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/1af4639b062ecea875c9102ed97bbc386872d0ca987166744def123a497785b7/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)[![License](https://camo.githubusercontent.com/f0dbbc5984ddbe26d3018d9805ac80527e7827a75430fd1f88aef9b6ea38b82e/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/thecodingmachine/graphqlite-laravel)[![Build Status](https://github.com/thecodingmachine/graphqlite/workflows/Continuous%20Integration/badge.svg)](https://github.com/thecodingmachine/graphqlite/actions)

Laravel GraphQLite bindings
===========================

[](#laravel-graphqlite-bindings)

GraphQLite integration package for Laravel.

**This package is based on the work of the friendly folks over at [TheCodingMachine](https://github.com/thecodingmachine/graphqlite-laravel).**

Installation
------------

[](#installation)

```
composer require tylerfiekens/graphqlite-laravel
```

Publish the configuration file
------------------------------

[](#publish-the-configuration-file)

```
php artisan vendor:publish --provider="TheCodingMachine\GraphQLite\Laravel\Providers\GraphQLiteServiceProvider"
```

Usage
-----

[](#usage)

The package will automatically register the routes for the GraphQL endpoint. You can access the GraphQL endpoint at `/graphql`.

By default, the package will look for your GraphQL types in the `App\GraphQL\Types` namespace, and your queries and mutations in the `App\GraphQL\Queries` and `App\GraphQL\Mutations` namespaces respectively. You can change these settings in the `config/graphqlite.php` configuration file.

### Types

[](#types)

To create a new type, you can just create a new class in the `App\GraphQL\Types` namespace. The only requirement is that the class must have a `#[Type]` annotation, which is used to register the type in the schema.

To add fields to the type, you can create public methods with a `#[Field]` annotation. The method name will be used as the field name.

```
