Graphql req's using persistedQuery not getting through

So my backend servers support apq(automatic persisted queries), seems that the gateway doesn’t proxy the requests containing only variables and extensions. I’ve tested this out as a regular graphql api and udg. I get the following error:

    "errors": [
        {
            "message": "document doesn't contain any executable operation"
        }
    ]

Request body:

{
   "variables":{
     ....
   },
   "extensions":{
      "persistedQuery":{
         "sha256Hash"...
      }
   }
}

Is there any way to get this to work in tyk?

@csucu Seems you are right. The only untested workaround I can think of is to use the metadata attribute in a key with a custom plugin. But I have asked internally for a workaround and will update this thread when I get a reply.

By the way, welcome to the community

Hi,

so I haven’t tested this in Tyk yet, but I am thinking about one more possible workaround. Try sending a sample query and the persisted one in extensions. Something like that:

{
   "query":{
     sample query
   },
   "extensions":{
      "persistedQuery":{
         "sha256Hash"...
      }
   }
}

I’m a bit worried that gateway will strip it anyway, but it is worth to try. If this doesn’t work then it would need a feature request.

Hi,
Thanks for the quick response. Unfortunately the extensions field gets stripped away. Whats the process for putting in a feature request? is it just through the github repo?

Yes, that correct Issues · TykTechnologies/tyk · GitHub. Kindly select Feature request in the issue type selection menu