Circular input property leads to stackoverflow · Issue #409 · graphql-java-kickstart/graphql-java-tools · GitHub
Skip to content

Circular input property leads to stackoverflow #409

Closed

Description

@KammererTob

After updating graphql-java-tools to 6.1.0 i have encountered a stackoverflow exception on startup. I think that the problem was introduced in this commit: 10ee43f and happens because of the interaction between determineInputType and createInputObject.
Example schema:

input A {
    id: ID!
    b: B
}

input B {
   id: ID!
   a: A
}

According to the spec this should be allowed (graphql/graphql-spec#445, graphql/graphql-spec#189), which leads me to believe that this is a bug.

Activity

  1. changed the title [-]Circular input property leads to Stackoverflow[/-] [+]Circular input property leads to stackoverflow[/+] on Jun 22, 2020
  2. vojtapol commented on Jul 2, 2020

    @vojtapol
    Member

    Confirmed bug. Contributions welcome.

  3. enriquedacostacambio commented on Sep 29, 2020

    @enriquedacostacambio

    fyi, simple (non-mutual) recursion also triggers the bug:

    input CriterionInput {
        and: [CriterionInput!]
        or: [CriterionInput!]
        not: CriterionInput
        status: StatusCriterionInput
    }
    
    input StatusCriterionInput {
        eq: String
    }
  4. PhilippS93 commented on Oct 22, 2020

    @PhilippS93

    Can confirm. This is especially important for filtering purposes like recursive OR and AND patterns.

  5. added a commit that references this issue on Dec 14, 2020
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