Azure APIM validate-graphql-request policy throws nullpointer exception

Andre Haverdings 6 Reputation points

Any mention of <validate-graphql-request ... /> will cause API to return with the following exception:

    "source": "validate-graphql-request",  
    "reason": "GatewayFailure",  
    "message": "Object reference not set to an instance of an object.",  
    "scope": "api",  
    "section": "inbound",  
    "path": null,  
    "policyId": ""  

Stacktrace from insights (not much there):

   at validate-graphql-request  

Tried the following configuration:

    <validate-graphql-request error-variable-name="name" max-size="102400" max-depth="4">   
            <rule path="/__schema/*" action="reject" />   

or this:

<validate-graphql-request error-variable-name="name" max-size="102400" max-depth="4">  

or this:

<validate-graphql-request error-variable-name="name" />  

or even this:

<validate-graphql-request />  
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,875 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 22,996 Reputation points

    Hi @Andre Haverdings Thanks for reaching out. I tried inhouse but I am unable to reproduce the error. Could you please let me know if this issue started suddenly? Is it was working fine before?