Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-128484

Error executing GraphQL query displayPageTemplates

    Details

      Description

      Executing the query displayPageTemplates returns an error instead of a valid response.

      query {
        admin {
         displayPageTemplates(siteKey: "20124") {
            items {
              title
            }
          } 
        }
      }
      

      The problem seems to be that the GraphQLServletExtender assumes that every ResourceImpl implements the EntityModelResource interface and DisplayPateTemplateResourceImpl doesn't, so the following code in the GraphQLServletExtender class breaks:

      private EntityModel _getEntityModel(
            Object resource, Map<String, String[]> parameterMap)
         throws Exception {
      
         EntityModelResource entityModelResource = (EntityModelResource)resource;
      
         return entityModelResource.getEntityModel(
            ContextProviderUtil.getMultivaluedHashMap(parameterMap));
      }
      

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            javier.dearcos Javier de Arcos Velilla
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Engineering Assignee:
            Javier Gamarra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              28 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP23
                7.1.10.6 SP6
                7.1.X
                7.2.10 DXP FP12
                7.2.X
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.0 CE GA1 DXP 7,4
                Master