aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.82k stars 821 forks source link

ModelTransformer pluralization is incorrect for plural types #4224

Closed weisisheng closed 3 years ago

weisisheng commented 4 years ago

Describe the bug Create a simple graphql schema in schema.graphql. Perform an amplify push. react-js app can't find the type in "queries". When I look in the file, an extra "s" is added to the type name.

To Reproduce Steps to reproduce the behavior:

  1. Go to schema file and create new types
  2. Do 'amplify push'
  3. React error given, can't find
  4. Open queries file, type name is incorrect

Expected behavior Type name is created verbatim and then front end does not have error accessing API

Code Snippet

from schema.graphql

type TestPursuits @model @auth(rules: [{allow: owner, queries: null}])
{
  id: ID!
  searchName: String!
  posDescr: String!
  candidate: TestCandidates @connection
}

from queries.js, note incorrect name transposed 3x but not for filter variable.

export const listTestPursuitss = / GraphQL / query ListTestPursuitss( $filter: ModelTestPursuitsFilterInput $limit: Int $nextToken: String ) { listTestPursuitss(filter: $filter, limit: $limit, nextToken: $nextToken) { items { id searchName posDescr candidate { id name email posApplied owner } owner } nextToken } } ;

What is Configured?

const awsmobile = {
    "aws_project_region": "ap-southeast-1",
    "aws_cognito_identity_pool_id": "ap-southeast-1:0foofoofoo",
    "aws_cognito_region": "ap-southeast-1",
    "aws_user_pools_id": "ap-southeast-1_foofooofoooofoofoo",
    "oauth": {},
    "aws_appsync_graphqlEndpoint": "https://foofoofoo.appsync-api.ap-southeast-1.amazonaws.com/graphql",
    "aws_appsync_region": "ap-southeast-1",
    "aws_appsync_authenticationType": "AMAZON_COGNITO_USER_POOLS",
    "aws_appsync_apiKey": "da2-fakeApiId123456"
};

export default awsmobile;
npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages

