I'm currently working on REST API. I like the idea of GraphQL or OData to allow developer to choose which columns/fields to return and relation record. But GraphQL require migration and oData have too long of query string. I'm thinking is it possible to use http-GET method to pass in json body to archive that. For example, use http-Get for customers to retrieve customer name 'Luke Skywalker'
{  
   "customers":{  
      "Id":null,
      "name":"Luke Skywalker",
      "height":null,
      "DateOfBirth":null,
      "Cars":{  
         "manufacturer":"BMW",
         "model":null,
         "Plate":null
      }
   }
}
And below to get same customer name but on invoice information
{  
   "customers":{  
      "Id":null,
      "name":"Luke Skywalker",
      "height":null,
      "DateOfBirth":null,
      "Invoices":{  
         "Year":2019,
         "Outstanding":Yes,
         "OutstandingAmount":null
      }
   }
}  
Any comment on this method?
 
     
     
    