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.

API graphqlOperation update doesn't seem to do anything

See original GitHub issue

Describe 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:

  1. execute await API.graphql(graphqlOperation(updateUserData, {…})
  2. 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 20200603_155241

What is Configured? Mainstream configuration: 20200603_155423

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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ashika01commented, Jun 8, 2020

@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.

0reactions
github-actions[bot]commented, Feb 18, 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

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 >

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