aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
89 stars 77 forks source link

Amplify mock doesn't work with Cognito User Pool #1369

Open rdiaz82 opened 1 year ago

rdiaz82 commented 1 year ago

How did you install the Amplify CLI?

npm

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

v16.19.0

Amplify CLI Version

any version after 1.6.2

What operating system are you using?

mac

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

nope

Describe the bug

I have installed the latest version of the CLI and when I run the amplify mock the local portal doesn't show any graphQL schema and in the top menu only appears API key there are no UserPool option.

I have tried with previous version and I checked that the latest working version was 10.6.2.

This was also reported for older versions but it was fixed: https://github.com/aws-amplify/amplify-cli/issues/10578

Expected behavior

Get my graphQL schema in the local portal and being able to perform queries/mutation on local portal

Reproduction steps

  1. install latest amplify cli version
  2. execute amplify mock
  3. check local portal and check that the schema is not visible and pool options are not available

Project Identifier

No response

Log output

``` # Put your logs below this line ```

Additional information

No response

Before submitting, please confirm:

josefaidt commented 1 year ago

Hey @rdiaz82 :wave: thanks for raising this! Marking as a duplicate of https://github.com/aws-amplify/amplify-category-api/issues/1269

josefaidt commented 1 year ago

To reproduce:

  1. amplify init -y
  2. amplify add api > GraphQL > use Cognito User Pools as auth
  3. amplify mock api
  4. navigate to http://localhost:20002
  5. observe error
dwamianm commented 1 year ago

@josefaidt @phani-srikar ... any updates on this bug? It has really slowed development to not be able to use the tools to test locally. I am comment bombing because It has been so long and I would really love to get this bug addressed so I can be on an updated amplify version. I am still stuck on 10.6.2 just to be able to get this to work :(

dwamianm commented 1 year ago

Checking for updates on this issue

michaelrios commented 1 year ago

@josefaidt @phani-srikar any updates on this?

araymond11 commented 1 year ago

Any updates about this issue ?

gnpivova commented 1 year ago

Hi, I am also experiencing this bug on my Apple M2 Mac. For my use case, I was trying to test out the usage of the @auth directive on a GraphQL schema authenticated with Cognito user pools. When I deploy to AppSync, I see an option to log in with user pools & everything behaves as I expect:

image

However, when I try amplify mock api, it seems like I only have one option: "Auth - API Key". The UI does not allow me to update the authentication settings.

Screenshot 2023-09-15 at 11 54 31 AM

Clicking the "Update Auth" button just displays this dialog:

image

juri-diener commented 1 year ago

@josefaidt @phani-srikar ... any updates on this bug? It has really slowed development to not be able to use the tools to test locally. I am comment bombing because It has been so long and I would really love to get this bug addressed so I can be on an updated amplify version. I am still stuck on 10.6.2 just to be able to get this to work :(

Hello did you find a solution? I have the same Problem with amplify 12.5.0. And it's really slowing down everything.

juri-diener commented 1 year ago

Same issue with amplify 12.5.0!!! Any updates on this?

Why is this important bug not fixed??? It's one of the important things, to test locally. Please periodize this.

afnx commented 9 months ago

I created a PR (https://github.com/aws-amplify/amplify-cli/pull/13555) to fix this issue. Can you please support it? We need the Amplify team to review and approve the fix. Thanks!