guergana.tzatchkova added a comment.
Jakob's Query Builder <https://wd-query-builder.toolforge.org/> shares the visual representation of the query in an encoded json. Example of query for female mayors <https://wd-query-builder.toolforge.org/?query=%7B%22statements%22:%7B%22item%22:%7B%22item_s_0%22:%7B%22property%22:%7B%22id%22:%22P31/wdt:P279*%22,%22label%22:%22instance%20of%22%7D,%22value%22:%7B%22id%22:%22Q515%22,%22label%22:%22city%22%7D%7D,%22item_s_1%22:%7B%22property%22:%7B%22id%22:%22P6%22,%22label%22:%22head%20of%20government%22%7D,%22value%22:%7B%22object%22:%22item_s_1%22,%22id%22:%22X1%22,%22label%22:%22any%20item%20matching...%22%7D%7D%7D,%22item_s_1%22:%7B%22item_s_1_s_0%22:%7B%22property%22:%7B%22id%22:%22P21%22,%22label%22:%22sex%20or%20gender%22%7D,%22value%22:%7B%22id%22:%22Q6581072%22,%22label%22:%22female%22%7D%7D%7D%7D,%22qualifiers%22:%7B%7D,%22select%22:%7B%22item%22:%7B%22id%22:true,%22label%22:true,%22properties%22:%5B%7B%22id%22:%22P1082%22,%22label%22:%22population%22%7D%5D%7D%7D,%22limit%22:%22%22%7D>. The URL has a query parameter assigned to a json object, the object looks like this: { "statements": { "item": { "item_s_0": { "property": { "id":"P31/wdt:P279*", "label":"instance of"}, "value":{"id":"Q515", "label":"city"} }, "item_s_1":{ "property":{ "id":"P6","label":"head of government"}, "value":{ "object":"item_s_1", "id":"X1", "label": "any item matching..."} } }, "item_s_1":{ "item_s_1_s_0":{ "property":{ "id":"P21", "label":"sex or gender" }, "value":{ "id":"Q6581072", "label":"female" } } } }, "qualifiers":{}, "select":{ "item":{ "id":true, "label":true, "properties": [ { "id":"P1082", "label":"population" } ]}}, "limit":""} The relevant parts of the code where the url is being generated and parsed are here: initializeFromUrl <https://github.com/jakobw/wd-query-builder/blob/master/src/App.vue#L41> method and generateShareUrl <https://github.com/jakobw/wd-query-builder/blob/master/src/components/ShareQuery.vue#L37>. TASK DETAIL https://phabricator.wikimedia.org/T266960 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: guergana.tzatchkova Cc: Addshore, Aklapper, Lydia_Pintscher, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs