Posts

ERROR failed to read supergraph schema reason=stream did not contain valid UTF-8

Bump into the error while trying to run apollo router.   Anonymous usage data is gathered to inform Apollo product development. See https://go.apollo.dev/o/privacy for details. 2026-07-16T09:46:43.188554Z ERROR failed to read supergraph schema reason=stream did not contain valid UTF-8 2026-07-16T09:46:43.234786Z INFO state machine transitioned event="NoMoreSchema" state=Errored previous_state="Startup" 2026-07-16T09:46:43.235259Z INFO stopped 2026-07-16T09:46:43.235740Z ERROR no valid schema was supplied no valid schema was supplied To resolve this error   rover supergraph compose --config ./supergraph.yaml | Out-File -Encoding utf8 supergraph.graphql and then re--run router  c:\tools\router --config router.yaml --supergraph supergraph.graphql  

grapql rover and router workflow

  To compose your supergraph, first we need to create individual schema for example product, review and user graphql schema. And we also need a supergraph.yaml first subgraphs :   product :     routing_url : http://localhost:4001/graphql     schema :       file : ./product.graphql   # ← points AT the schema you already wrote   user :     routing_url : http://localhost:4002/graphql     schema :       file : ./user.graphql   review :     routing_url : http://localhost:4003/graphql     schema :       file : ./review.graphql Let's create our supergraph rover supergraph compose --config ./supergraph.yaml > supergraph.graphql If you're using powershell rover supergraph compose --config ./supergraph.yaml | Out-File -Encoding utf8 supergraph.graphql We will now have a combined supergraph schema that includes product, review and user graphql. To perform ch...

azure function mcp server and client codes

Image
 The following code allows us to setup a server and then expose a tool called hello_mcp. Ensure you start azurite and then run "func host start" to run the server import azure . functions as func import logging app = func . FunctionApp ( http_auth_level = func . AuthLevel . ANONYMOUS ) @ app . mcp_tool_trigger (     arg_name = " context " ,     type = " mcpToolTrigger " ,     tool_name = " hello_mcp " ,     description = " Hello world. " ,     toolProperties = " [] " , ) def mcp_trigger ( context ) -> None :     return " Hello I am MCPTool! " And during runtime, we will see the following endpoint  Then we can also call it using the following client side code where we are caling it using streamable http. """ Simple MCP client that connects to a local Azure Functions MCP endpoint (the mcpToolTrigger extension approach) and calls the `hello_mcp` tool. Install dependency first:     pip install ...

azure function self hosted python code scaffolding

We can create self hosted python mcp server code using the following command line:- azd init --template mcp-sdk-functions-hosting-python -e mcpsdkserver-python This will create a bunch of code that allow you to run your mcp server using FastMCP package.  You can see more of the code here  https://github.com/kepungnzai/az-function-mcp-self-hosted

creating logic app driven by http trigger and send email

Image
We can easily create a logic app that run "When http request is triggered" and then send out email.  The logic app looks something like this :-  We will use the following json to define out schema  {"receipient": "test@example.com","title": "Hello","message": "This is a test"} And this us what our request body JSON schema would look like Then we will create "Send an email (v2)". In our send email parameter setup, it looks something like this. When our http triggers completes, it returns a json but it is also a STRING. And we need to be able to convert it into a json otherwise you will get the following errors :- Unable to process template language expressions in action 'Send_an_email_(V2)' inputs at line '0' and column '0': 'The template language expression 'triggerBody()?['receipient']' cannot be evaluated because property 'receipient' cannot be selected....

dynatrace storing user credentials in credentials vault

We can store credentials like username, password or even your app registration in dynatrace. These are typically used in workflows. Goto Settings -> Preference-> Credential Vault.  Then we can scope - scope configuration allow us to decide if this can is accessbile via workflow or sythetics. How do you access its values? We can access its value using javascripts in Dynatrace workflow. Here is a code snippet that can be use the do this. import { credentialVaultClient , CredentialsDetailsTokenResponseElement } from ' @dynatrace-sdk/client-classic-environment-v2 '; const c redentials = await credentialVaultClient . getCredentialsDetails ( {   id : ' CREDENTIALS_VAULT-xxxxxxxxxxxxxxxx ' , } ) ;   // depeding on what type of credential you have setup   console . log (c redentials . token ) ; // If it is username console . log (c redentials . username ) ; // and password console . log (c redentials . password ) ;

vscode python suddenly does not support goto method definitions with crtrl + click

Image
All in a suddden, my vscode stop responding to Ctrl + click that allows me to go to method defintions. This is due to interpreter are not configured or stop working. In my case, I am using uv manage and therefore I had to ensure the configuration is correct - the green section configure environment while the red rectangle configure "interpreter" - which is what is missing. Once you fix it, we are good to go. 

aws bedrock using qwen.qwen3-coder-next is easy

Image
To work with AWS bedrock, we can consume the qwen.qwen3-coder-next mdoel using API key. Let's dive right in.  Using uv package manager, run  uv init  uv venv uv add openai And you need the following code when using "qwen.qwen3-coder-next" instead of the antrophic library. from openai import OpenAI client = OpenAI () response = client . chat . completions . create (     model = " qwen.qwen3-coder-next " ,     messages =[{ " role " : " user " , " content " : " What is Amazon Bedrock? " }], ) print ( response . choices [ 0 ]. message . content ) You would need to setup your environment variables.  set OPENAI_API_KEY="YOUR-API-KEY" set OPENAI_BASE_URL=https://bedrock-mantle.ap-southeast-2.api.aws/v1 set OPENAI_PROJECT_ID=default And then just run  python main.py   

mcp server configuration for vscode

We can quickly configure vscode to use github mcp by creating a fille under .vscode/mcp.json. This file should contain the followings:- {   " inputs " : [     {       " type " : " promptString " ,       " id " : " github_token " ,       " description " : " GitHub Personal Access Token " ,       " password " : true     }   ],   " servers " : {     " github " : {       " command " : " docker " ,       " args " : [         " run " , " -i " , " --rm " ,         " -e " , " GITHUB_PERSONAL_ACCESS_TOKEN " ,         " ghcr.io/github/github-mcp-server "       ],       " env " : {         " GITHUB_PERSONAL_ACCESS_TOKEN " : " ${input:github_token} "       }     }   } } And then you are good to prompt away

Azure AI Foundry setting up RAG with Azure Search AI

Image
To enable RAG in our agent, we need Azure foundry embedding model and a gpt-4-o model to test it out. This will empower our agent with inhouse knowledge.  Lets deploy our Azure Foundry instance first. Pretty straight forward. Ensure we have deployed 2 model - embedding-3-small as shown below We also need a storage account where we place our document to be indexed by Azure AI Search later.  Next, we will create an Azure AI Search service. This will allow us to index document in our storage account. We can also configure a schedule if we wanted to:-  Then we can import our document to build up our knowledge base.  Here, we will configure our vector searches and now you know why we are creating the embedding model. Next we will setup our agent and then add knowlege to it. So we create an agent.  Under the section, knowledge (on the left tab), that's where we provide a knowledge and index to it. Once we have configure it, we can prompt our agent accordingly.

Azure foundry client code for using response API

OpenAI Respose API is supported by the framework and we can easily use the following code to call it.  from azure . ai . projects import AIProjectClient from azure . identity import DefaultAzureCredential project_client = AIProjectClient (     endpoint = " https://<your-resource>.services.ai.azure.com/api/projects/<your-project> " ,     credential = DefaultAzureCredential () ) # Get an OpenAI-compatible client scoped to this project openai_client = project_client . get_openai_client () # First turn response = openai_client . responses . create (     model = " gpt-4o " ,   # your deployment name     input = " What's the speed of light? " ) print ( response . output_text ) # Next turn — chain via previous_response_id, just send the new input response2 = openai_client . responses . create (     model = " gpt-4o " ,     input = " And what about sound? " ,     previous_response_id = respo...