System:
    OS: Linux 5.3 Ubuntu 19.10 (Eoan Ermine)
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
    Memory: 250.52 MB / 15.39 GB
    Container: Yes
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 12.16.3 - /usr/bin/node
    Yarn: 1.22.4 - ~/.yarn/bin/yarn
    npm: 6.14.4 - /usr/bin/npm
  Browsers:
    Chrome: 81.0.4044.138
    Firefox: 76.0
  npmPackages:
    @aws-amplify/analytics: ^3.1.9 => 3.1.9 
    @aws-amplify/api: ^3.1.9 => 3.1.9 
    @aws-amplify/auth: ^3.2.6 => 3.2.6 
    @aws-amplify/core: ^3.2.6 => 3.2.6 
    @aws-amplify/interactions: ^3.1.9 => 3.1.9 
    @aws-amplify/pubsub: ^3.0.10 => 3.0.10 
    @aws-amplify/storage: ^3.1.9 => 3.1.9 
    @aws-amplify/ui: ^2.0.2 => 2.0.2 
    @babel/core: * => 7.9.6 
    @material-ui/core: ^4.9.10 => 4.9.13 
    @material-ui/icons: ^4.9.1 => 4.9.1 
    @react-native-community/netinfo: ^5.5.0 => 5.8.0 
    @types/react: ^16.9.34 => 16.9.34 
    aws-amplify: ^3.0.9 => 3.0.10 
    aws-amplify-react: ^4.1.8 => 4.1.9 
    aws-sdk: ^2.656.0 => 2.673.0 
    chartist: ^0.11.4 => 0.11.4 
    core-js: ^3.6.5 => 3.6.5 
    eslint: 7.0.0 => 7.0.0 
    eslint-config-prettier: ^6.10.1 => 6.11.0 
    eslint-plugin-prettier: ^3.1.3 => 3.1.3 
    formik: ^2.1.4 => 2.1.4 
    gulp: 4.0.2 => 4.0.2 
    gulp-append-prepend: 1.0.8 => 1.0.8 
    history: ^4.10.1 => 4.10.1 
    moment: 2.24.0 => 2.24.0 
    node-sass: ^4.13.1 => 4.14.1 
    notistack: ^0.9.11 => 0.9.11 
    nouislider: ^14.2.0 => 14.4.0 
    perfect-scrollbar: ^1.5.0 => 1.5.0 
    prettier: ^2.0.4 => 2.0.5 
    prop-types: ^15.7.2 => 15.7.2 
    react: ^16.13.1 => 16.13.1 
    react-big-calendar: ^0.24.3 => 0.24.6 
    react-bootstrap-sweetalert: 5.1.9 => 5.1.9 
    react-chartist: ^0.14.3 => 0.14.3 
    react-datetime: 2.16.3 => 2.16.3 
    react-dom: ^16.13.1 => 16.13.1 
    react-google-maps: 9.4.5 => 9.4.5 
    react-jvectormap: ^0.0.16 => 0.0.16 
    react-native: ^0.62.2 => 0.62.2 
    react-router-dom: ^5.1.2 => 5.1.2 
    react-scripts: ^3.4.1 => 3.4.1 
    react-swipeable-views: ^0.13.9 => 0.13.9 
    react-table: ^7.0.4 => 7.0.4 
    react-tagsinput: 3.19.0 => 3.19.0 
    uuid: ^7.0.3 => 7.0.3 
    yup: ^0.28.4 => 0.28.5 
  npmGlobalPackages:
    @aws-amplify/cli: 4.17.2
    @graphql-toolkit/core: 0.9.7
    @graphql-toolkit/graphql-file-loader: 0.9.7
    @graphql-toolkit/json-file-loader: 0.9.7
    @graphql-toolkit/url-loader: 0.9.7
    @serverless/components: 0.1.25
    ajv: 6.10.0
    aws-amplify: 2.2.5
    axios: 0.19.0
    cheerio: 1.0.0-rc.3
    config: 3.2.0
    cordova-res: 0.8.0
    core-js: 3.6.4
    dynamodb-admin: 4.0.0
    expo-cli: 3.3.0
    gatsby-plugin-catch-links: 2.1.2
    gatsby-source-filesystem: 2.1.5
    gatsby-transformer-remark: 2.6.4
    gatsby: 2.15.2
    ghost-cli: 1.13.1
    graphql: 14.6.0
    green-tunnel: 1.7.4
    i: 0.3.6
    inquirer: 7.1.0
    jmespath: 0.15.0
    jshint: 2.10.2
    json-graphql-server: 2.1.3
    lodash: 4.17.14
    mailchimp-api-v3: 1.13.0
    mdanki: 1.0.2
    mdx-deck: 2.5.0
    mkdirp: 1.0.3
    npm: 6.14.2
    postmark-cli: 1.4.7
    postmark: 2.3.5
    react-dom: 16.9.0
    react: 16.9.0
    rels: 0.1.0
    serverless-offline: 5.7.3
    serverless: 1.68.0
    sharp: 0.23.1
    sudo: 1.0.3
    surge: 0.20.5
weisisheng commented 4 years ago

Oddly I removed the API and rebuilt it with a fewer number of types. Once again, the first type is generated with an extra "s" at the end.

The schema file-- type Pursuits @model @auth(rules: [{ allow: owner }])

The queries file--

