Skip to content

Commit

Permalink
Merge pull request #48 from andrey-mokhov/docs
Browse files Browse the repository at this point in the history
Development middleware layers
  • Loading branch information
andrey-mokhov committed Dec 26, 2023
2 parents 6bcbade + e34847d commit e0f3c8e
Show file tree
Hide file tree
Showing 8 changed files with 378 additions and 17 deletions.
Binary file added docs/images/graphql-process.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/ru/spiral/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- [`AbstractUnionType`](abstract-union-type.md)
- [`AbstractScalarType`](abstract-scalar-type.md)
9. Загрузка файлов
10. Разработка middleware слоев
10. [Разработка middleware слоев](middleware.md)
11. Дополнительные GraphQL типы
- `Date`
- `DateTime`
2 changes: 1 addition & 1 deletion docs/ru/spiral/input-object-field.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Определение полей входящего объектного GraphQL типа

Определение поля объектного GraphQL типа возможно:
- с помошью атрибута `Andi\GraphQL\Attribute\InputObjectField` ([ссылка](#input-object-field-via-attribute));
- с помощью атрибута `Andi\GraphQL\Attribute\InputObjectField` ([ссылка](#input-object-field-via-attribute));
- путем реализации интерфейса `Andi\GraphQL\Definition\Field\InputObjectFieldInterface` ([ссылка](#input-object-field-via-interface));

## <a id="input-object-field-via-attribute">Определение с помощью атрибута</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/spiral/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
composer require andi-lab/graphql-php-spiral
```

## Настройка загрузчика
## <a id="bootloader">Настройка загрузчика</a>

Добавьте `Andi\GraphQL\Spiral\Bootloader\GraphQLBootloader` в список загрузчиков `App\Application\Kernel::LOAD`

Expand Down
363 changes: 363 additions & 0 deletions docs/ru/spiral/middleware.md

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions examples/spiral/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Copy RoadRunner
COPY --from=rr /usr/bin/rr /usr/bin/rr

RUN apk update && apk add --no-cache \
linux-headers \
libzip-dev \
unzip \
&& apk add $PHPIZE_DEPS \
&& docker-php-ext-install zip sockets opcache


#RUN pecl install xdebug \
# && docker-php-ext-enable xdebug
RUN apk update && \
apk add --no-cache linux-headers libzip && \
apk add --no-cache --virtual build-deps libzip-dev $PHPIZE_DEPS && \
docker-php-ext-install zip sockets opcache && \
# pecl install xdebug && \
# docker-php-ext-enable xdebug && \
apk del build-deps && \
rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apk/* /usr/src/php*

WORKDIR /data
CMD ["/usr/bin/rr", "serve"]
6 changes: 3 additions & 3 deletions examples/spiral/app/src/GraphQL/Type/CreateUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
final class CreateUserRequest implements ParseValueAwareInterface
{
/**
* @param string $lastname Фамилия
* @param string $firstname Имя
* @param string $middlename Отчество
* @param string $lastname Lastname
* @param string $firstname Firstname
* @param string $middlename Middlename
*/
public function __construct(
#[InputObjectField] public readonly string $lastname,
Expand Down
2 changes: 1 addition & 1 deletion examples/spiral/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MAKEFLAGS += --no-print-directory

.EXPORT_ALL_VARIABLES:
PHP_IMAGE_VERSION := 8.1-cli-alpine3.18
RR_VERSION := 2023.3.7
RR_VERSION := 2023.3.8
ROOT_DIR := $(shell pwd)

install:
Expand Down

0 comments on commit e0f3c8e

Please sign in to comment.