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 duplicate key warning in QueryHistory component since 0.16.0

See original GitHub issue

Since upgrading to 0.16.0 I’m getting duplicate key warnings from the QueryHistory component. I have a few of the same items in the history - this looks to be the issue here: https://github.com/graphql/graphiql/blob/87e9d465b51487d41f03e7c09eda5d2e7116e1cb/packages/graphiql/src/components/QueryHistory.js#L96

0.chunk.js:319590 Warning: Encountered two children with the same key, `mutation SomeMutation($input: SomeMutationInput!) {
  someMutation(input: $input) {
    result
  }
}`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
    in ul (created by QueryHistory)
    in section (created by QueryHistory)
    in QueryHistory (created by GraphiQL)
    in div (created by GraphiQL)
    in div (created by GraphiQL)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
acaocommented, Oct 31, 2019

About to take care of this in the upgrade to react 16 this week. Thanks for reporting it!

On Mon, Oct 28, 2019 at 8:38 AM Mickael Neves notifications@github.com wrote:

Getting the same problem

[image: console] https://user-images.githubusercontent.com/20476271/67678886-aa030c00-f97f-11e9-9b8e-d55cdb5cd020.PNG

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/graphql/graphiql/issues/988?email_source=notifications&email_token=AAKOFFYJOZCV5UQJEF6Z5B3QQ3MKZA5CNFSM4JFYMB6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECMXGOY#issuecomment-546927419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKOFF3FAB6OA6NO6AMCDWTQQ3MKZANCNFSM4JFYMB6A .

1reaction
acaocommented, Dec 2, 2019

@moroshko we have a few more PRs waiting for the next release, one in particular that fixes our minified build. our latest published one is provisional from that PR. our minified builds are the most widely used. so hopefully later this week!

Read more comments on GitHub >

github_iconTop Results From Across the Web

REACT Duplicated Key Warning - Stack Overflow
Recommended solution. The problem is that your doc.id is repeating. You are setting the imageData at the imageQuery.
Read more >
Encountered Two Children with the Same Key — React Fix
Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or ...
Read more >
How to Fix 'Each child should have a unique key prop' - Webtips
Learn what is the root cause, and how to fix 'Warning: Each child in a list should have a unique 'key' prop.' warnings...
Read more >
Use the key prop when Rendering a List with React | egghead.io
[1:05] That's the case where you need to have a key prop for every React element in the array. We're seeing this warning...
Read more >
Bug #28216: React duplicate key error on Subscriptions page
Warning : Encountered two children with the same key, `0-row`. Keys should be unique so that components maintain their identity across updates. Non-unique...
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