Skip to content

Custom directive default parameter not loaded #443

Closed

Description

@pelletier197

I created this custom directive inside a spring boot project

directive @Email(message : String = "{path} must be a valid email") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION

and when I use it inside a query, this way:

 {
    updatePersonEmail(email: String @Email) {
    }
 }

then the default argument values of Email are not passed inside the directive. It's almost like directive declared and the one on the argument are not mapped together. Is this a wished behaviour, or is there something more to do?

Activity

  1. alacoste commented on Oct 7, 2020

    @alacoste

    I have the same issue with a 'ON FIELD_DEFINITION' directive.

    At wiring time, the SchemaDirectiveWiringEnvironment does not seem to contain the values of arguments for which we specified defaults.

    (And I also couldn't find a workaround way to access them)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions