*WARN* PersistedQueryServlet Cannot recognize GraphQL query type: | Community
Skip to main content
March 7, 2025
Question

*WARN* PersistedQueryServlet Cannot recognize GraphQL query type:

  • March 7, 2025
  • 4 replies
  • 860 views

We are getting below WARN logs, Although it looks like the query executes successfully and returns data
GarphiQL window works fine too with returning the proper response.

On checking the jar code for PersistedQueryServlet.java, it seems this WARN message is displayed may be because of the Query Syntax, since the code looks for pattern "List{items{"  to check if a Query is of a List. [ Please refer below image], whereas  my GraphiQL query has the pattern:
"generalMessageList(filter: {code: {_expressions: [{value: $code}]}},_locale:$locale) {
__typename
items {
__typename....
"

i.e "List(filter" 

Can you please share what , if any, corrections should be made for the Query syntax ?

boolean isQueryList(String query) {
return StringUtils.deleteWhitespace(query).contains("List{items{");
}

 

 

*WARN* GET /graphql/execute.json/<endpoint_name>/Message;code=still_want_to_signup;locale=en; HTTP/1.1] com.adobe.aem.graphql.impl.servlet.PersistedQueryServlet Cannot recognize GraphQL query type: { "data": { "generalMessageList": { "__typename": "GeneralMessageModelResults", "items": [ { "__typename": "GeneralMessageModel", "_path": "/content/dam/abc/web/en/messages/general/still_want_to_signup", "code": "still_want_to_signup", "message": { "__typename": "MultiFormatString", "html": "<p>Do you still want to sign up?</p>\n", "markdown": "Do you still want to sign up ?\n\n ", "plaintext": "Do you still want to sign up?", "json": [ { "nodeType": "paragraph", "content": [ { "nodeType": "text", "value": "Do you still want to sign up?" } ] } ] }, "htmlDecorator": null } ] } } }

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

iamnjain
Community Advisor
Community Advisor
March 7, 2025

@scbm 

By looking at code snippet you attached as image, it looks like it will log the warn message every-time because it's outside if statement.

Can you please re-check the Java servlet code once?

 

SCBMAuthor
March 7, 2025

Hello @iamnjain 

 

The two "if" statements have a single "return" statements. So in case any one of the if condition is  true, it will return without executing the logger  "warn"  message.

martin_ecx_io
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 7, 2025

I would recommend logging this as a bug as your query syntax looks perfectly valid.

I can't reproduce the error with similar queries.  Are you on cloud service on the latest release?

SCBMAuthor
March 7, 2025

Hello @martin_ecx_io 

Yes, we are on cloud service. Can you please share which latest release version are you referring to? Will cross check it with what we have in our case

martin_ecx_io
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
March 7, 2025

The cloud service instance i tested on is running version 2025.1.19352.20250131T194709Z
you can check the version in Cloud Manager for each environment

 

On my sandbox env it shows the following as the latest version available currently:

Level 2
April 2, 2025

Did you end up raising an Adobe ticket for this? Any resolutions?

kautuk_sahni
Community Manager
Community Manager
July 14, 2025

@scbm Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni