Skip to content

Poor minimization in graphql query generation #1182

Description

@jberryman

EvoMaster version: 3.4.0
Running with /opt/evomaster/bin/evomaster --blackBox true --maxTime 600s --ratePerMinute 60 --problemType GRAPHQL --bbTargetUrl http://localhost:3000/graphql

Caveat: I haven't played with minimizeTimeout yet, but I suspect the algorithm could be improved. Evomaster produced this potential buggy query:

{ AlbumByID  (AlbumId : "uWmoJTQ6wSTLlo")  {AlbumId,Tracks(order_by : [],where : null){Composer,Genre{Name},GenreId,Milliseconds,Name,UnitPrice}}       } 

But this gives the same output:

{ AlbumByID  (AlbumId : "uWmoJTQ6wSTLlo")  {Tracks(where : null){Composer}}}

I suspect a good shrinking heuristic might be to start by

  • just removing all but one leaf field from every selection set (at least when it takes no inputs)
  • collapse all insignificant whitespace into a single space

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions