Skip to content

(bugfix): Fix console warnings in WPGraphiQL related to missing keys#2354

Merged
jasonbahl merged 2 commits intowp-graphql:developfrom
jasonbahl:bug/#2352-missing-unique-key-prop
Apr 29, 2022
Merged

(bugfix): Fix console warnings in WPGraphiQL related to missing keys#2354
jasonbahl merged 2 commits intowp-graphql:developfrom
jasonbahl:bug/#2352-missing-unique-key-prop

Conversation

@jasonbahl
Copy link
Copy Markdown
Collaborator

What does this implement/fix? Explain your changes.

This fixes some console warnings related to WPGraphiQL

  • update yarn deps
  • add key to auth switch component
  • add key to fullscreen toggle component
  • add key to AddOperation buttons

Does this close any currently open issues?

closes #2352

- add key to auth switch component
- add key to fullscreen toggle component
- add key to AddOperation buttons
@jasonbahl jasonbahl added the status: in review Awaiting review before merging or closing label Apr 27, 2022
@jasonbahl jasonbahl requested a review from justlevine April 27, 2022 20:43
@jasonbahl jasonbahl self-assigned this Apr 27, 2022
@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit 89ca40c and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 27, 2022

Coverage Status

Coverage increased (+0.08%) to 79.34% when pulling a2371cb on jasonbahl:bug/#2352-missing-unique-key-prop into 7290bb9 on wp-graphql:develop.

@justlevine
Copy link
Copy Markdown
Collaborator

Still getting warnings. I ran npm start to see what components are actually throwing the warnings:

image

image

@justlevine
Copy link
Copy Markdown
Collaborator

Looks like <ExplorerContext.Consumer /> solves the one on GraphQLToolbar, but leaves this:

image

@jasonbahl
Copy link
Copy Markdown
Collaborator Author

@justlevine did you run npm install to get the latest dependencies installed? 🤔

I'm not seeing these console warnings anymore 🤔 (I just see the message about styled-components, but that's for another time)

CleanShot 2022-04-28 at 15 28 09

@jasonbahl
Copy link
Copy Markdown
Collaborator Author

I think I see why these warnings were being output, but I'm curious why I'm not seeing them 🤔

I pushed up another change adding keys to the QueryComposer and Explorer components

Copy link
Copy Markdown
Collaborator

@justlevine justlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings are gone 🚀

image

@jasonbahl jasonbahl merged commit 18515a7 into wp-graphql:develop Apr 29, 2022
@jasonbahl jasonbahl mentioned this pull request May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: in review Awaiting review before merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WPGraphiQL Warning: Each child in a list should have a unique "key" prop.

3 participants