Follow-up from "fix: fix the wrong graphql query" -add graphql queries in separate files

The following discussion from !3859 (merged) should be addressed:

  • @eduardobonet started a discussion:

    Suggestion: what if we moved this query to it's own file on a graphql_queries folder? That way when we write the queries we could benefit of syntax checking at least. I also added a query as a string, but I think we are adding so many that it is worth the small effort and would avoid issues like this. Can be done as a follow up