export const listPursuitss = /* GraphQL */ ` query ListPursuitss(... This only happens on the "listFoo" build out, not on the "getFoo" version.
ericclemmons commented 4 years ago

Validated! Going to move this to the amplify-cli project. It looks like a bug with pluralization, but require('pluralize').plural('Pursuits') is correctly Pursuits, so it's a bug.

  1. amplify init

  2. amplify add api

    ❯ amplify add api
    ? Please select from one of the below mentioned services: GraphQL
    ? Provide API name: 5732
    ? Choose the default authorization type for the API Amazon Cognito User Pool
    Using service: Cognito, provided by: awscloudformation
    
     The current configured provider is Amazon Cognito.
    
     Do you want to use the default authentication and security configuration? Default configuration
     Warning: you will not be able to edit these selections.
     How do you want users to be able to sign in? Username
     Do you want to configure advanced settings? No, I am done.
    Successfully added auth resource
    ? Do you want to configure advanced settings for the GraphQL API No, I am done.
    ? Do you have an annotated GraphQL schema? No
    ? Do you want a guided schema creation? Yes
    ? What best describes your project: Single object with fields (e.g., “Todo” with ID, name, description)
    ? Do you want to edit the schema now? Yes
    Please edit the file in your editor: /private/tmp/5732/amplify/backend/api/5732/schema.graphql
    ? Press enter to continue
    
    GraphQL schema compiled successfully.

    Using this schema:

    type Pursuits @model @auth(rules: [{ allow: owner }]) {
      id: ID!
    }
  3. amplify push

    ❯ amplify push
    ✔ Successfully pulled backend environment dev from the cloud.
    
    Current Environment: dev
    
    | Category | Resource name | Operation | Provider plugin   |
    | -------- | ------------- | --------- | ----------------- |
    | Auth     | 573204ec8e47  | Create    | awscloudformation |
    | Api      | 5732          | Create    | awscloudformation |
    ? Are you sure you want to continue? Yes
    
    GraphQL schema compiled successfully.
    
    Edit your schema at /private/tmp/5732/amplify/backend/api/5732/schema.graphql or place .graphql files in a directory at /private/tmp/5732/amplify/backend/api/5732/schema
    ? Do you want to generate code for your newly created GraphQL API Yes
    ? Choose the code generation language target javascript
    ? Enter the file name pattern of graphql queries, mutations and subscriptions src/graphql/**/*.js
    ? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions Yes
    ? Enter maximum statement depth [increase from default if your schema is deeply nested] 2
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role             Mon May 11 2020 12:13:41 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role             Mon May 11 2020 12:13:40 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS auth573204ec8e47               AWS::CloudFormation::Stack Mon May 11 2020 12:13:40 GMT-0700 (Pacific Daylight Time)
    UPDATE_IN_PROGRESS amplify-5732-dev-120901        AWS::CloudFormation::Stack Mon May 11 2020 12:13:36 GMT-0700 (Pacific Daylight Time) User Initiated
    ⠦ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS auth573204ec8e47 AWS::CloudFormation::Stack Mon May 11 2020 12:13:41 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠹ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS amplify-5732-dev-120901-auth573204ec8e47-6TXI4I8NLGDF AWS::CloudFormation::Stack Mon May 11 2020 12:13:41 GMT-0700 (Pacific Daylight Time) User Initiated
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS SNSRole AWS::IAM::Role Mon May 11 2020 12:13:49 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS SNSRole AWS::IAM::Role Mon May 11 2020 12:13:49 GMT-0700 (Pacific Daylight Time)
    ⠸ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon May 11 2020 12:13:54 GMT-0700 (Pacific Daylight Time)
    ⠇ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE SNSRole AWS::IAM::Role Mon May 11 2020 12:14:03 GMT-0700 (Pacific Daylight Time)
    ⠦ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPool AWS::Cognito::UserPool Mon May 11 2020 12:14:07 GMT-0700 (Pacific Daylight Time)
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    UserPool AWS::Cognito::UserPool Mon May 11 2020 12:14:10 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UserPool AWS::Cognito::UserPool Mon May 11 2020 12:14:09 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    UserPoolClient    AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:16 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    UserPoolClientWeb AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:16 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UserPoolClient    AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:16 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UserPoolClientWeb AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:16 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UserPoolClient    AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:13 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UserPoolClientWeb AWS::Cognito::UserPoolClient Mon May 11 2020 12:14:13 GMT-0700 (Pacific Daylight Time)
    ⠋ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientRole AWS::IAM::Role Mon May 11 2020 12:14:20 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UserPoolClientRole AWS::IAM::Role Mon May 11 2020 12:14:20 GMT-0700 (Pacific Daylight Time)
    ⠙ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLambda AWS::Lambda::Function Mon May 11 2020 12:14:37 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    UserPoolClientRole   AWS::IAM::Role        Mon May 11 2020 12:14:32 GMT-0700 (Pacific Daylight Time)
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLambda AWS::Lambda::Function Mon May 11 2020 12:14:37 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠹ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLambdaPolicy AWS::IAM::Policy      Mon May 11 2020 12:14:41 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    UserPoolClientLambda       AWS::Lambda::Function Mon May 11 2020 12:14:38 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLambdaPolicy AWS::IAM::Policy Mon May 11 2020 12:14:42 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠼ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE UserPoolClientLambdaPolicy AWS::IAM::Policy Mon May 11 2020 12:14:54 GMT-0700 (Pacific Daylight Time)
    ⠙ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLogPolicy AWS::IAM::Policy Mon May 11 2020 12:14:57 GMT-0700 (Pacific Daylight Time)
    ⠦ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientLogPolicy AWS::IAM::Policy Mon May 11 2020 12:14:58 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠇ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE UserPoolClientLogPolicy AWS::IAM::Policy Mon May 11 2020 12:15:09 GMT-0700 (Pacific Daylight Time)
    ⠦ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UserPoolClientInputs Custom::LambdaCallout Mon May 11 2020 12:15:13 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    UserPoolClientInputs Custom::LambdaCallout Mon May 11 2020 12:15:18 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UserPoolClientInputs Custom::LambdaCallout Mon May 11 2020 12:15:18 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠼ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS IdentityPool AWS::Cognito::IdentityPool Mon May 11 2020 12:15:22 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    IdentityPool AWS::Cognito::IdentityPool Mon May 11 2020 12:15:25 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS IdentityPool AWS::Cognito::IdentityPool Mon May 11 2020 12:15:24 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    IdentityPoolRoleMap AWS::Cognito::IdentityPoolRoleAttachment Mon May 11 2020 12:15:31 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS IdentityPoolRoleMap AWS::Cognito::IdentityPoolRoleAttachment Mon May 11 2020 12:15:31 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS IdentityPoolRoleMap AWS::Cognito::IdentityPoolRoleAttachment Mon May 11 2020 12:15:29 GMT-0700 (Pacific Daylight Time)
    ⠙ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE auth573204ec8e47 AWS::CloudFormation::Stack Mon May 11 2020 12:15:36 GMT-0700 (Pacific Daylight Time)
    ⠹ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    UpdateRolesWithIDPFunction AWS::Lambda::Function      Mon May 11 2020 12:15:40 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunction AWS::Lambda::Function      Mon May 11 2020 12:15:39 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS api5732                    AWS::CloudFormation::Stack Mon May 11 2020 12:15:39 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunction AWS::Lambda::Function      Mon May 11 2020 12:15:39 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS api5732                    AWS::CloudFormation::Stack Mon May 11 2020 12:15:38 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS amplify-5732-dev-120901-api5732-19BGB1TTGO3E4 AWS::CloudFormation::Stack Mon May 11 2020 12:15:39 GMT-0700 (Pacific Daylight Time) User Initiated
    ⠹ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionOutputs Custom::LambdaCallout Mon May 11 2020 12:15:42 GMT-0700 (Pacific Daylight Time)
    ⠇ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon May 11 2020 12:15:44 GMT-0700 (Pacific Daylight Time)
    ⠙ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    UpdateRolesWithIDPFunctionOutputs Custom::LambdaCallout Mon May 11 2020 12:15:47 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionOutputs Custom::LambdaCallout Mon May 11 2020 12:15:46 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠇ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS NoneDataSource AWS::AppSync::DataSource    Mon May 11 2020 12:15:51 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS GraphQLSchema  AWS::AppSync::GraphQLSchema Mon May 11 2020 12:15:51 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    GraphQLAPI     AWS::AppSync::GraphQLApi    Mon May 11 2020 12:15:49 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS GraphQLAPI     AWS::AppSync::GraphQLApi    Mon May 11 2020 12:15:49 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    NoneDataSource AWS::AppSync::DataSource    Mon May 11 2020 12:15:54 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS GraphQLSchema  AWS::AppSync::GraphQLSchema Mon May 11 2020 12:15:54 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS NoneDataSource AWS::AppSync::DataSource    Mon May 11 2020 12:15:53 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE GraphQLSchema AWS::AppSync::GraphQLSchema Mon May 11 2020 12:16:55 GMT-0700 (Pacific Daylight Time)
    ⠼ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS Pursuits AWS::CloudFormation::Stack Mon May 11 2020 12:16:58 GMT-0700 (Pacific Daylight Time)
    ⠴ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS Pursuits AWS::CloudFormation::Stack Mon May 11 2020 12:16:58 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠋ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS amplify-5732-dev-120901-api5732-19BGB1TTGO3E4-Pursuits-8XB7790SQHZ8 AWS::CloudFormation::Stack Mon May 11 2020 12:16:58 GMT-0700 (Pacific Daylight Time) User Initiated
    ⠋ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS PursuitsTable                        AWS::DynamoDB::Table   Mon May 11 2020 12:17:07 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS PursuitsIAMRole                      AWS::IAM::Role         Mon May 11 2020 12:17:07 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS SubscriptiononDeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:06 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS PursuitsIAMRole                      AWS::IAM::Role         Mon May 11 2020 12:17:06 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS SubscriptiononUpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:06 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS SubscriptiononCreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:06 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS PursuitsTable                        AWS::DynamoDB::Table   Mon May 11 2020 12:17:06 GMT-0700 (Pacific Daylight Time)
    ⠸ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    SubscriptiononCreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:10 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS SubscriptiononCreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:09 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_COMPLETE    SubscriptiononDeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:09 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    SubscriptiononUpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:08 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS SubscriptiononDeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:08 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS SubscriptiononUpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:08 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠼ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE PursuitsIAMRole AWS::IAM::Role Mon May 11 2020 12:17:20 GMT-0700 (Pacific Daylight Time)
    ⠦ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS PursuitsDataSource AWS::AppSync::DataSource Mon May 11 2020 12:17:31 GMT-0700 (Pacific Daylight Time)
    ⠋ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    PursuitsTable      AWS::DynamoDB::Table     Mon May 11 2020 12:17:38 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    PursuitsDataSource AWS::AppSync::DataSource Mon May 11 2020 12:17:37 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS PursuitsDataSource AWS::AppSync::DataSource Mon May 11 2020 12:17:37 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS GetPursuitsResolver    AWS::AppSync::Resolver Mon May 11 2020 12:17:42 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS CreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:41 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS DeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:41 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS UpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:41 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS ListPursuitsResolver   AWS::AppSync::Resolver Mon May 11 2020 12:17:40 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_IN_PROGRESS ListPursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:43 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    ⠏ Updating resources in the cloud. This may take a few minutes...
    
    CREATE_COMPLETE    GetPursuitsResolver    AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS GetPursuitsResolver    AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_COMPLETE    CreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    DeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time)
    CREATE_COMPLETE    UpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time)
    CREATE_IN_PROGRESS CreatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS DeletePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:44 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_IN_PROGRESS UpdatePursuitsResolver AWS::AppSync::Resolver Mon May 11 2020 12:17:43 GMT-0700 (Pacific Daylight Time) Resource creation Initiated
    CREATE_COMPLETE    ListPursuitsResolver   AWS::AppSync::Resolver Mon May 11 2020 12:17:43 GMT-0700 (Pacific Daylight Time)
    ⠧ Updating resources in the cloud. This may take a few minutes...
    

Confirmed src/graphql/queries.js has listPursuitss:

/* eslint-disable */
// this is an auto generated file. This will be overwritten

export const getPursuits = /* GraphQL */ `
  query GetPursuits($id: ID!) {
    getPursuits(id: $id) {
      id
      owner
    }
  }
`;
export const listPursuitss = /* GraphQL */ `
  query ListPursuitss(
    $filter: ModelPursuitsFilterInput
    $limit: Int
    $nextToken: String
  ) {
    listPursuitss(filter: $filter, limit: $limit, nextToken: $nextToken) {
      items {
        id
        owner
      }
      nextToken
    }
  }
`;
weisisheng commented 4 years ago

Thanks very much for the timely response. Lost a patch of hair on that one ;-)

attilah commented 4 years ago

@weisisheng: what you see is by design as the initial pluralization was just to append an 's' and no external libraries was used. This cannot be fixed without breaking existing customer deployments, once we've feature flags implemented it will be a trivial fix.

sharmaadityaHQ commented 3 years ago

I would like to work on this.

codenamegary commented 3 years ago

Just ran into this as well. Nice to see a PR is already open!

github-actions[bot] commented 3 years ago

👋 Hi, this issue was referenced in the v5.0.2 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v5.0.2.

github-actions[bot] commented 3 years ago

👋 Hi, this issue was referenced in the v5.1.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v5.1.0.

cjihrig commented 3 years ago

Closing, as this was released.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.