Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

enabling graphql.servlet.maxQueryDepth causes playground docs/schema to never load #648

Closed

Description

@bryevo

Enabling the graphql.servlet.maxQueryDepth property to an arbitrary value causes the graphql playground docs and schema tabs to never load and stays "spinning" infinitely.

This also seems to be affecting Voyager, if installed.

After I removed this property in my application.yml file, my docs and schema are working fine.

Using v11.1.0 of graphql-spring-boot

Activity

  1. gabbigum commented on Jul 16, 2021

    @gabbigum

    Can you share more information? Maybe your pom.xml file?

    I've tried setting this property on my graphql server using the same version of graphql-spring-boot and my playground seems to work fine.

  2. DevelopmentBaxter commented on Aug 17, 2021

    @DevelopmentBaxter

    Yes, I got the same problem.

                <dependency>
                    <groupId>com.graphql-java</groupId>
                    <artifactId>graphql-java</artifactId>
                    <version>14.0</version>
                </dependency>
                <dependency>
                    <groupId>com.graphql-java-kickstart</groupId>
                    <artifactId>graphiql-spring-boot-starter</artifactId>
                    <version>8.0.0</version>
                </dependency>
                <dependency>
                    <groupId>com.graphql-java-kickstart</groupId>
                    <artifactId>graphql-spring-boot-starter</artifactId>
                    <version>8.0.0</version>
                </dependency>
                <dependency>
                    <groupId>com.graphql-java-kickstart</groupId>
                    <artifactId>graphql-java-tools</artifactId>
                    <version>6.1.0</version>
                </dependency>
                <dependency>
                    <groupId>com.graphql-java</groupId>
                    <artifactId>graphql-java-servlet</artifactId>
                    <version>6.1.3</version>
                </dependency>
    

    graphql.servlet.maxQueryDepth=10 #This causes the problem

  3. setchy commented on Aug 17, 2021

    @setchy
    Member

    Hi @bryevo @DevelopmentBaxter - same reason as shared in #672.

    GraphQL Tooling such as Playground, Voyager, Altair, GraphiQL etc all perform introspection queries in order to build their experience. Example introspection query below to show the type of depth this query has

    query IntrospectionQuery {
      __schema {
        queryType {
          name
        }
        mutationType {
          name
        }
        subscriptionType {
          name
        }
        types {
          ...FullType
        }
        directives {
          name
          description
          locations
          args {
            ...InputValue
          }
        }
      }
    }
    
    fragment FullType on __Type {
      kind
      name
      description
      fields(includeDeprecated: true) {
        name
        description
        args {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
    
      inputFields {
        ...InputValue
      }
    
      interfaces {
        ...TypeRef
      }
    
      enumValues(includeDeprecated: true) {
        name
        description
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }
    
    fragment InputValue on __InputValue {
      name
      description
      type {
        ...TypeRef
      }
      defaultValue
    }
    
    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                  }
                }
              }
            }
          }
        }
      }
    }
    
  4. oliemansm commented on Aug 19, 2021

    @oliemansm
    Member

    @setchy Think this issue should be converted into a Q&A Discussion instead with your comment as the accepted answer. This is not a bug or problem on our end imo, but simply expected behavior. Do you agree?

  5. setchy commented on Aug 19, 2021

    @setchy
    Member

    I agree @oliemansm 😃

  6. locked and limited conversation to collaborators on Aug 19, 2021
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