Skip to content

array constraint directive: Cannot read properties of undefined (reading 'options')"Β #216

@JannikWempe

Description

@JannikWempe

Hey,
first of all: thanks for the package πŸ™πŸΌ

After updating from 5.0.0 to 5.3.0 we saw this error:
Cannot read properties of undefined (reading 'options')"

The error occurs on an array input field like this: tags: [PublishPostTagInput!] @constraint(maxItems: 15)

I have narrowed down this issue to this specific line of code in the update from 5.1.1 (which works fine) to 5.2.0 (which causes the issue): v5.1.1...v5.2.0#diff-92691f7e07d8e0cf1bca1e0dc22e025d109b1b5ba4f16a83bdc05711a670ed5fR233

I don't really get what's going on at that specific line of code. Otherwise I would have attempted to fix it in a PR.

EDIT:

We are instantiating the plugin like this:

createApollo4QueryValidationPlugin({
      schema
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions