sanantech
@sanantech
PHP/Java Developer

Как настроить GraphQLBundle для передачи массива объектов в input args?

У меня есть такие конфиги:
Mutation:
    type: object
    config:
        fields:
            CreateUserReportConfiguration:
                type: CreateUserReportConfigurationPayload!
                resolve: "@=mutation('create_user_report_configuration', [args['input']])"
                args:
                    input:
                        type: CreateUserReportConfigurationInput!

CreateUserReportConfigurationPayload:
    type: object
    config:
        fields:
            id:
                type: "Int"
            user_id:
                type: "Int"
            fields:
                type: "[ColumnReport]"
CreateUserReportConfigurationInput:
    type: input-object
    config:
        fields:
            user_id:
                type: "Int!"
            fields:
                type: "[ColumnReport]!"

в CreateUserReportConfigurationInput.config.fields.fields.type в качетсве параметра можете увидеть как я хочу передать массив объектов, описанный в соответствующем файле:
ColumnReport:
    type: object
    config:
        fields:
            column_name:
                type: "String"
            table_name:
                type: "String"


Но на данный момент бандл возвращает 500ую ошибку с текстом
The type of CreateUserReportConfigurationInput.fieldList must be Input Type but got: [ColumnReport]!. То есть говорит мне, что я не могу отправлять на сервер через graphql массив объектов, что на мой взгляд бред какой то. Как быть с этой проблемой? Мне нужно отправлять именно в данном поле fields массив объектов ColumnReport.
  • Вопрос задан
  • 87 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы