Let me assume you are trying something like a query operation.
If you think of it as a GET on a "collection of entities" with a filter criteria, there are several restrictions which come with GET.
However, if you think of it as "creating" a temporary/instant "query" on a collection of queries, now you have something more REST compatible, and powerful at the same time.
Let us take a collection like GET /products?minPrice=300&maxPrice=550.
We could look at it from the perspective of "creating an immediate/temporary product query"... a "product query instance" is created, returned and then deleted.
Request:
POST /product_queries/ Body: { params: { minPrice: 300, maxPrice: 550 } products: null }
Response:
Body: { id: <random number>, params: { minPrice: 300, maxPrice: 550 } products: [ { id: 111, name: "Google Pixel 4a", price: 400 }, { id: 222, name: "Samsung A53", price: 350 } ] }
This is the part I believe which makes Graph QL liberating. When you start looking at queries as "reports", (a) the inputs become parameters for creating one report instance and (b) even the results need not be formatted exactly in the entity's own structure.
Going further along this line... we could have a "Product statistics query" like this:
Request:
POST /queries/product_queries/sales_statistics Body: { params:{ fromMonth: 'Jun-2023', toMonth: 'Dec-2023' }, sales_statistics: null }
Response:
Body: { id: <random number>, params:{ fromMonth: 'Jun-2023', toMonth: 'Dec-2023' }, sales_statistics:[ { month: 'Jun-2023', topSellingProductByCount: {}, topGrossingProduct: {} } ] }
This kind of "report" or "query" can be used even for entity search - in a way circumventing REST, at the same time being compatible with REST.
GETandPOSTshould have different semantics, so maybe the general answer is "I hope not"functiondon't go well together. If an URL containsfunction,method, orcommand, I smell RPCPOSTmethod just to clean it up is a misuse ofPOSTif you're trying to follow RESTful principles