Ashwin Kumar Sri Vangipuram Thanks for posting your question in Microsoft Q&A. set-graphql-resolver
policy is retired and as described in the doc, you can add managed resolvers such as HTTP-based data source for GraphQL field in the schema. If you are looking to resolve getBlogByOwnerAndTitle
, then owner
and title
are available as Arguments
in context.GraphQL
like described in the doc.
Here is code snippet of the resolver policy:
<http-data-source>
<http-request>
<set-method>GET</set-method>
<set-url>https://data.contoso.com/api/ownertitle</set-url>
<set-header name="Content-Type" exists-action="override">
<value>application/json</value>
</set-header>
<set-body>@{
JObject jsonObject = new JObject();
jsonObject.Add("owner", context.GraphQL.Arguments["owner"]);
jsonObject.Add("title", context.GraphQL.Arguments["title"]);
return jsonObject.ToString();
}</set-body>
</http-request>
</http-data-source>
Note: this is just for reference, and I didn't have HTTP endpoint to fully validate. I hope this helps and if you face any issues, let me know.