Skip to content
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
9 changes: 9 additions & 0 deletions TransformerException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
namespace StudioNet\GraphQL\Exception;

/**
* Generic transformer exception
*
* @see \Exception
*/
class TransformerException extends \Exception {}
9 changes: 9 additions & 0 deletions TransformerNotFoundException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
namespace StudioNet\GraphQL\Exception;

/**
* Thrown when transformer is not found
*
* @see \Exception
*/
class TransformerNotFoundException extends \Exception {}
35 changes: 26 additions & 9 deletions resources/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,38 @@
]
],

// Type configuration. It allows you to define custom Type based on
// StudioNet\GraphQL\Type\{EloquentType,Type}
//
// `entities` : list of entities
// `definitions` : list of custom Type
'type' => [
'entities' => [],
'definitions' => []
],
// Type configuration. You can append any data : a transformer will handle
// them (if exists)
'type' => [],

// Scalar field definitions
'scalar' => [
\StudioNet\GraphQL\Support\Scalar\Timestamp::class
],

// A transformer handles a supports and a transform method. I can convert
// any type of data in specific content. In order to make work Eloquent
// models, a transformer convert it into specific ObjectType.
//
// Take care about order : the first supported transformer will handle the
// transformation ; others will simply not be called. I you want make
// modifications about a specific transformer, you'll have to extend
// existing one and replace it below
//
// There's 3 types of transformers : type, query and mutation
'transformer' => [
'type' => [
\StudioNet\GraphQL\Transformer\Type\ModelTransformer::class,
\StudioNet\GraphQL\Transformer\TypeTransformer::class,
],
'query' => [
\StudioNet\GraphQL\Transformer\FieldTransformer::class,
],
'mutation' => [
\StudioNet\GraphQL\Transformer\FieldTransformer::class,
]
],

// Response configuration
//
// `headers` : custom headers to send on controller response
Expand Down
167 changes: 0 additions & 167 deletions src/Eloquent/Manager.php

This file was deleted.

90 changes: 0 additions & 90 deletions src/Eloquent/MutationManager.php

This file was deleted.

Loading