Skip to content

GraphQLProvider.java GetEntityModelData method only takes Sites namespace, it does not take namespace from localization #125

@neeteshnarvaria

Description

@neeteshnarvaria

Hi,

I am not sure whether this is intentional, but when i tried to debug application with tridion docs implemetation and called GetEntityModel from graphqlcontent provider it is calling graphql provider with sites namespace, i looked into repository found namespace was defined as Sites

dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/graphql/GraphQLProvider.java

public EntityModelData getEntityModelData(EntityRequestDto entityRequest) throws ContentProviderException {
        JsonNode node = null;
        try {
            node = getPcaClient().getEntityModelData(**Sites**,
                    entityRequest.getPublicationId(),
                    entityRequest.getComponentId(),
                    entityRequest.getTemplateId(),
                    ContentType.valueOf(entityRequest.getContentType().toString()),
                    DataModelType.valueOf(entityRequest.getDataModelType().toString()),
                    DcpType.valueOf(entityRequest.getDcpType().toString()),
                    ContentIncludeMode.INCLUDE_DATA_AND_RENDER,
                    null);

            EntityModelData modelData = mapToType(EntityModelData.class, node);
            if (log.isTraceEnabled()) {
                log.trace("Loaded '{}' for entityId '{}'", modelData, entityRequest.getComponentId());
            }
            return modelData;
        } catch (IOException e) {
            if (log.isTraceEnabled()) {
                log.trace("Response for request " + entityRequest + " is " + node, e);
            }
            throw new ContentProviderException("Entity not found ny request " + entityRequest, e);
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions