aws-amplify / aws-amplify/amplify-studio

Cannot update conflict resolution settings

Open
#1,040 15 comments 0 reactions 0 assignees View on GitHub
bug data studio-ui
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### How did you install the Amplify CLI?

npm

### If applicable, what version of Node.js are you using?

18.16.0

### Amplify CLI Version

12.5.0

### What operating system are you using?

Windows

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

### Describe the bug

I'm facing the issue, that Amplify Studio does not show my data model. Instead it displays an error message, that "New APIs created within Studio will now be configured with Conflict Resolution disabled by default. In order to use DataStore, this setting can be changed in the GraphQL API Settings page by selecting a conflict resolution option." When I activate Conflict Resolution, I can't hit save and deploy in Studio because that button is not displayed. As a solution I want to update this setting using the CLI.

To do so, I use `amplify update api`:
```
PS F:\git\kreinn\trackinn> amplify update api
? Select from one of the below mentioned services: GraphQL

General information
- Name: trackinn
- API endpoint: https://xxx.appsync-api.eu-central-1.amazonaws.com/graphql

Authorization modes
- Default: Amazon Cognito User Pool
- IAM

Conflict detection (required for DataStore)
- Conflict resolution strategy: Auto Merge

? Select a setting to edit Conflict resolution strategy
? Select the default resolution strategy Auto Merge
? Do you want to override default per model settings? No
⚠️ WARNING: owners may reassign ownership for the following model(s) and role(s): Payment: [owner], Invite: [owner], Booking: [owner], Staffing: [owner], Project: [owner], EmploymentRelationship: [owner], Employee: [owner], Cust
omer: [owner], Company: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-da
ta-access.
✅ GraphQL schema compiled successfully.

Edit your schema at F:\git\kreinn\trackinn\amplify\backend\api\trackinn\schema.graphql or place .graphql files in a directory at F:\git\kreinn\trackinn\amplify\backend\api\trackinn\schema
✅ Successfully updated resource
```

In my `transform.conf.json` I can see that this is set. When I then run `amplify push` the setting in Amplify Studio is still disabled.

### Expected behavior

`amplify update api` in combination with `amplify push` should push the implemented changes to the cloud.

### Reproduction steps

sadly, I can't reproduce this issue because in an other project everything works fine.

### Project Identifier

7a15e020679dc93ffd0710267d909f36

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

### Before submitting, please confirm:

- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Start with the `amplify update api` and `amplify push` flow for the GraphQL API, then inspect `transform.conf.json` and `amplify/backend/api/trackinn/schema.graphql`. Compare the conflict-resolution setting in the local project with the setting shown in Amplify Studio. Done means identifying a reproducible discrepancy and confirming that the intended setting reaches the cloud.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.