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.

[React-Native] New mutation edit does not reflect immediately when react-native rebundles except when i edit specific js file

See original GitHub issue

Scenario: I have a mutation in filename CreateProduct.gql

mutation createProduct($input: CreateProductInput!) {
  createProduct(input: $input) {
    clientMutationId
    instruction {
      __typename
      ...DisplayReceipt
    }
  }
}

that i use in ProductForm.js

when i edit CreateProduct.gql to

mutation createProduct($input: CreateProductInput!) {
  createProduct(input: $input) {
    clientMutationId
    instruction {
      __typename
     ... on fakeFragment {
       a
     }
      ...DisplayReceipt
    }
  }
}

it does not reflect in my usage in ProductForm.js unless i randomly add a line of code in ProductForm.js. I know this because the former returns a “Server missing query…” since there is no fakeFragment on my schema.

Is this specific to React Native only?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
seanyu4296commented, Feb 26, 2018

Understood. Really appreciate the work you have done! @detrohutt

1reaction
detrohuttcommented, Feb 26, 2018

Yes probably, since it’s more a limitation of babel than of my package. In other words, since my package is a babel plugin, I can’t affect anything without babel itself being rerun. So this is expected behavior, although not ideal. Wish there was more I could do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: Can't see changes to my code - Stack Overflow
I'm developing directly on my Nexus 6, not on the simulator, I did as it tells but I can't see any changes for...
Read more >
Auto reload does not detect changes to index.js #9984 - GitHub
Bug Description. The app does not auto reload upon saving changes in index.js , but reloads on changes in App.js . If there...
Read more >
Mutations in Apollo Client - Apollo GraphQL Docs
The useMutation React hook is the primary API for executing mutations in an Apollo application. To execute a mutation, you first call useMutation...
Read more >
Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >
Updating Objects in State - React Docs
But you shouldn't change objects that you hold in the React state directly. Instead, when you want to update an object, you need...
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