Skip to content

Nested Input type object need a direct usage to be registered correctly #266

Closed as duplicate

Description

@fvigotti

with version 5.5.1
this doesn't work ( error during graphql service registration )

input A {
 v :Int
}
input B {
 a : A
}

type Query {
 q1 (b: B ) : Int 
}

seems that A is not usabe as nested input object if hasn't been called directly by some method in the graphql interface

this WORKS instead.. ( the dumb ) method seems to be required to register A as input type which is required by B... seems a bug in the library to me.. , the previously schema didn't worked neither with A as normal type

input A {
 v :Int
}
input B {
 a : A
}

type Query {
  q1 (b: B ) : Int 
  dumb(a:A):Int 
}

Activity

  1. vojtapol commented on Feb 4, 2020

    @vojtapol
    Member

    Related to #261

  2. shahmalhar commented on Mar 24, 2020

    @shahmalhar

    This is a major bug, is anyone looking into this or is there an ETA?

  3. oryan-block commented on Oct 3, 2026

    @oryan-block
    Collaborator

    Closing as a duplicate of #479. Nested inputs are discovered from your input class properties (see NestedInputTypesTest), so this works on 14.x when the class exposes a matching public getter or field. The failure that remains is when there is no matching property (typo, private field, getter casing) or the resolver takes a Map. That is #479, and the misleading error message is #422. Workaround: register the nested input in the dictionary.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions