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

[FEAT]: Support TypedDocumentNode #596

Open
1 task done
jyasskin opened this issue Sep 18, 2024 · 3 comments · May be fixed by #609
Open
1 task done

[FEAT]: Support TypedDocumentNode #596

jyasskin opened this issue Sep 18, 2024 · 3 comments · May be fixed by #609
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@jyasskin
Copy link

Describe the need

It would be nice if calling graphql(SomeAppropriateConstant) would apply the appropriate Typescript types to the input variables and return value. The graphql-codegen ecosystem has tooling to compile queries to that appropriate constant, but it needs a small amount of integration with request libraries to propagate the types.

https://github.com/dotansimha/graphql-typed-document-node?tab=readme-ov-file#how-can-i-support-this-in-my-library has instructions. The main cost is in adding a dependency on that type-only library.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jyasskin jyasskin added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Sep 18, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@jyasskin
Copy link
Author

Oops, you probably actually need to use the TypedDocumentString type that's not actually exported from graphql-typed-document-node: dotansimha/graphql-typed-document-node#163.

@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Sep 23, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Sep 23, 2024
@fpapado
Copy link

fpapado commented Nov 3, 2024

I would love to work on this! I just noticed that @graphql-typed-document-node/core exports a DocumentTypeDecoration type as its lowest-common-denominator kind of type, so I believe it is possible to add an overload in octokit, without needing to name TypedDocumentString directly 👀

@fpapado fpapado linked a pull request Nov 3, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

Successfully merging a pull request may close this issue.

3 participants