You can translate the question and the replies:

How to connect graphQL API with denodo

We are trying to connect the web service graphQL with denodo, we have the curl , the purpose of this connection is want to create a base view that can return some json data set. We should create a "Web service" or "Json" data source or other? And how to configure it? PS, our curl is like this : curl 'http://XXXX/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://XXXX' --data-binary '{"query":"???"}' --compressed
01-09-2019 07:55:18 -0400

1 Answer

Hi, Virtual DataPort allows accessing JSON sources by invoking http calls as well. For your scenario, I would create a JSON data source in Virtual DataPort Administration Tool with “HTTP Client” as “Data Route” configured to invoke a POST method. The Post body would have the Cypher query enclosed inside the **statements** tag. For example, to get a list of all nodes in a graph: * JSON Post body would be something like the below. > \\{ > "statements" : > [ > \\{ > "statement" : "MATCH (n) RETURN n" > \\} > ] > \\} “\” should be prefixed whenever we use special characters like “{“,”}” and “@”. * The HTTP URL would be http://<host>:<port>/db/data/transaction/commit * The necessary headers can be included in the HTTP header section of the post method. [JSON sources]( user manual in the Virtual DataPort Administration Guide explains in detail on steps to set up a JSON source with HTTP Data Route . [HTTP Path]( user manual in the Virtual DataPort Administration Guide explains in general, the configuration steps for connecting a data source with HTTP Data Route. Once the data source is configured, I will then create a base view from the JSON response by streaming the tuple root at the intended level. Hope this helps!
Denodo Team
04-09-2019 06:10:36 -0400
You must sign in to add an answer. If you do not have an account, you can register here