Forum Discussion
h4tt3n
5 years agoHelper V
GraphQL query in Power BI?
Hello, I am trying to connect to a GraphQL api through Power BI and could use some advice. In the Postman API tool I have written a working query, like this: The query is above, and par...
ibarrau
5 years agoSuper User
Hi. You can try this. Assuming the response is a json. Imagine this is your URL: "https://swapi.dev/api/people/?search=Skywalker" and the body is a simple json with two params.
Then the code might be like this:
let
Json_body = Json.FromValue("{ ""first_param"": ""AAAAA"", ""second_param"": ""BBBBBB""}",),
Source = Json.Document(Web.Contents("https://swapi.dev/api/", [
RelativePath="people/",
Query=[search="Skywalker"],
Headers=[#"Content-Type"="application/json"],
Content=Json_body
]))
in
Source
Hope it helps.