BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E716 Exam - Topic 1 Question 22 Discussion

Posted by Truman on May 20, 2024 at 03:22 AM

An Adobe Commerce developer is creating a new module to extend the functionality of the cart. The module is installed in app/code/CompanyName/ModuleName/.

How would an Adobe Commerce developer extend the existing CartltemPrices GraphQL schema to include a custom base_price field?

Suggested Answer: B

The developer can deal with this issue by modifying the admin path timeout value in seconds in the Fastly Configuration section > Advanced Configuration in the Admin Panel. Fastly is a cloud-based caching service that improves site performance and security for Adobe Commerce Cloud projects. Fastly has a default timeout value of 180 seconds for admin requests, which means that any request that takes longer than 180 seconds will be terminated and result in a timeout error. The developer can increase this value to allow longer processing time for admin requests without causing errors. The developer also needs to save the configuration and upload VCL to Fastly to apply the changes. Verified Reference: [Magento 2.4 DevDocs]


Get Premium AD0-E716 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
34 comments · newest first
CH
Cherelle 12 months ago
B is definitely the correct choice here!
AL
Allene 1 year ago
Definitely not C, that doesn't seem right.
AN
Annelle 1 year ago
Surprised there's no mention of caching issues with these changes!
SH
Shonda 1 year ago
I think A makes more sense for extending functionality.
SU
Susana 1 year ago
Option B is the way to go!
ST
Stephaine 1 year ago
I have a vague memory of using di.xml for dependency injection, but I'm not confident it applies here for adding a base_price field.
TE
Teri 1 year ago
I practiced a similar question about adding fields to GraphQL, and I feel like the schema.graphql file is definitely where we define new fields.
CA
Candra 1 year ago
I think option A sounds familiar, but I can't recall if the resolve() function is the right place to add new fields.
MA
Margurite 1 year ago
I remember we discussed extending GraphQL schemas in class, but I'm not entirely sure if it's the schema.graphql or di.xml file that needs the changes.
RO
Rosenda 1 year ago
This seems straightforward enough. I think the schema.graphql approach is the way to go here. I'll need to carefully craft the field definition and make sure it integrates properly with the existing CartItemPrices schema.
LI
Lilli 1 year ago
I'm a bit confused on the difference between the schema.graphql and di.xml approaches. I'll need to research the pros and cons of each to determine the most appropriate solution for this scenario.
JU
Judy 1 year ago
Okay, let's think this through step-by-step. I believe the key is to either create a new resolver or update the existing one to include the custom base_price field. I'll need to check the module structure and GraphQL schema to determine the best way to approach this.
HA
Hana 1 year ago
Hmm, I'm not too familiar with extending the CartItemPrices schema in Adobe Commerce. I'll need to review the documentation carefully to make sure I understand the right approach.
LA
Lavonda 1 year ago
This looks like a pretty straightforward GraphQL extension question. I think I can handle this one.
MA
Maira 1 year ago
Oof, this is a lot to keep track of. Rollup summary fields, validation rules, duplicate rules - I'll need to map out how all of those pieces fit together and how they might impact the trigger. Gonna have to really focus on this one.
GE
Geraldine 1 year ago
Hmm, I'm a bit confused on this one. I know there are multiple phases in the PKI life-cycle, but I can't quite recall the specific order. I'll have to think this through carefully.
TI
Tish 1 year ago
Product options seem irrelevant here. I definitely remember discussing how lead times affect customer satisfaction in class.
BR
Broderick 2 years ago
Option A is the way to go. Extending the resolver is the standard way to add custom fields to a GraphQL schema. I'm glad I've been studying my GraphQL best practices for this exam.
VI
Vivan 1 year ago
↳ replying to Broderick
Good job on studying your GraphQL best practices, it's paying off!
JO
Jovita 1 year ago
↳ replying to Broderick
Option A is the way to go. Extending the resolver is the standard way to add custom fields to a GraphQL schema. I'm glad I've been studying my GraphQL best practices for this exam.
ZA
Zack 1 year ago
↳ replying to Broderick
A) Create and Configure a preference for Magento\\QuoteGraphQl\\Model\\Resolver\\CartItemPrices that adds the base_price field in the resolve() function.
SH
Sheldon 1 year ago
↳ replying to Broderick
Definitely, it's important to follow the standard way of extending the resolver for custom fields.
SU
Susana 2 years ago
↳ replying to Broderick
I agree, extending the resolver is the best practice for adding custom fields to a GraphQL schema.
NO
Noble 2 years ago
Haha, I bet the developers at Adobe are laughing at us for even considering Option B and C. Those look like they were generated by a random JSON generator or something!
TO
Tommy 2 years ago
I'm not sure about the correct answer, but Option B and C both look like they involve modifying configuration files, which doesn't seem like the right approach for extending a GraphQL schema.
AB
Abel 1 year ago
↳ replying to Tommy
C) Add the following to the module's etc/graphql/di.xml file.
MA
Magnolia 2 years ago
↳ replying to Tommy
B) Add the following to the module's etc/schema.graphqls file.
NO
Noe 2 years ago
↳ replying to Tommy
A) Create and Configure a preference for Magento\\QuoteGraphQl\\Model\\Resolver\\CartItemPrices that adds the base_price field in the resolve() function.
SH
Shawn 2 years ago
Option A is the correct way to extend the existing CartItemPrices GraphQL schema. Creating a preference and adding the base_price field in the resolve() function is the proper way to extend the existing schema.
DO
Dortha 2 years ago
↳ replying to Shawn
User 2: Yes, that's right. It's important to extend the schema properly.
EV
Eva 2 years ago
↳ replying to Shawn
User 1: I think the correct way is to create a preference for CartItemPrices and add the base_price field in the resolve() function.
CO
Corinne 2 years ago
Hmm, I see your point. But I still think A) makes more sense because it directly modifies the resolve() function.
LA
Latia 2 years ago
I disagree, I believe the correct answer is B) Add the following to the module's etc/schema.graphql file.
CO
Corinne 2 years ago
I think the answer is A) Create and Configure a preference for Magento\\QuoteGraphQl\\Model\\Resolver\\CartItemPrices.
0/2000 characters

Save Cancel