Skip to content

Conversation

@g-pezanoskicohen
Copy link

What does this PR do?

What issues does this PR fix or reference?

#

The PR fulfills these requirements:

[ ] Tests for the proposed changes have been added/updated.
[ ] Code linting and formatting was performed.

Functionality Before

<insert gif and/or summary>

Functionality After

<insert gif and/or summary>

@g-pezanoskicohen g-pezanoskicohen requested a review from a team as a code owner October 31, 2025 17:57
@salesforce-cla
Copy link

Thanks for the contribution! It looks like @g-pezanoskicohen is an internal user so signing the CLA is not required. However, we need to confirm this.

</template>
</div>
<c-view-source source="lwc/datatableInlineEditWithUiApi" slot="footer">
Mutate data in a table with inline editing using graphQl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Mutate data in a table with inline editing using graphQl
Mutate data in a table with inline editing using GraphQL Mutations

<c-error-panel errors={errors}></c-error-panel>
</template>
</div>
<c-view-source source="lwc/datatableInlineEditWithUiApi" slot="footer">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be pointing at graphqlMutations?

Comment on lines 112 to 113
const queryRaw = this.buildQuery(params);
const query = gql`${queryRaw}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may as well just push the gql usage into buildQuery - Not much value to waiting to parse until we're back here

const { errors, data, refresh } = result;
// We hold a reference to the refresh function on the graphQL query result so we can call it later.
if (refresh) {
this.refreshGraphQL = refresh;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be able to omit the refreshGraphQL call - Double check if the extensions are properly returning the weakEtag and id of each Record, as we expect

Comment on lines 164 to 171
let queryBlock = ` query${index}: ContactUpdate(input: {
Contact: {
FirstName: $FirstName${index}
LastName: $LastName${index}
Phone: $Phone${index}
Title: $Title${index}
Email: $Email${index}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend building this input block as JSON in a variable value instead, I think you could clean up many of the aliases that way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants