Configuration

This file holds the configuration for your GraphQL server. config/lighthouse.php

Namespaces

The namespaces you set here are used when using the lighthouse:make command.

[
    // ...
    'namespaces' => [
        'mutations'   => 'App\\Http\\GraphQL\\Mutations',
        'queries'     => 'App\\Http\\GraphQL\\Queries',
        'types'       => 'App\\Http\\GraphQL\\Types',
        'fields'      => 'App\\Http\\GraphQL\\Fields',
        'connections' => 'App\\Http\\GraphQL\\Connections',
        'dataloaders' => 'App\\Http\\GraphQL\\DataLoaders',
    ],
]

Controller

If you wish, you may use your own controller to handle GraphQL requests, just set the namespace and method here.

[
    // ...
    'controller' => 'Nuwave\Lighthouse\Support\Http\Controllers\LaravelController@query'
]

Pagination Macro

Lighthouse includes a helper macro for collections to slice them into the requested connection. You can use this setting to change the name of the macro used.

[
    // ...
    'pagination_macro' => 'toConnection'
]

Schema

This part of the configuration allows you to output your schema your set location as well as register your Types/Mutations/Queries/etc.

[
    // ...
    'schema' => [
        'output' => storage_path('lighthouse/schema.json'),
        'register' => base_path('routes/graphql.php'),
    ],
]

Output

Set this to a file path where you would like to store your schema (if necessary). For instance if you have a React project that utilizes Relay, you may need the schema file for the babel loader to parse.

Register

Here is where you can register your schema. You can set this to a closure (if your project is small) or a file location.

Cache

TODO

Route

TODO

Model Path

TODO

Camel Case

TODO

results matching ""

    No results matching ""