Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Configurable types #22

@crisu83

Description

@crisu83

Here's an idea we talked about with @Jalle19:

We could add support for configuring the types in config/graphql.php using a types-property. That would allow us to implement a default TypeResolver. In addition to that we probably need to make the type_attribute also configurable, but it could default type type. Here's how it could look:

<?php

return [
  'schema' => App\GraphQL\Schema::class,

  'enable_graphiql' => env('ENABLE_GRAPHIQL', false),

  'graphiql_token'  => env('GRAPHIQL_TOKEN'),

  'typeAttribute' => 'type',

  'types' => [
    'Foo' => App\GraphQL\Types\FooType::class
  ],

];

Thoughts?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions