question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: No GraphQL endpoint configured

See original GitHub issue

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

DataStore

Amplify Categories

auth, function, api

Environment information

System:
  OS: Linux 4.15 Ubuntu 18.04.6 LTS (Bionic Beaver)
  CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
  Memory: 2.22 GB / 15.60 GB
  Container: Yes
  Shell: 4.4.20 - /bin/bash
Binaries:
  Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
  npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Browsers:
  Chrome: 96.0.4664.45
  Firefox: 94.0
npmPackages:
  @aws-amplify/ui-react: ^2.1.2 => 2.1.2 
  @aws-amplify/ui-react-internal:  undefined ()
  @aws-amplify/ui-react-legacy:  undefined ()
  @testing-library/jest-dom: ^5.15.1 => 5.15.1 
  @testing-library/react: ^11.2.7 => 11.2.7 
  @testing-library/user-event: ^12.8.3 => 12.8.3 
  aws-amplify: ^4.3.8 => 4.3.8 
  aws-amplify-react: ^5.1.9 => 5.1.9 
  react: ^17.0.2 => 17.0.2 (16.14.0)
  react-dom: ^17.0.2 => 17.0.2 
  react-scripts: 4.0.3 => 4.0.3 
  web-vitals: ^1.1.2 => 1.1.2 
npmGlobalPackages:
  @aws-amplify/cli: 7.5.2
  corepack: 0.10.0
  npm: 8.1.0


Describe the bug

I have updated the aws-amplify and aws-amplify-react versions to the latest. Also, I have used the latest built-in auth UI in my react project. But, I have get the following warning related to datastore. DataStore - Data won't be synchronized. No GraphQL endpoint configured. Did you forget Amplify.configure(awsconfig)?

Also, it works well on older versions. This is the version list of the old package.

"@aws-amplify/ui-react": "^1.2.19",
"aws-amplify": "^4.3.3",
"aws-amplify-react": "^5.1.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",

Expected behavior

I expect to perfectly data sync in my project because it is worked previously on the same configuration.

Reproduction steps

  1. Install all dependency packages
  2. Configure the AWS
  3. Generate all models and schema for Datastore
  4. Fire the Datastore query of the list/create/update
  5. See the console log on browser

image

Code Snippet

import Amplify from "aws-amplify";
import awsconfig from "./aws-exports";
Amplify.configure(awsconfig);

Log output

// Put your logs below this line


aws-exports.js

const awsmobile = {
  "aws_project_region": "us-east-1",
  "aws_cognito_identity_pool_id": "us-east-1:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "aws_cognito_region": "us-east-1",
  "aws_user_pools_id": "us-east-XXXXXXXXX",
  "aws_user_pools_web_client_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "oauth": {},
  "aws_appsync_graphqlEndpoint": "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX.appsync-api.us-east-1.amazonaws.com/XXXXXX",
  "aws_appsync_region": "us-east-1",
  "aws_appsync_authenticationType": "AMAZON_COGNITO_USER_POOLS",
  "aws_appsync_apiKey": "XXXX-XXXXXXXXXXXXXXXXXXXXXXXX"
};

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisbonifaciocommented, Dec 1, 2021

I have a feeling the duplicates are being caused by the aws-amplify-react package, all of its peer dependencies are listed there and they seem to be v2-3 in its package.json.

https://github.com/aws-amplify/amplify-js/blob/main/packages/aws-amplify-react/package.json

If you’re using the @aws-amplify/ui-react package, should be okay to remove aws-amplify-react from your dependencies and then try reinstalling them.

0reactions
github-actions[bot]commented, Dec 4, 2022

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 or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No graphql endpoint provided - Stack Overflow
I can successfully login and confirm the user with Cognito as I can see it in the console. Sign in with Cognito: async...
Read more >
Troubleshooting and Common Mistakes - AWS AppSync
If you execute a GraphQL operation, such as a query, and get a null response, this may be because you don't have a...
Read more >
API (GraphQL) - Configure authorization modes - Swift
Learn more about how to configure authorization modes in Amplify's API category - Swift - AWS Amplify Docs.
Read more >
Manage GraphQL endpoints in AEM - Experience League
Learn how to manage GraphQL endpoints in Adobe Experience Manager as a Cloud Service for headless content delivery.
Read more >
Administrative API - GraphQL - Dgraph
Querying the /admin endpoint for health lets you know that no schema has been added. Validating a schema. You can validate a GraphQL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found