Warning: No GraphQL endpoint configured
See original GitHub issueBefore opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
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
- Install all dependency packages
- Configure the AWS
- Generate all models and schema for Datastore
- Fire the Datastore query of the list/create/update
- See the console log on browser
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:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 removeaws-amplify-react
from your dependencies and then try reinstalling them.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.