Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Laravel package documentation #10

Merged
merged 1 commit into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/laravel-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
id: laravel-package
title: Getting started with Laravel
sidebar_label: Laravel package
---

The GraphQLite-Laravel package is compatible with **Laravel 5.x**.

## Installation

Open a terminal in your current project directory and run:

```console
$ composer require thecodingmachine/graphqlite-laravel
```

If you want to publish the configuration (in order to edit it), run:

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

You can then configure the library by editing `config/graphqlite.php`.

**config/graphqlite.php**
```php
<?php

use GraphQL\Error\Debug;

return [
/*
|--------------------------------------------------------------------------
| GraphQLite Configuration
|--------------------------------------------------------------------------
|
| Use this configuration to customize the namespace of the controllers and
| types.
| These namespaces must be autoloadable from Composer.
| GraphQLite will find the path of the files based on composer.json settings.
|
| You can put a single namespace, or an array of namespaces.
|
*/
'controllers' => 'App\\Http\\Controllers',
'types' => 'App\\',
'debug' => Debug::RETHROW_UNSAFE_EXCEPTIONS
];
```

The debug parameters are detailed in the [documentation of the Webonyx GraphQL library](https://webonyx.github.io/graphql-php/error-handling/)
which is used internally by GraphQLite.
2 changes: 1 addition & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docs": {
"Introduction": ["features"],
"Installation": ["getting-started", "symfony-bundle", "other-frameworks"],
"Installation": ["getting-started", "symfony-bundle", "laravel-package", "other-frameworks"],
"Usage": ["queries", "mutations", "type_mapping", "extend_type", "authentication_authorization", "external_type_declaration", "input-types", "inheritance"],
"Advanced": ["file-uploads", "custom-output-types", "troubleshooting"],
"Reference": ["annotations_reference"]
Expand Down