Skip to content

Poor minimization in graphql query generation #1182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jberryman opened this issue Feb 25, 2025 · 1 comment
Open

Poor minimization in graphql query generation #1182

jberryman opened this issue Feb 25, 2025 · 1 comment

Comments

@jberryman
Copy link

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
@arcuri82
Copy link
Collaborator

Hi @jberryman ,

minimization algorithm is currently is quite limited... should be improved. What you wrote makes lot of sense.

Unfortunately, our current industrial partners are mainly focusing on REST and RPC, so the GraphQL support in EvoMaster has been bit behind recently...

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

No branches or pull requests

2 participants