AEM 6.5 | Persistent query updated with Graphql Introspection query | Community
Skip to main content
Level 3
February 15, 2023

AEM 6.5 | Persistent query updated with Graphql Introspection query

  • February 15, 2023
  • 3 replies
  • 2653 views

Hi,

 

I noticed that my persistent queries are getting updated with Graphql introspection query. Not sure what the reason could be but this is happening even with untouched old persistent queries as well. Wondering if anyone noticed a similar behavior and share if there is any way to avoid this issue. Thanks in advance.

 

 

 

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

3 replies

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 15, 2023

It might be a possibility that you have clicked on the "save" button, or accidentally pressed CTRL + S

ChitraMadan
Community Advisor
Community Advisor
February 15, 2023

Hi @mukeshaem,

 

By default any unauthenticated user can analyze GrapQL schema using Introspection. Introspection allows us to get information about all the Requests, Mutations, Subscriptions, and Data Types and all other things that are made available to the clients making requests. This information is easily available by requesting ___schema meta-field, which, according to the specification, is always available to the query of the “root” type.

 

You need to disable this feature, please refer to this article - https://lab.wallarm.com/why-and-how-to-disable-introspection-query-for-graphql-apis/

 

Thanks,

Chitra

MukeshAEMAuthor
Level 3
February 16, 2023

Thanks, @briankasingli @chitramadan for your responses. I'm wondering what might be the reason for this issue where actual queries are getting replaced with Introspection queries. We are creating the persistent queries locally using the postman web version and deploying it using packages. I have noticed this issue in my local as well as in higher environments like Dev and Stage.

Level 2
July 11, 2023

also encountered the same problem, how do u solve it?

MukeshAEMAuthor
Level 3
July 11, 2023

We're unable to identify a fix for that so implemented a strict policy to create persistent queries only through code deployment.

Level 2
July 11, 2023

through code deployment means not using GraphQL API and writing the code to query content?

 

I use GraphQL and execute persist the query, but find sometimes my persisted query will auto-update to the introspection query.