Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-2936

Graphql query fails when sorting using query variable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.14.0
    • 0.13.0
    • Data Index
    • None
    • 2020 Week 31-33 (from Jul 27)

      Error: "Exception while fetching data (/Travels) : class graphql.language.VariableReference cannot be cast to class graphql.language.ObjectValue (graphql.language.VariableReference and graphql.language.ObjectValue are in unnamed module of loader 'app')"

       

      query ($pag: Pagination, $orderBy: TravelsOrderBy) {
        Travels(pagination: $pag, orderBy: $orderBy ) {
          id
        }
      }
      

      java.lang.ClassCastException: class graphql.language.VariableReference cannot be cast to class graphql.language.ObjectValue (graphql.language.VariableReference and graphql.language.ObjectValue are in unnamed module of loader 'app')
      at org.kie.kogito.index.graphql.query.GraphQLQueryOrderByParser.apply(GraphQLQueryOrderByParser.java:46)
      at org.kie.kogito.index.graphql.GraphQLSchemaManager.executeAdvancedQueryForCache(GraphQLSchemaManager.java:221)
      at org.kie.kogito.index.graphql.GraphQLSchemaManager.lambda$getDomainModelDataFetcher$18(GraphQLSchemaManager.java:301)

            cnicolai@redhat.com Cristiano Nicolai
            cnicolai@redhat.com Cristiano Nicolai
            Tristan Radisson Tristan Radisson
            Tristan Radisson Tristan Radisson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: