API graphqlOperation update doesn't seem to do anything
See original GitHub issueDescribe the bug After recent updates, I noticed that API.graphql update operation doesn’t work properly (it seems that it doesn’t do anything at all).
To Reproduce Steps to reproduce the behavior:
- execute await API.graphql(graphqlOperation(updateUserData, {…})
- nothing changes
Expected behavior Expecting some changes to the data, for example below funds should be updated, but in reality nothing happens.
Code Snippet
const updatedUserData: any = await API.graphql(
graphqlOperation(updateUserData, {
input: {
id: state.user.info.id,
funds: {
amount: 100,
currency: 'eur',
},
},
})
Screenshots
It is pretty self explanatory
What is Configured?
Mainstream configuration:
Package packs that I tried to use and still get the same issue: I think it started when I updated to these packages:
"@aws-amplify/api": "3.1.11",
"@aws-amplify/auth": "3.2.8",
"@aws-amplify/cache": "3.1.11",
"@aws-amplify/core": "3.2.8",
"@aws-amplify/datastore": "2.1.1",
"@aws-amplify/pubsub": "3.0.12",
"@aws-amplify/storage": "3.2.1",
Tried on the newest release (still the same issue persists):
"@aws-amplify/api": "3.1.14-unstable.2",
"@aws-amplify/auth": "3.2.11-unstable.2",
"@aws-amplify/cache": "3.1.14-unstable.2",
"@aws-amplify/core": "3.3.1-unstable.2",
"@aws-amplify/datastore": "2.2.1-unstable.2",
"@aws-amplify/pubsub": "3.0.15-unstable.2",
"@aws-amplify/storage": "3.2.4-unstable.2",
"amazon-cognito-identity-js": "4.3.0",
Additional context Seems to be connected - https://github.com/aws-amplify/amplify-cli/issues/3967 Amplify is used on react-native 0.62.2.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
AWS Amplify GraphQL mutation is not updating a boolean field
I was able to solve this issue by: Running the below command: amplify update api. Select GraphQL, then Disable Conflict Detection.
Read more >Build real-time multi-user experiences using GraphQL on ...
Update to Amplify CLI version 10.3.1 and above and deploy your GraphQL ... What we'll learn ... Here is the GraphQL API that...
Read more >An In-Depth Guide on Amplify GraphQL API Authorization
AWS Amplify Auth gives a simple plug and play authentication and authorization experience that can be extended into advanced flows.
Read more >Error handling - Apollo GraphQL Docs
The GraphQL operation is not valid against the server's schema. ... can also throw errors in situations where Apollo Server doesn't do so...
Read more >What every GraphQL user should know about HTTP and REST
With GraphQL APIs, that's a lot harder because the WAF has to understand the GraphQL Operation. Security Experts will love you for putting...
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
@Darapsas That could totally be it. The Datastore (Appsync) setup is a little different from that API. I would suggest sticking to Datastore e2e. I will close this issue for now. Because from API perspective everything is working fine. If you have issue while doing Datastore, thats on back of this, Please post more info and I can reopen the issue for you.
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.