Skip to content

Commit

Permalink
GraphiQl presenter, bumped dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Jun 23, 2023
1 parent 8bc41ea commit 6fbc44a
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 200 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Install package using composer
### Adapters

- `\Graphpinator\Nette\TracyLogger`
- Implements logger interface for loggin in `\Graphpinator\Graphpinator`.
- Implements logger interface for logging in `\Graphpinator\Graphpinator`.
- `\Graphpinator\Nette\NetteRequestFactory`
- Implements RequestFactory and enables direct creation of `\Graphpinator\Request\Request` from Nette HTTP abstraction.
- Implements `RequestFactory` and enables direct creation of `\Graphpinator\Request\Request` from Nette HTTP abstraction.
- `\Graphpinator\Nette\FileProvider`
- Implements FileProvider interface needed by `infinityloop-dev/graphpinator-upload` module.
- Implements `FileProvider` interface needed by `infinityloop-dev/graphpinator-upload` module.
- `\Graphpinator\Nette\NetteCache`
- Adapter from Nette Caching to Psr CacheInterface needed by `infinityloop-dev/graphpinator-persisted-queries` module.

Expand All @@ -41,7 +41,30 @@ $router[] = new Route('/schema.graphql',
]);
```

It is also required to register the application-module to correct namespace.
### GraphiQLPresenter

Presenter which include [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme), a graphical interface to interact with your schema.

Presenter is enabled by creating a route:

```php
$router[] = new Route('/graphiql',
'module' => 'Graphpinator',
'presenter' => 'GraphiQl',
'action' => 'default',
]);
```

It is also required to pass a location of your API endpoint, to which GraphiQL will connect to.

```neon
services:
Graphpinator\Nette\GraphiQlPresenter(':Api:Graphql:default')
```

### Presenter Mapping

In order to use presenters, it is required to register the application-module to correct namespace.

```neon
application:
Expand Down
Loading

0 comments on commit 6fbc44a

Please sign in to comment.