Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Problems with GraphQL

Avatar

Level 3

Hello, I wanted to ask something, I am having problems with the queries because the following error has just appeared in 80% of our queries:

 

"Variable 'limit' has an invalid value: Expected a value that can be converted to type 'Int' but it was a 'String'"

 

What is strange? I have 2 environments, DEV and Stage, both have different versions and in Stage they all work, which is where I was normally working but in DEV, when I created the environment, that error started to appear.

 

It doesn't make sense because the data type in GraphQL is correct.

 

Query example:

 

        query exampleQuery($perfil_dirigido: String, $limit: Int, $offset: Int) {
            faqsList(
                filter: {
                perfil_dirigido:
                {
                    _expressions:
                        [{
                            value: $perfil_dirigido,
                            _operator: EQUALS
                        }]
                }
            },
                limit: $limit, offset: $offset, sort: "orden_aparicion ASC") {
            items {
                    referencia
                    titulo
            descripcion {
                        html
                    }
                    perfil_dirigido
                    orden_aparicion
                }
            }
        }

 

Code example:

 

 

const options = { method: 'GET' };
fetch('/graphql/execute.json/endpoint/exampleQuery;perfil_dirigido=' + stringValue + ';limit=' + limitIntValue + ';offset=' + offsetIntValue + ';', options)
.then(response => response.json())
.then(response => {
  response.data.faqsList.items.forEach(pregunta => {
     // CODE
  });
});

 

 

Please, could someone tell me if this is an Adobe error due to the version?

Or have they changed the way they do queries and are they done differently?

Thank you so much.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Integer parameters in Persisted Queries is working correctly in AEM 6.5 and AEM as a Cloud Service up to version 2023.7.0. However, issue started from version 2023.8.0 and persists in the latest release.

You can check Release Notes here in Known issues section [SITES-15622: GraphQL - Issue with persisted queries with number & boolean parameters.https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/maint... 

You can check an existing community discussion thread as well
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-do-i-implement-a-persi... 

View solution in original post

11 Replies

Avatar

Level 2

Hello @Alex_Terinte 

 

Is this AEM cloud on AEM 6.5 instance?

 

There was an issue in one of Cloud releases for GraphQL. Hence, the query

Avatar

Level 3

It is a cloud instance.

 

In Stage (In which everything works) we are using version 2023.9.13336.20230901T115250Z

And in DEV (I just created it with the same configuration as Stage) we use this version 2023.9.13420.20230907T185228Z

Ah, locally, which I use the same version as DEV, it doesn't work either

 

I reiterate, Queries work perfectly in Stage, but in DEV and local, in all queries that have parameters with Int, they do not work.

Avatar

Community Advisor

Hello @Alex_Terinte 

 

You can raise a support ticket and request for a rollback.

They should be able to accommodate the request. They are aware of this one

 


Aanchal Sikka

Avatar

Correct answer by
Community Advisor

Integer parameters in Persisted Queries is working correctly in AEM 6.5 and AEM as a Cloud Service up to version 2023.7.0. However, issue started from version 2023.8.0 and persists in the latest release.

You can check Release Notes here in Known issues section [SITES-15622: GraphQL - Issue with persisted queries with number & boolean parameters.https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/maint... 

You can check an existing community discussion thread as well
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-do-i-implement-a-persi... 

Avatar

Level 3

Hello @Mahedi_Sabuj 

Thank you very much for the information, it seemed strange to me that it worked in one environment and magically not in another.

I'm going to have to write a ticket to rollback the versions.

Again thank you very much!

Avatar

Community Advisor

Latest Update: Adobe released a new maintenance release (13420) to fix the Int Parameter issue which was publicly released on September 12, 2023. This maintenance release replaces 13323.

Screenshot 2023-09-14 at 1.15.46 PM.png

Avatar

Level 3

In DEV and local we have this version:

2023.9.13420.20230907T185228Z-230800

Exactly the one you mention and the error continues to persist

Avatar

Community Advisor

Then maybe in the last release (13420), issue is back again unfortunately; even though Adobe had confirmed in the Release Notes that there are no known issues.

Avatar

Level 3

Yes, in that version the error still persists, we will have to wait for them to release a fix in the next version

Alex_Terinte_0-1694676679024.pngAlex_Terinte_1-1694676754170.png

 

Avatar

Administrator

@Alex_Terinte We hope you found the AEM community valuable. We anticipate your return as either a learner or a contributor. The community benefits from SMEs like you. Please ask your AEM peers to join and contribute. Happy AEM learning!

 



Kautuk Sahni