# Add URL query for sharing GraphQL+- queries

**URL:** <https://discuss.dgraph.io/t/add-url-query-for-sharing-graphql-queries/8034>\
**Category:** Ratel\
**Tags:** status:accepted, kind:feature, ratel\
**Created:** [March 5, 2020, 4:26am UTC](https://discuss.dgraph.io/t/add-url-query-for-sharing-graphql-queries/8034 "2020-03-05T04:26:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [March 5, 2020, 4:26am UTC](https://discuss.dgraph.io/t/add-url-query-for-sharing-graphql-queries/8034/1 "2020-03-05T04:26:38Z")

</div>

**Moved from GitHub [ratel/171](https://github.com/dgraph-io/ratel/issues/171)**

_Posted by_ [MichelDiz](https://github.com/MichelDiz):

A simple and easy way to share queries is via URL querying. This is useful to ask for help sharing the URL and not run into problems with incompatible characters added by some sanitizing process (e.g. Discuss adds some characters sometimes that isn’t compatible with Ratel o Dgraph’s parser).

We could optionally use something like a base64 URL query instead of giant URLs like the examples below.

e.g:

> GraphiQL  
> [SWAPI GraphQL API](http://graphql.org/swapi-graphql?query=%7B%0A%20%20allFilms%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D)

> SPARQL [https://query.wikidata.org/#%23Cats SELECT%20%3Fitem%20%3FitemLabel%20 WHERE%20 { %20%20%3Fitem%20wdt%3AP31%20wd%3AQ146. %20%20SERVICE%20wikibase%3Alabel%20{%20bd%3AserviceParam%20wikibase%3Alanguage%20"[AUTO\_LANGUAGE]%2Cen".%20} }](https://query.wikidata.org/#%23Cats%0ASELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ146.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D)
