aws-amplify / aws-amplify/amplify-studio

There are an error at generated codes at Amplify studio

Open
#923 4 comments 0 reactions 0 assignees View on GitHub
bug data graphql
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [x] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-js/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-js/discussions).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### JavaScript Framework

React

### Amplify APIs

GraphQL API

### Amplify Categories

api

### Environment information

```
# Put output below this line

System:
OS: Windows 10 10.0.22621
CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900HX
Memory: 3.02 GB / 15.70 GB
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.1635.0), Chromium (113.0.1774.35)
Internet Explorer: 11.0.22621.1
npmPackages:
@aws-amplify/ui-react: ^4.6.1 => 4.6.1
@aws-amplify/ui-react-internal: undefined ()
@babel/core: ^7.21.4 => 7.21.8
@babel/plugin-proposal-class-properties: ^7.18.6 => 7.18.6
@babel/plugin-proposal-object-rest-spread: ^7.20.7 => 7.20.7
@babel/preset-env: ^7.21.4 => 7.21.5
@babel/preset-react: ^7.18.6 => 7.18.6
@babel/preset-typescript: ^7.21.4 => 7.21.5
@fontsource/inter: ^4.5.15 => 4.5.15
@fontsource/material-icons: ^4.5.4 => 4.5.4
@types/jest: ^29.5.0 => 29.5.1
@types/lodash: ^4.14.192 => 4.14.194
@types/node: ^18.15.11 => 18.16.5
@types/react-dom: ^18.0.11 => 18.2.4
@types/webpack: ^5.28.1 => 5.28.1
@typescript-eslint/eslint-plugin: ^5.58.0 => 5.59.2
@typescript-eslint/parser: ^5.58.0 => 5.59.2
aws-amplify: ^5.2.0 => 5.2.0
babel-jest: ^29.5.0 => 29.5.0
babel-loader: ^9.1.2 => 9.1.2
css-loader: ^6.7.3 => 6.7.3
eslint: ^8.38.0 => 8.40.0
eslint-config-prettier: ^8.8.0 => 8.8.0
eslint-plugin-react: ^7.32.2 => 7.32.2
jest: ^29.5.0 => 29.5.0
prettier: ^2.8.7 => 2.8.8
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
react-router-dom: ^6.11.1 => 6.11.1
style-loader: ^3.3.2 => 3.3.2
ts-loader: ^9.4.2 => 9.4.2
typescript: ^5.0.4 => 5.0.4
webpack: ^5.79.0 => 5.82.0
webpack-cli: ^5.0.1 => 5.1.0
webpack-dev-server: ^4.13.2 => 4.14.0
npmGlobalPackages:
@aws-amplify/cli: 11.1.1

```

### Describe the bug

After I modified my graphQL schema(name: 'Memory'), I clicked 'deploy' button at Amplify Studio. After finished, I got two types of genetated codes from Amplify Cli (amplify pull) at my computer and a webpage from Amplify Studio at browser. There are a naming error.

From Amplify Studio, I got a method named 'listMemorys', but 'listMemories' at my computer

### Expected behavior

Get the same name from Amplify Studio and Amplify Cli

### Reproduction steps

1. create schema named "Memory" at Amplify Studio
2. click "deploy" button at Amplify Studio (get bad "memorys")
3. execute "amplify pull" at local computer (get good "memories")

### Code Snippet

```javascript
// Put your code below this line.

```

### Log output

```
// Put your logs below this line

```

### aws-exports.js

_No response_

### Manual configuration

_No response_

### Additional configuration

_No response_

### Mobile Device

_No response_

### Mobile Operating System

_No response_

### Mobile Browser

_No response_

### Mobile Browser Version

_No response_

### Additional information and screenshots

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported flow by creating a schema named "Memory" in Amplify Studio, deploying it, and running amplify pull locally. Compare the generated listMemorys and listMemories names between Studio and the CLI output. Done means both generation paths produce the same pluralized method name.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript, react
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.