Skip to main content
Level 3
Feb 15, 2023 7:54 AM UTC

AEM 6.5 | Persistent query updated with Graphql Introspection query

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.

6 replies

BrianKasingli
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Feb 15, 2023 4:19 PM UTC

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

Translate
ChitraMadan
Community Advisor
Community Advisor
Feb 15, 2023 8:17 PM UTC

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

Translate
MukeshAEMAuthor
Level 3
Feb 16, 2023 2:19 PM UTC

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.

Translate
Level 2
Jul 11, 2023 10:37 AM UTC

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

Translate
MukeshAEMAuthor
Level 3
Jul 11, 2023 11:19 AM UTC

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

Translate
Level 2
Jul 11, 2023 2:48 PM UTC

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.

 

Translate