Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Incorrect Typescript typings #525

Open
cryptic-mystic opened this issue Apr 18, 2019 · 8 comments
Open

Incorrect Typescript typings #525

cryptic-mystic opened this issue Apr 18, 2019 · 8 comments

Comments

@cryptic-mystic
Copy link

Currently using @loona/react for a new project, and running into issues wrt Typescript.

For example the first parameter to patchQuery in Context is typed as a DocumentNode, which only allows for referencing a query with no variables set, which is very limiting. Actual type should be DocumentNode | { query: DocumentNode, variables: any } or something similar.

patchQuery(query: DocumentNode, producer: (data: any) => any): any;

Great library, thanks for all the work on this!

@cryptic-mystic cryptic-mystic changed the title Incorrect typings Incorrect Typescript typings Apr 18, 2019
@wtrocki
Copy link

wtrocki commented Apr 18, 2019

@TheCrow1213 Seen the same. Feel free to create PR with the fix.

@cryptic-mystic
Copy link
Author

@wtrocki Can do!

@cryptic-mystic
Copy link
Author

I'll clone this weekend and submit a PR.

@cryptic-mystic
Copy link
Author

Lol I didn't get to it but I will I promise!

@cryptic-mystic
Copy link
Author

cryptic-mystic commented Apr 24, 2019

@wtrocki @kamilkisiela I don't have permissions to push up a branch, but have a small fix ready if ya'll want it.

I have other ideas for extending Typescript support so that Loona better integrates with other tools like graphql codegen, if ya'll are looking for more contributors :)

@wtrocki
Copy link

wtrocki commented Apr 25, 2019

@TheCrow1213 Let's wait for @kamilkisiela reply. I'm also happy to contribute back.
When no response for some time we can fork this repository to some neutral organization like graphql-community and continue to improve it there, while still creating PR's to this repository.

@cryptic-mystic
Copy link
Author

I need to move pretty fast in my current project for work, so I think for now I will fork Loona and make the necessary modification myself.

If this project becomes active again and ya'll need contributors hit me up.

@Urigo
Copy link
Collaborator

Urigo commented May 17, 2019

@TheCrow1213 can you share a reproduction? something from your solution? or a failing test?

@Urigo Urigo reopened this May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants