Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to point amplify v2 at existing aws graphql? #13737

Closed
cookiejest opened this issue Aug 18, 2024 · 3 comments
Closed

How to point amplify v2 at existing aws graphql? #13737

cookiejest opened this issue Aug 18, 2024 · 3 comments
Assignees
Labels
Gen 2 Issues related to Gen 2 Amplify projects question General question transferred This issue was transferred from another Amplify project

Comments

@cookiejest
Copy link

cookiejest commented Aug 18, 2024

Amplify CLI Version

12.12.5

Question

I want to point my amplify v2 at a SAM generated app sync graphql URL and for it to use that rather than generating it in the amplify cli black box.

How do I do that?

@cookiejest cookiejest added pending-triage Issue is pending triage question General question labels Aug 18, 2024
@cookiejest cookiejest changed the title How to point amplify at existing aws graphql? How to point amplify v2 at existing aws graphql? Aug 18, 2024
@ykethan
Copy link
Member

ykethan commented Aug 20, 2024

Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂

@ykethan ykethan transferred this issue from aws-amplify/amplify-cli Aug 20, 2024
@ykethan ykethan added the transferred This issue was transferred from another Amplify project label Aug 20, 2024
@chrisbonifacio chrisbonifacio transferred this issue from aws-amplify/amplify-category-api Aug 20, 2024
@chrisbonifacio
Copy link
Member

chrisbonifacio commented Aug 20, 2024

Hi @cookiejest, if you need to point your frontend graphql client to your own AppSync graphql endpoint, you just need to configure the Amplify client like so:

import { Amplify } from 'aws-amplify';

Amplify.configure({
  ...Amplify.getConfig(),
  API: {
    GraphQL: {
      endpoint: 'https://my-appsync-endpoint.us-east-1.aws.com',
      defaultAuthMode: 'userPool',
    },
  },
});

For more information on using existing AWS resources, this page may be helpful:

https://docs.amplify.aws/react/build-a-backend/add-aws-services/analytics/existing-resources/#configuring-client-library-directly

@chrisbonifacio chrisbonifacio self-assigned this Aug 20, 2024
@chrisbonifacio chrisbonifacio added Gen 2 Issues related to Gen 2 Amplify projects pending-response and removed pending-triage Issue is pending triage labels Aug 20, 2024
@cwomack cwomack added pending-community-response Issue is pending a response from the author or community. and removed pending-response labels Sep 10, 2024
@cwomack
Copy link
Member

cwomack commented Oct 22, 2024

Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.

Thank you!

@cwomack cwomack closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@github-actions github-actions bot removed the pending-community-response Issue is pending a response from the author or community. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gen 2 Issues related to Gen 2 Amplify projects question General question transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

4 participants