{"repo":"rubensworks/graphql-to-sparql.js","free":true,"listed":false,"github":"https://github.com/rubensworks/graphql-to-sparql.js","clone":"git clone https://github.com/rubensworks/graphql-to-sparql.js.git","description":"Converts GraphQL queries to SPARQL queries","language":"TypeScript","stars":117,"topics":["graphql","sparql","rdf","querying","linkeddata","semantic-web","hacktoberfest"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"GraphQL to SPARQL A utility package that allows you to convert GraphQL queries to SPARQL or SPARQL algebra, using a JSON-LD context. Such queries are also known as GraphQL-LD queries. Supported JSON-LD context features: Key-value mapping between shorthands and URIs. @type : Sets the RDF datatype. @language : Sets the RDF language. @id : Identifies the IRI of a term. @reverse Reverses the direction of a property. Looking for GraphQL-LD? Install Usage The graphql-to-sparql converts GraphQL queries to SPARQL. The programmatic API can be invoked as follows: The resulting object is SPARQL algebra. Examples Below you can find a couple of examples of how this library converts GraphQL queries to SPARQL. These examples are based on the GraphQL documentation. Simple nesting GraphQL trees are converted to SPARQL graphs by chaining triple patterns. Context: GraphQL: SPARQL: Fields Nodes can be nested to any depth, and just produce more triple patterns. Context: GraphQL: SPARQL: Arguments GraphQL allows arguments to be passed to nodes, which are converted to triple objects in SPARQL. Context: GraphQL: SPARQL: Aliases In some cases, you may have clashing variable names in your GraphQL query. For these situations, aliases can be used to make your rename variables. Context: GraphQL: SPARQL: Fragments GraphQL fragments can be used to abstract certain parts of your query tree to reuse them in different places. GraphQL always applies fragments on certain types , which are translated to RDF http","default_branch":null,"files":null,"tree":[],"storefront":"/r/rubensworks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rubensworks/graphql-to-sparql.js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}