[ 
https://issues.apache.org/jira/browse/SLING-9879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226733#comment-17226733
 ] 

Bertrand Delacretaz commented on SLING-9879:
--------------------------------------------

Repeating my SLING-9800 comment here:
{quote}...the resource of the request is the Servlet ...
{quote}
Not sure what this means but what happens under the hood in the 
DefaultSchemaProvider is an internal request to the path of that Resource with 
a `.GQLschema` extension.

So that Resource should be setup with the appropriate `sling:resourceType` so 
that the correct script or servlet is called to generate the schema.

If that information doesn't help, it would be useful if you can provide a 
Sling-based example that reproduces your issue.

> GraphQL schema creation fails for custom query servlet
> ------------------------------------------------------
>
>                 Key: SLING-9879
>                 URL: https://issues.apache.org/jira/browse/SLING-9879
>             Project: Sling
>          Issue Type: Bug
>          Components: GraphQL
>    Affects Versions: GraphQL Core 0.0.6
>            Reporter: Bertrand Delacretaz
>            Priority: Major
>             Fix For: GraphQL Core 0.0.8
>
>
> As reported by [~andysch] in SLING-9800 - I'm extracting that specific issue 
> from that ticket as I'd like to release that module.
> Andy says:
> bq. I am working on the AEM GraphQL Persisted Queries and a client is calling 
> the PQ servlet instead of an GraphiQL endpoint. So the resource of the 
> request is the Servlet and using that resource is not working out 
> (DefaultSchemaProvider.getSchema() returns an empty string). When using a 
> Mock Resource with these values:
> bq. 
> bq. new MockResource(
> bq.   "/apps/graphql-enablement/content/endpoint", /* path */
> bq.   "graphql-enablement/components/endpoint", /* resourceType */
> bq.   null, /* resourceSuperType */
> bq.   null, /* metadata */
> bq.   resourceResolver,
> bq.   new ValueMapDecorator(new HashMap<String, Object>() {{
> bq.     put("", "");
> bq.   }}), /* properties */
> bq.   null /* parent */
> bq. );



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to