Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphiQL onEditQuery is called without query argument after TypeScript migration #1439

Closed
cshaver opened this issue Mar 24, 2020 · 6 comments

Comments

@cshaver
Copy link
Collaborator

cshaver commented Mar 24, 2020

I'm updating our installation of graphiql to 1.0.0-alpha.1, and thanks to the new TypeScript types (🎉) I was was really quickly made aware that the type signature of the function passed to GraphiQL as the onEditQuery prop has changed:

image

This breaks our usage of graphiql-explorer. (see example setup which uses onEditQuery https://github.com/OneGraph/graphiql-explorer-example/blob/master/src/App.js#L189)

It looks like this change was made in the recent TypeScript migration.

I understand that this prop is likely going to be deprecated in the new API per #1165, but it looks to me like this change was unintentional (onEditQuery is unchanged in the README, and per #1242 (comment) that this should have minimal production changes).

@acao
Copy link
Member

acao commented Apr 1, 2020

this might be a good candidate for a hotfix to backport

@acao
Copy link
Member

acao commented Apr 1, 2020

or wait, so this is only an issue in alpha, as 0.17.5 was before the typescript migration

@cshaver
Copy link
Collaborator Author

cshaver commented Apr 1, 2020

@acao right! I had the issue in 1.0.0-alpha.1/3, so no need to backport

@acao
Copy link
Member

acao commented Apr 1, 2020

great! thanks for this, we can get another alpha out here shortly. I'll close this once it's been released. glad the new typescript types are working out for you 😄

@acao
Copy link
Member

acao commented Apr 3, 2020

pre-release is out, find 1.0.0-alpha.4 :)

@acao acao closed this as completed Apr 3, 2020
@acao
Copy link
Member

acao commented Apr 12, 2020

use latest alpha btw! @cshaver lemme know if you have any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants