Free Adobe AD0-E722 Exam Actual Questions

The questions for AD0-E722 were last updated On Nov 18, 2024

Question No. 1

An Adobe Commerce Architect is creating a new GraphQL API mutation to alter the process of adding configurable products to the cart. The mutation accepts configurable product ID. If the given product has only one variant, then the mutation should add this variant to the cart and return not nullable Cart type. If the configurable product has more variants, then the mutation should return not nullable Conf igurableProduct type.

The mutation declaration looks as follows:

How should the Adobe Commerce Architect declare output of this mutation?

A)

B)

C)

Show Answer Hide Answer
Correct Answer: B

According to the Adobe Commerce documentation, the output of a GraphQL mutation is declared by specifying the type of the data returned by the mutation. The type can be either a scalar type (such as String, Int, Boolean, etc.), an object type (such as Cart, Product, Customer, etc.), or a union type (such as SearchResult, which can be either Product or Category). A union type is used when the mutation can return more than one possible type of data, depending on the input or the logic of the mutation. In this case, the mutation can return either a Cart type or a ConfigurableProduct type, depending on the number of variants of the configurable product. Therefore, the output of the mutation should be declared as a union type that includes both Cart and ConfigurableProduct types. Option B is the only option that correctly declares a union type using the pipe symbol (|) to separate the possible types. Option A and Option C are incorrect because they use brackets ([ ]) and curly braces ({ }), which are used for declaring list types and input object types, respectively.


GraphQL API - Adobe Inc.

Schema language with GraphQL | Adobe Commerce

Question No. 2

An existing Adobe Commerce website is moving to a headless implementation.

The existing website features an "All Brands'' page, as well as individual pages for each brand. All brand-related pages are cached in Varnish using tags in the same manner as products and categories.

Two new GraphQL queries have been created to make this information available to the frontend for the new headless implementation:

During testing, the queries sometimes return out-of-date information. How should this problem be solved while maintaining performance?

Show Answer Hide Answer
Correct Answer: B

This solution ensures that the data returned by the GraphQL queries is up to date, while also maintaining performance. By specifying a $cache(cacheidentity: Path\To\identityclass) directive for each GraphQL query, the relevant brands and associated products will be added as cache tags.


Question No. 3

An Architect needs to review a custom product feed export module that a developer created for a merchant. During final testing before the solution is deployed, the product feed output is verified as correct. All unit and integration tests for code pass.

However, once the solution is deployed to production, the product price values in the feed are incorrect for several products. The products with incorrect data are all currently part of a content staging campaign where their prices have been reduced.

What did the developer do incorrectly that caused the feed output to be incorrect for products in the content staging campaign?

Show Answer Hide Answer
Correct Answer: C

Option C is correct because the developer did not check for an active content staging campaign and emulate the campaign state when retrieving product data. Content staging campaigns can modify the product data such as price, name, description, and so on, based on a schedule.To get the correct product data for a specific date and time, the developer needs to use the Magento\Staging\Model\VersionManager class to set the current version ID and emulate the campaign state1. Otherwise, the product data will be retrieved from the default store view without applying the campaign changes.

Option A is incorrect because retrieving product data directly from the database using the entity_id column is not necessarily wrong. It may not be the best practice, but it does not cause the feed output to be incorrect for products in the content staging campaign.The content staging campaigns are stored in separate tables with a version ID that links to the main product table2. The developer can still join these tables and query the product data based on the version ID and date.

Option B is incorrect because there is no such method as getContentStagingValue in Magento 2. The developer cannot use this method to retrieve the active campaign value of the product data. The correct way to get the product data for a specific campaign is to use the Magento\Staging\Model\VersionManager class as mentioned above.


1: Content Staging | Adobe Commerce Developer Guide

2: Content Staging | Adobe Commerce Developer Guide

Question No. 4

Since the last production deployment, customers can not complete checkout.

The error logs show the following message multiple times:

main.CRITICAL: Report ID: webapi-61b9fe83f0c3e; Message: Infinite loop detected, review the trace for the looping path

The Architect finds a deployed feature that should limit delivery for some specific postcodes.

The Architect sees the following code deployed in etc/webapi_rest/di. xml and etc/frontend/di. Xml

LimitRates.php:

Which step should the Architect perform to solve the issue?

Show Answer Hide Answer
Correct Answer: C

Question No. 5

An Adobe Commerce Architect creates a stopword for the Italian locale named stopwordsjtJT.csv and changes the stopword directory to the following: /app/code/Custovendor/Elasticsearch/etc/stopwords/

What is the correct approach to change the stopwords directory inside the custom module?

Show Answer Hide Answer
Correct Answer: A

According to the Adobe Commerce documentation, the correct approach to change the stopwords directory inside a custom module is to use dependency injection to override the default values of the stopwordsDirectory and stopwordsModule parameters of the \Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords class. The stopwordsDirectory parameter specifies the relative path of the stopwords directory from the module directory, while the stopwordsModule parameter specifies the name of the module that contains the stopwords directory. By adding these parameters to the di.xml file of the custom module, the Architect can change the location of the stopwords files without modifying the core code or database.


To change the directory from your module

Configure Elasticsearch stopwords